diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 84d7e58872ffd..06a3ecdfe040a 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -11,6 +11,8 @@ env: TURBO_VERSION: 1.6.3 RUST_TOOLCHAIN: nightly-2022-11-04 PNPM_VERSION: 7.24.3 + NODE_MAINTENANCE_VERSION: 16 + NODE_LTS_VERSION: 18 jobs: check-examples: @@ -127,7 +129,12 @@ jobs: path: ./* key: ${{ github.sha }}-${{ github.run_number }} - run: ./scripts/check-manifests.js + - run: pnpm lint + if: ${{needs.build.outputs.docsChange == 'nope'}} + + - run: pnpm lint-no-typescript + if: ${{needs.build.outputs.docsChange != 'nope'}} rust-check: runs-on: ubuntu-latest @@ -259,8 +266,9 @@ jobs: - run: node run-tests.js --type unit if: ${{needs.build.outputs.docsChange == 'nope'}} - testDev: - name: Test Development + # run LTS matrix always and maintenance tests during a release + testDevLTS: + name: Test Development Node.js LTS runs-on: ubuntu-latest needs: [build, build-native-test] timeout-minutes: 35 @@ -270,8 +278,8 @@ jobs: strategy: fail-fast: false matrix: - node: [16, 18] - group: [1, 2, 3, 4] + node: [18] + group: [1, 2, 3, 4, 5] steps: - run: echo "${{needs.build.outputs.docsChange}}" @@ -293,22 +301,60 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type development --timings -g ${{ matrix.group }}/4 >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type development --timings -g ${{ matrix.group }}/5 >> /proc/1/fd/1" name: Run test/development if: ${{needs.build.outputs.docsChange == 'nope'}} - # env: - # RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDev / Group ${{ matrix.group }} - # RECORD_ALL_CONTENT: 1 - # RECORD_REPLAY: 1 - # RECORD_REPLAY_TEST_METRICS: 1 - # RECORD_REPLAY_WEBHOOK_URL: ${{ secrets.RECORD_REPLAY_WEBHOOK_URL }} - # - uses: replayio/action-upload@v0.4.5 - # if: always() - # with: - # api-key: rwk_iKsQnEoQwKd31WAJxgN9ARPFuAlyXlVrDH4uhYpRnti - # public: true - # filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} + - name: Upload test trace + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-trace + if-no-files-found: ignore + retention-days: 2 + path: | + test/traces + + testDevMaintenance: + name: Test Development Node.js Maintenance + runs-on: ubuntu-latest + needs: [build, build-native-test] + timeout-minutes: 35 + env: + NEXT_TELEMETRY_DISABLED: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + strategy: + fail-fast: false + matrix: + node: [16] + group: [1, 2, 3, 4, 5] + # we can't use "matrix" context in job level "if" so we have + # to create a separate job which can skip + if: ${{ needs.build.outputs.isRelease == 'true' }} + steps: + - run: echo "${{needs.build.outputs.docsChange}}" + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + timeout-minutes: 5 + if: ${{needs.build.outputs.docsChange == 'nope'}} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - uses: actions/download-artifact@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + name: next-swc-test-binary + path: packages/next-swc/native + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type development --timings -g ${{ matrix.group }}/5 >> /proc/1/fd/1" + name: Run test/development + if: ${{needs.build.outputs.docsChange == 'nope'}} - name: Upload test trace if: always() @@ -320,8 +366,8 @@ jobs: path: | test/traces - testDevE2E: - name: Test Development (E2E) + testDevE2ELTS: + name: Test Development (E2E) Node.js LTS runs-on: ubuntu-latest needs: [build, build-native-test] timeout-minutes: 35 @@ -331,8 +377,8 @@ jobs: strategy: fail-fast: false matrix: - node: [16, 18] - group: [1, 2, 3, 4, 5, 6, 7] + node: [18] + group: [1, 2, 3, 4, 5, 6, 7, 8] steps: - run: echo "${{needs.build.outputs.docsChange}}" @@ -354,21 +400,58 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/7 >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/8 >> /proc/1/fd/1" name: Run test/e2e (dev) if: ${{needs.build.outputs.docsChange == 'nope'}} - # RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDevE2E / Group ${{ matrix.group }} / Node ${{ matrix.node }} - # RECORD_ALL_CONTENT: 1 - # RECORD_REPLAY: 1 - # RECORD_REPLAY_TEST_METRICS: 1 - # RECORD_REPLAY_WEBHOOK_URL: ${{ secrets.RECORD_REPLAY_WEBHOOK_URL }} - # - uses: replayio/action-upload@v0.4.5 - # if: always() - # with: - # api-key: rwk_iKsQnEoQwKd31WAJxgN9ARPFuAlyXlVrDH4uhYpRnti - # public: true - # filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} + - name: Upload test trace + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-trace + if-no-files-found: ignore + retention-days: 2 + path: | + test/traces + + testDevE2EMaintenance: + name: Test Development (E2E) Node.js Maintenance + runs-on: ubuntu-latest + needs: [build, build-native-test] + timeout-minutes: 35 + env: + NEXT_TELEMETRY_DISABLED: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + strategy: + fail-fast: false + matrix: + node: [16] + group: [1, 2, 3, 4, 5, 6, 7, 8] + if: ${{ needs.build.outputs.isRelease == 'true' }} + steps: + - run: echo "${{needs.build.outputs.docsChange}}" + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + timeout-minutes: 5 + if: ${{needs.build.outputs.docsChange == 'nope'}} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - uses: actions/download-artifact@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + name: next-swc-test-binary + path: packages/next-swc/native + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=dev TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/8 >> /proc/1/fd/1" + name: Run test/e2e (dev) + if: ${{needs.build.outputs.docsChange == 'nope'}} - name: Upload test trace if: always() @@ -380,8 +463,46 @@ jobs: path: | test/traces - testProd: - name: Test Production + testProdLTS: + name: Test Production Node.js LTS + runs-on: ubuntu-latest + needs: [build, build-native-test] + timeout-minutes: 15 + env: + NEXT_TELEMETRY_DISABLED: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + strategy: + fail-fast: false + matrix: + node: [18] + group: [1, 2, 3, 4, 5] + steps: + - run: echo "${{needs.build.outputs.docsChange}}" + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + timeout-minutes: 5 + if: ${{needs.build.outputs.docsChange == 'nope'}} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - uses: actions/download-artifact@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + name: next-swc-test-binary + path: packages/next-swc/native + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type production --timings -g ${{ matrix.group }}/5 >> /proc/1/fd/1" + name: Run test/production + if: ${{needs.build.outputs.docsChange == 'nope'}} + + testProdMaintenance: + name: Test Production Node.js Maintenance runs-on: ubuntu-latest needs: [build, build-native-test] timeout-minutes: 15 @@ -391,8 +512,9 @@ jobs: strategy: fail-fast: false matrix: - node: [16, 18] - group: [1, 2, 3] + node: [16] + group: [1, 2, 3, 4, 5] + if: ${{ needs.build.outputs.isRelease == 'true' }} steps: - run: echo "${{needs.build.outputs.docsChange}}" @@ -414,25 +536,12 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type production --timings -g ${{ matrix.group }}/3 >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type production --timings -g ${{ matrix.group }}/5 >> /proc/1/fd/1" name: Run test/production if: ${{needs.build.outputs.docsChange == 'nope'}} - # env: - # RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testProd / Group ${{ matrix.group }} / Node ${{ matrix.node }} - # RECORD_ALL_CONTENT: 1 - # RECORD_REPLAY: 1 - # RECORD_REPLAY_TEST_METRICS: 1 - # RECORD_REPLAY_WEBHOOK_URL: ${{ secrets.RECORD_REPLAY_WEBHOOK_URL }} - - # - uses: replayio/action-upload@v0.4.5 - # if: always() - # with: - # api-key: rwk_iKsQnEoQwKd31WAJxgN9ARPFuAlyXlVrDH4uhYpRnti - # public: true - # filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} - - testProdE2E: - name: Test Production (E2E) + + testProdE2ELTS: + name: Test Production (E2E) Node.js LTS runs-on: ubuntu-latest needs: [build, build-native-test] timeout-minutes: 35 @@ -442,8 +551,8 @@ jobs: strategy: fail-fast: false matrix: - node: [16, 18] - group: [1, 2, 3, 4, 5, 6, 7] + node: [18] + group: [1, 2, 3, 4, 5, 6, 7, 8] steps: - run: echo "${{needs.build.outputs.docsChange}}" @@ -465,21 +574,49 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/7 >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/8 >> /proc/1/fd/1" name: Run test/e2e (production) if: ${{needs.build.outputs.docsChange == 'nope'}} - # RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testProdE2E / Group ${{ matrix.group }} / Node ${{ matrix.node }} - # RECORD_ALL_CONTENT: 1 - # RECORD_REPLAY: 1 - # RECORD_REPLAY_TEST_METRICS: 1 - # RECORD_REPLAY_WEBHOOK_URL: ${{ secrets.RECORD_REPLAY_WEBHOOK_URL }} - # - uses: replayio/action-upload@v0.4.5 - # if: always() - # with: - # api-key: rwk_iKsQnEoQwKd31WAJxgN9ARPFuAlyXlVrDH4uhYpRnti - # public: true - # filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} + testProdE2EMaintenance: + name: Test Production (E2E) Node.js Maintenance + runs-on: ubuntu-latest + needs: [build, build-native-test] + timeout-minutes: 35 + env: + NEXT_TELEMETRY_DISABLED: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + strategy: + fail-fast: false + matrix: + node: [16] + group: [1, 2, 3, 4, 5, 6, 7, 8] + # run LTS matrix always and maintenance tests during a release + if: ${{ needs.build.outputs.isRelease == 'true' }} + steps: + - run: echo "${{needs.build.outputs.docsChange}}" + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + timeout-minutes: 5 + if: ${{needs.build.outputs.docsChange == 'nope'}} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - uses: actions/download-artifact@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + name: next-swc-test-binary + path: packages/next-swc/native + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/8 >> /proc/1/fd/1" + name: Run test/e2e (production) + if: ${{needs.build.outputs.docsChange == 'nope'}} testCNA: name: Test Create Next App @@ -489,7 +626,6 @@ jobs: env: NEXT_TELEMETRY_DISABLED: 1 TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} - steps: - run: echo "${{needs.build.outputs.docsChange}}" @@ -514,7 +650,7 @@ jobs: - run: echo "CNA_CHANGE<> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --type cna --always-canary --exec echo 'yup')" >> $GITHUB_OUTPUT; echo "EOF" >> $GITHUB_OUTPUT id: cna-change - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v16 | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_CNA=1 xvfb-run node run-tests.js test/integration/create-next-app/index.test.ts test/integration/create-next-app/templates.test.ts >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_CNA=1 xvfb-run node run-tests.js test/integration/create-next-app/index.test.ts test/integration/create-next-app/templates.test.ts >> /proc/1/fd/1" if: ${{ needs.build.outputs.docsChange == 'nope' && steps.cna-change.outputs.CNA_CHANGE == 'yup' }} - name: Upload test trace @@ -527,6 +663,36 @@ jobs: path: | test/traces + testCodemods: + name: Test Codemods + runs-on: ubuntu-latest + needs: [build] + timeout-minutes: 5 + env: + NEXT_TELEMETRY_DISABLED: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + + steps: + - run: echo "${{needs.build.outputs.docsChange}}" + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + timeout-minutes: 5 + if: ${{ needs.build.outputs.docsChange == 'nope' }} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - run: echo "CODEMOD_CHANGE<> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --type next-codemod --always-canary --exec echo 'yup')" >> $GITHUB_OUTPUT; echo "EOF" >> $GITHUB_OUTPUT + id: codemodChange + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && cd ./packages/next-codemod && pnpm build && pnpm test >> /proc/1/fd/1" + if: ${{ needs.build.outputs.docsChange == 'nope' && steps.codemodChange.outputs.CODEMOD_CHANGE == 'yup' }} + testIntegration: name: Test Integration runs-on: ubuntu-latest @@ -565,6 +731,9 @@ jobs: 23, 24, 25, + 26, + 27, + 28, ] steps: - run: echo "${{needs.build.outputs.docsChange}}" @@ -587,21 +756,8 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v16 | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/25 >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/28 >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} - # env: - # RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testIntegration / Group ${{ matrix.group }} - # RECORD_ALL_CONTENT: 1 - # RECORD_REPLAY: 1 - # RECORD_REPLAY_TEST_METRICS: 1 - # RECORD_REPLAY_WEBHOOK_URL: ${{ secrets.RECORD_REPLAY_WEBHOOK_URL }} - - # - uses: replayio/action-upload@v0.4.5 - # if: always() - # with: - # api-key: rwk_iKsQnEoQwKd31WAJxgN9ARPFuAlyXlVrDH4uhYpRnti - # public: true - # filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} - name: Upload test trace if: always() @@ -663,15 +819,17 @@ jobs: checkPrecompiled, testIntegration, testUnit, - testDev, - testProd, + testDevLTS, + testProdLTS, + testDevE2ELTS, + testProdE2ELTS, ] steps: - run: exit 0 testFirefox: name: Test Firefox (production) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [build, build-native-test] timeout-minutes: 10 env: @@ -691,12 +849,12 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v16 | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSERNAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_MAINTENANCE_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSERNAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} testSafari: name: Test Safari (production) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [build, build-native-test] timeout-minutes: 15 env: @@ -720,12 +878,12 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v16 | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start BROWSER_NAME=safari node run-tests.js -c 1 test/integration/production/test/index.test.js test/e2e/basepath.test.ts && DEVICE_NAME='iPhone XR' node run-tests.js -c 1 test/production/prerender-prefetch/index.test.ts >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v{{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start BROWSER_NAME=safari node run-tests.js -c 1 test/integration/production/test/index.test.js test/e2e/basepath.test.ts && DEVICE_NAME='iPhone XR' node run-tests.js -c 1 test/production/prerender-prefetch/index.test.ts >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} - testFirefoxNode18: - name: Test Firefox Node.js 18 - runs-on: ubuntu-20.04 + testFirefoxNodeLTS: + name: Test Firefox Node.js LTS + runs-on: ubuntu-latest needs: [build, testFirefox, build-native-test] timeout-minutes: 10 env: @@ -745,7 +903,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v18 | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSER_NAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && BROWSER_NAME=firefox NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js test/integration/production/test/index.test.js >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} publishRelease: @@ -818,7 +976,7 @@ jobs: - run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs name: Reset test project - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v16 | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1" name: Run test/e2e (deploy) - name: Upload test trace @@ -913,19 +1071,6 @@ jobs: if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} run: node scripts/normalize-version-bump.js - # We use restore-key to pick latest cache. - # We will not get exact match, but doc says - # "If there are multiple partial matches for a restore key, the action returns the most recently created cache." - # So we get latest cache - - name: Cache built files - uses: actions/cache@v3 - timeout-minutes: 5 - with: - path: ./packages/next-swc/target - key: next-swc-cargo-cache-dev-ubuntu-latest-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - next-swc-cargo-cache-dev-ubuntu-latest - - name: Build in docker uses: addnab/docker-run-action@v3 if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} @@ -983,7 +1128,7 @@ jobs: test-wasm: name: Test the wasm build - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest timeout-minutes: 15 needs: [build, build-native-test, build-wasm-dev] @@ -1011,7 +1156,7 @@ jobs: name: next-swc-test-binary path: packages/next-swc/native - - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v16 | FORCE=1 bash && node -v && node ./scripts/setup-wasm.mjs && npm i -g pnpm@${PNPM_VERSION} > /dev/null && TEST_WASM=true xvfb-run node run-tests.js test/integration/production/test/index.test.js test/e2e/streaming-ssr/index.test.ts >> /proc/1/fd/1" + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ env.NODE_LTS_VERSION }} | FORCE=1 bash && node -v && node ./scripts/setup-wasm.mjs && npm i -g pnpm@${PNPM_VERSION} > /dev/null && TEST_WASM=true xvfb-run node run-tests.js test/integration/production/test/index.test.js test/e2e/streaming-ssr/index.test.ts >> /proc/1/fd/1" if: ${{needs.build.outputs.docsChange == 'nope'}} # Build binaries for publishing @@ -1168,18 +1313,6 @@ jobs: # we use checkout here instead of the build cache since # it can fail to restore in different OS' - uses: actions/checkout@v3 - # We use restore-key to pick latest cache. - # We will not get exact match, but doc says - # "If there are multiple partial matches for a restore key, the action returns the most recently created cache." - # So we get latest cache - - name: Cache built files - uses: actions/cache@v3 - timeout-minutes: 5 - with: - path: ./packages/next-swc/target - key: next-swc-cargo-cache-${{ matrix.settings.target }}--${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - next-swc-cargo-cache-${{ matrix.settings.target }} - name: Setup node uses: actions/setup-node@v3 diff --git a/.github/workflows/pull_request_stats.yml b/.github/workflows/pull_request_stats.yml index db301c3bf9886..9efbddd1bdd13 100644 --- a/.github/workflows/pull_request_stats.yml +++ b/.github/workflows/pull_request_stats.yml @@ -63,14 +63,14 @@ jobs: # We will not get exact match, but doc says # "If there are multiple partial matches for a restore key, the action returns the most recently created cache." # So we get latest cache - - name: Cache built files - uses: actions/cache@v3 - timeout-minutes: 5 - with: - path: ./packages/next-target - key: next-swc-cargo-cache-ubuntu-latest--${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - next-swc-cargo-cache-ubuntu-latest + # - name: Cache built files + # uses: actions/cache@v3 + # timeout-minutes: 5 + # with: + # path: ./packages/next-target + # key: next-swc-cargo-cache-ubuntu-latest--${{ hashFiles('**/Cargo.lock') }} + # restore-keys: | + # next-swc-cargo-cache-ubuntu-latest - name: Build in docker uses: addnab/docker-run-action@v3 diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml new file mode 100644 index 0000000000000..b128f5a46db33 --- /dev/null +++ b/.github/workflows/test_examples.yml @@ -0,0 +1,52 @@ +# This file duplicates bunch of things from build_test_deploy + +on: + workflow_dispatch: + inputs: + is_dispatched: + description: 'Leave this option enabled' + required: true + default: true + type: boolean + schedule: + - cron: '0 */4 * * *' + +name: Test examples + +env: + PNPM_VERSION: 7.24.3 + +jobs: + testExamples: + # Don't execute using cron on forks + if: (github.repository == 'vercel/next.js') || (inputs.is_dispatched == true) + name: Test Examples + runs-on: ubuntu-latest + timeout-minutes: 120 + env: + NEXT_TELEMETRY_DISABLED: 1 + strategy: + fail-fast: false + matrix: + node: [16, 18] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 25 + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16 + check-latest: true + + - run: npm i -g pnpm@${PNPM_VERSION} + + - run: pnpm install + - run: pnpm build + + - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start xvfb-run node run-tests.js --type examples >> /proc/1/fd/1" + name: Run test/examples diff --git a/contributing/examples/adding-examples.md b/contributing/examples/adding-examples.md index c6f4cebc822ad..978857e0ef8e8 100644 --- a/contributing/examples/adding-examples.md +++ b/contributing/examples/adding-examples.md @@ -1,6 +1,6 @@ ## Adding examples -When you add an example to the [examples](examples) directory, please follow these guidelines to ensure high-quality examples: +When you add an example to the [examples](https://github.com/vercel/next.js/tree/canary/examples) directory, please follow these guidelines to ensure high-quality examples: - TypeScript should be leveraged for new examples (no need for separate JavaScript and TypeScript examples, converting old JavaScript examples is preferred) - Examples should not add custom ESLint configuration (we have specific templates for ESLint) @@ -12,7 +12,7 @@ When you add an example to the [examples](examples) directory, please follow the - Use `export default function` for page components and API Routes instead of `const`/`let` (The exception is if the page has `getInitialProps`, in which case [`NextPage`](https://nextjs.org/docs/api-reference/data-fetching/get-initial-props#typescript) could be useful) - CMS example directories should be prefixed with `cms-` - Example directories should not be prefixed with `with-` -- Make sure linting passes (you can run `pnpm lint-fix`) +- Make sure linting passes (you can run `pnpm build && pnpm lint` to verify and `pnpm lint-fix` for automatic fixes) Also, don’t forget to add a `README.md` file with the following format: diff --git a/docs/advanced-features/codemods.md b/docs/advanced-features/codemods.md index dfe8d18657c79..edd95d87f1948 100644 --- a/docs/advanced-features/codemods.md +++ b/docs/advanced-features/codemods.md @@ -17,6 +17,24 @@ Codemods are transformations that run on your codebase programmatically. This al - `--dry` Do a dry-run, no code will be edited - `--print` Prints the changed output for comparison +## Next.js 13.2 + +### `built-in-next-font` + +This codemod uninstalls `@next/font` and transforms `@next/font` imports into the built-in `next/font`. + +For example: + +```jsx +import { Inter } from '@next/font/google' +``` + +Transforms into: + +```jsx +import { Inter } from 'next/font/google' +``` + ## Next.js 13 ### `new-link` diff --git a/docs/advanced-features/i18n-routing.md b/docs/advanced-features/i18n-routing.md index 6ef388b60856c..e79ab3054030a 100644 --- a/docs/advanced-features/i18n-routing.md +++ b/docs/advanced-features/i18n-routing.md @@ -13,7 +13,7 @@ description: Next.js has built-in support for internationalized routing and lang Next.js has built-in support for internationalized ([i18n](https://en.wikipedia.org/wiki/Internationalization_and_localization#Naming)) routing since `v10.0.0`. You can provide a list of locales, the default locale, and domain-specific locales and Next.js will automatically handle the routing. -The i18n routing support is currently meant to complement existing i18n library solutions like [`react-intl`](https://formatjs.io/docs/getting-started/installation), [`react-i18next`](https://react.i18next.com/), [`lingui`](https://lingui.dev/), [`rosetta`](https://github.com/lukeed/rosetta), [`next-intl`](https://github.com/amannn/next-intl), [`next-translate`](https://github.com/aralroca/next-translate) and others by streamlining the routes and locale parsing. +The i18n routing support is currently meant to complement existing i18n library solutions like [`react-intl`](https://formatjs.io/docs/getting-started/installation), [`react-i18next`](https://react.i18next.com/), [`lingui`](https://lingui.dev/), [`rosetta`](https://github.com/lukeed/rosetta), [`next-intl`](https://github.com/amannn/next-intl), [`next-translate`](https://github.com/aralroca/next-translate), [`next-multilingual`](https://github.com/Avansai/next-multilingual), and others by streamlining the routes and locale parsing. ## Getting started diff --git a/docs/api-reference/edge-runtime.md b/docs/api-reference/edge-runtime.md index 51e199bffa0cd..ed0685f52637e 100644 --- a/docs/api-reference/edge-runtime.md +++ b/docs/api-reference/edge-runtime.md @@ -8,108 +8,123 @@ The Next.js Edge Runtime is based on standard Web APIs, which is used by [Middle ## Network APIs -- [`addEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) -- [`Fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) -- [`FetchEvent`](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent) -- [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) -- [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) -- [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) -- [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) -- [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) -- [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) -- [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) +The Edge Runtime supports the following network APIs: + +| API | Description | +| --------------------------------------------------------------------------------------------------- | -------------------------------- | +| [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | Fetches a resource | +| [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) | Represents an HTTP request | +| [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) | Represents an HTTP response | +| [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) | Represents HTTP headers | +| [`FetchEvent`](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent) | Represents a fetch event | +| [`addEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) | Adds an event listener | +| [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) | Represents form data | +| [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) | Represents a file | +| [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) | Represents a blob | +| [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) | Represents URL search parameters | ## Encoding APIs -- [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) -- [`TextEncoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) -- [`atob`](https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/atob) -- [`btoa`](https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa) - -## Web Stream APIs - -- [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) -- [`ReadableStreamBYOBReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader) -- [`ReadableStreamDefaultReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) -- [`TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) -- [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream) -- [`WritableStreamDefaultWriter`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter) - -## Web Crypto APIs - -- [`crypto`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) -- [`CryptoKey`](https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey) -- [`SubtleCrypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) - -## Web Standards APIs - -- [`structuredClone`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) -- [`URLPattern`](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern) -- [`Web Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache) - -## V8 Primitives - -- [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) -- [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) -- [`Atomics`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics) -- [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) -- [`BigInt64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array) -- [`BigUint64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array) -- [`Boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) -- [`clearInterval`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval) -- [`clearTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout) -- [`console`](https://developer.mozilla.org/en-US/docs/Web/API/Console) -- [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) -- [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) -- [`decodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) -- [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) -- [`encodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI) -- [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) -- [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) -- [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) -- [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) -- [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) -- [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) -- [`Infinity`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity) -- [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) -- [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) -- [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) -- [`Intl`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) -- [`isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite) -- [`isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN) -- [`JSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) -- [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) -- [`Math`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math) -- [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) -- [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) -- [`parseFloat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat) -- [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt) -- [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) -- [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) -- [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) -- [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) -- [`Reflect`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect) -- [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) -- [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) -- [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval) -- [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout) -- [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) -- [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) -- [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) -- [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) -- [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) -- [`TextEncoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) -- [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) -- [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) -- [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) -- [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) -- [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) -- [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) -- [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) -- [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) -- [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) -- [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) -- [`WebAssembly`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly) +The Edge Runtime supports the following encoding APIs: + +| API | Description | +| ----------------------------------------------------------------------------------------- | ---------------------------------- | +| [`TextEncoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) | Encodes a string into a Uint8Array | +| [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) | Decodes a Uint8Array into a string | +| [`atob`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/atob) | Decodes a base-64 encoded string | +| [`btoa`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/btoa) | Encodes a string in base-64 | + +## Stream APIs + +The Edge Runtime supports the following stream APIs: + +| API | Description | +| ------------------------------------------------------------------------------------------------------------- | --------------------------------------- | +| [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) | Represents a readable stream | +| [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream) | Represents a writable stream | +| [`WritableStreamDefaultWriter`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter) | Represents a writer of a WritableStream | +| [`TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) | Represents a transform stream | +| [`ReadableStreamDefaultReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) | Represents a reader of a ReadableStream | +| [`ReadableStreamBYOBReader`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader) | Represents a reader of a ReadableStream | + +## Crypto APIs + +The Edge Runtime supports the following crypto APIs: + +| API | Description | +| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| [`crypto`](https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto) | Provides access to the cryptographic functionality of the platform | +| [`SubtleCrypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) | Provides access to common cryptographic primitives, like hashing, signing, encryption or decryption | +| [`CryptoKey`](https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey) | Represents a cryptographic key | + +## Web Standard APIs + +The Edge Runtime supports the following web standard APIs: + +| API | Description | +| --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) | Allows you to abort one or more DOM requests as and when desired | +| [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) | Represents an error that occurs in the DOM | +| [`structuredClone`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) | Creates a deep copy of a value | +| [`URLPattern`](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern) | Represents a URL pattern | +| [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) | Represents an array of values | +| [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) | Represents a generic, fixed-length raw binary data buffer | +| [`Atomics`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics) | Provides atomic operations as static methods | +| [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | Represents a whole number with arbitrary precision | +| [`BigInt64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array) | Represents a typed array of 64-bit signed integers | +| [`BigUint64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array) | Represents a typed array of 64-bit unsigned integers | +| [`Boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | Represents a logical entity and can have two values: `true` and `false` | +| [`clearInterval`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval) | Cancels a timed, repeating action which was previously established by a call to `setInterval()` | +| [`clearTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout) | Cancels a timed, repeating action which was previously established by a call to `setTimeout()` | +| [`console`](https://developer.mozilla.org/en-US/docs/Web/API/Console) | Provides access to the browser's debugging console | +| [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) | Represents a generic view of an `ArrayBuffer` | +| [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | Represents a single moment in time in a platform-independent format | +| [`decodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) | Decodes a Uniform Resource Identifier (URI) previously created by `encodeURI` or by a similar routine | +| [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) | Decodes a Uniform Resource Identifier (URI) component previously created by `encodeURIComponent` or by a similar routine | +| [`encodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI) | Encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character | +| [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) | Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character | +| [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | Represents an error when trying to execute a statement or accessing a property | +| [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | Represents an error that occurs regarding the global function `eval()` | +| [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) | Represents a typed array of 32-bit floating point numbers | +| [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) | Represents a typed array of 64-bit floating point numbers | +| [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) | Represents a function | +| [`Infinity`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity) | Represents the mathematical Infinity value | +| [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) | Represents a typed array of 8-bit signed integers | +| [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) | Represents a typed array of 16-bit signed integers | +| [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) | Represents a typed array of 32-bit signed integers | +| [`Intl`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) | Provides access to internationalization and localization functionality | +| [`isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite) | Determines whether a value is a finite number | +| [`isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN) | Determines whether a value is `NaN` or not | +| [`JSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) | Provides functionality to convert JavaScript values to and from the JSON format | +| [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) | Represents a collection of values, where each value may occur only once | +| [`Math`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math) | Provides access to mathematical functions and constants | +| [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) | Represents a numeric value | +| [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) | Represents the object that is the base of all JavaScript objects | +| [`parseFloat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat) | Parses a string argument and returns a floating point number | +| [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt) | Parses a string argument and returns an integer of the specified radix | +| [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) | Represents the eventual completion (or failure) of an asynchronous operation, and its resulting value | +| [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) | Represents an object that is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc) | +| [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | Represents an error when a value is not in the set or range of allowed values | +| [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | Represents an error when a non-existent variable is referenced | +| [`Reflect`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect) | Provides methods for interceptable JavaScript operations | +| [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) | Represents a regular expression, allowing you to match combinations of characters | +| [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) | Represents a collection of values, where each value may occur only once | +| [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/setInterval) | Repeatedly calls a function, with a fixed time delay between each call | +| [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/setTimeout) | Calls a function or evaluates an expression after a specified number of milliseconds | +| [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) | Represents a generic, fixed-length raw binary data buffer | +| [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) | Represents a sequence of characters | +| [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) | Represents a unique and immutable data type that is used as the key of an object property | +| [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | Represents an error when trying to interpret syntactically invalid code | +| [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | Represents an error when a value is not of the expected type | +| [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | Represents a typed array of 8-bit unsigned integers | +| [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) | Represents a typed array of 8-bit unsigned integers clamped to 0-255 | +| [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) | Represents a typed array of 32-bit unsigned integers | +| [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) | Represents an error when a global URI handling function was used in a wrong way | +| [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) | Represents an object providing static methods used for creating object URLs | +| [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) | Represents a collection of key/value pairs | +| [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) | Represents a collection of key/value pairs in which the keys are weakly referenced | +| [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) | Represents a collection of objects in which each object may occur only once | +| [`WebAssembly`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly) | Provides access to WebAssembly | ## Next.js Specific Polyfills @@ -138,10 +153,12 @@ The Edge Runtime has some restrictions including: The following JavaScript language features are disabled, and **will not work:** -- `eval`: Evaluates JavaScript code represented as a string -- `new Function(evalString)`: Creates a new function with the code provided as an argument -- `WebAssembly.compile` -- `WebAssembly.instantiate` with [a buffer parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate#primary_overload_%E2%80%94_taking_wasm_binary_code) +| API | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [`eval`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) | Evaluates JavaScript code represented as a string | +| [`new Function(evalString)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) | Creates a new function with the code provided as an argument | +| [`WebAssembly.compile`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) | Compiles a WebAssembly module from a buffer source | +| [`WebAssembly.instantiate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) | Compiles and instantiates a WebAssembly module from a buffer source | In rare cases, your code could contain (or import) some dynamic code evaluation statements which _can not be reached at runtime_ and which can not be removed by treeshaking. You can relax the check to allow specific files with your Middleware or Edge API Route exported configuration: diff --git a/docs/api-reference/next/font.md b/docs/api-reference/next/font.md index c1718e5360b9c..5adf2b9745b8f 100644 --- a/docs/api-reference/next/font.md +++ b/docs/api-reference/next/font.md @@ -1,19 +1,20 @@ --- -description: Optimizing loading web fonts with the built-in `@next/font` loaders. +description: Optimizing loading web fonts with the built-in `next/font` loaders. --- -# @next/font +# next/font
Version History -| Version | Changes | -| --------- | ----------------------- | -| `v13.0.0` | `@next/font` was added. | +| Version | Changes | +| --------- | --------------------------------------------------------------------- | +| `v13.2.0` | `@next/font` renamed to `next/font`. Installation no longer required. | +| `v13.0.0` | `next/font` was added. |
-This API reference will help you understand how to use `@next/font/google` and `@next/font/local`. For features and usage, please see the [Optimizing Fonts](/docs/basic-features/font-optimization.md) page. +This API reference will help you understand how to use `next/font/google` and `next/font/local`. For features and usage, please see the [Optimizing Fonts](/docs/basic-features/font-optimization.md) page. ### Font function arguments @@ -37,7 +38,7 @@ For usage, review [Google Fonts](/docs/basic-features/font-optimization.md#googl The path of the font file as a string or an array of objects (with type `Array<{path: string, weight?: string, style?: string}>`) relative to the directory where the font loader function is called. -Used in `@next/font/local` +Used in `next/font/local` - Required @@ -52,9 +53,9 @@ Examples: The font [`weight`](https://fonts.google.com/knowledge/glossary/weight) with the following possibilities: - A string with possible values of the weights available for the specific font or a range of values if it's a [variable](https://fonts.google.com/variablefonts) font -- An array of weight values if the font is not a [variable google font](https://fonts.google.com/variablefonts). It applies to `@next/font/google` only. +- An array of weight values if the font is not a [variable google font](https://fonts.google.com/variablefonts). It applies to `next/font/google` only. -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` - Required if the font being used is **not** [variable](https://fonts.google.com/variablefonts) @@ -69,23 +70,23 @@ Examples: The font [`style`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) with the following possibilities: - A string [value](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style#values) with default value of `'normal'` -- An array of style values if the font is not a [variable google font](https://fonts.google.com/variablefonts). It applies to `@next/font/google` only. +- An array of style values if the font is not a [variable google font](https://fonts.google.com/variablefonts). It applies to `next/font/google` only. -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` - Optional Examples: -- `style: 'italic'`: A string - it can be `normal` or `italic` for `@next/font/google` -- `style: 'oblique'`: A string - it can take any value for `@next/font/local` but is expected to come from [standard font styles](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) -- `style: ['italic','normal']`: An array of 2 values for `@next/font/google` - the values are from `normal` and `italic` +- `style: 'italic'`: A string - it can be `normal` or `italic` for `next/font/google` +- `style: 'oblique'`: A string - it can take any value for `next/font/local` but is expected to come from [standard font styles](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) +- `style: ['italic','normal']`: An array of 2 values for `next/font/google` - the values are from `normal` and `italic` ### `subsets` The font [`subsets`](https://fonts.google.com/knowledge/glossary/subsetting) defined by an array of string values with the names of each subset you would like to be [preloaded](/docs/basic-features/font-optimization#specifying-a-subset). Fonts specified via `subsets` will have a link preload tag injected into the head when the [`preload`](/docs/api-reference/next/font.md#preload) option is true, which is the default. -Used in `@next/font/google` +Used in `next/font/google` - Optional @@ -97,7 +98,7 @@ Examples: Some variable fonts have extra `axes` that can be included. By default, only the font weight is included to keep the file size down. The possible values of `axes` depend on the specific font. -Used in `@next/font/google` +Used in `next/font/google` - Optional @@ -109,19 +110,19 @@ Examples: The font [`display`](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) with possible string [values](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display#values) of `'auto'`, `'block'`, `'swap'`, `'fallback'` or `'optional'` with default value of `'swap'`. -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` - Optional Examples: -- `display: 'swap'`: A string assigned to the `swap` value +- `display: 'optional'`: A string assigned to the `optional` value ### `preload` A boolean value that specifies whether the font should be [preloaded](/docs/basic-features/font-optimization#preloading) or not. The default is `true`. -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` - Optional @@ -135,7 +136,7 @@ The fallback font to use if the font cannot be loaded. An array of strings of fa - Optional -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` Examples: @@ -143,23 +144,23 @@ Examples: ### `adjustFontFallback` -- For `@next/font/google`: A boolean value that sets whether an automatic fallback font should be used to reduce [Cumulative Layout Shift](https://web.dev/cls/). The default is `true`. -- For `@next/font/local`: A string or boolean `false` value that sets whether an automatic fallback font should be used to reduce [Cumulative Layout Shift](https://web.dev/cls/). The possible values are `'Arial'`, `'Times New Roman'` or `false`. The default is `'Arial'`. +- For `next/font/google`: A boolean value that sets whether an automatic fallback font should be used to reduce [Cumulative Layout Shift](https://web.dev/cls/). The default is `true`. +- For `next/font/local`: A string or boolean `false` value that sets whether an automatic fallback font should be used to reduce [Cumulative Layout Shift](https://web.dev/cls/). The possible values are `'Arial'`, `'Times New Roman'` or `false`. The default is `'Arial'`. -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` - Optional Examples: -- `adjustFontFallback: false`: for ``@next/font/google` -- `adjustFontFallback: 'Times New Roman'`: for `@next/font/local` +- `adjustFontFallback: false`: for ``next/font/google` +- `adjustFontFallback: 'Times New Roman'`: for `next/font/local` ### `variable` A string value to define the CSS variable name to be used if the style is applied with the [CSS variable method](#css-variables). -Used in `@next/font/google` and `@next/font/local` +Used in `next/font/google` and `next/font/local` - Optional @@ -171,7 +172,7 @@ Examples: An array of font face [descriptor](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face#descriptors) key-value pairs that define the generated `@font-face` further. -Used in `@next/font/local` +Used in `next/font/local` - Optional @@ -211,7 +212,7 @@ In addition to importing the font, also import the CSS file where the CSS variab ```js // pages/index.js -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' import styles from '../styles/component.module.css' const inter = Inter({ @@ -251,8 +252,8 @@ Then, specify your font definitions as follows: ```ts // styles/fonts.ts -import { Inter, Lora, Source_Sans_Pro } from '@next/font/google'; -import localFont from '@next/font/local'; +import { Inter, Lora, Source_Sans_Pro } from 'next/font/google'; +import localFont from 'next/font/local'; // define your variable fonts const inter = Inter(); diff --git a/docs/api-reference/next/image.md b/docs/api-reference/next/image.md index 3174c42aced7b..f9418a3eea9b7 100644 --- a/docs/api-reference/next/image.md +++ b/docs/api-reference/next/image.md @@ -16,6 +16,7 @@ description: Enable Image Optimization with the built-in Image component. | Version | Changes | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `v13.2.0` | `contentDispositionType` configuration added. | | `v13.0.6` | `ref` prop added. | | `v13.0.0` | `` wrapper removed. `layout`, `objectFit`, `objectPosition`, `lazyBoundary`, `lazyRoot` props removed. `alt` is required. `onLoadingComplete` receives reference to `img` element. Built-in loader config removed. | | `v12.3.0` | `remotePatterns` and `unoptimized` configuration is stable. | @@ -503,17 +504,20 @@ module.exports = { The default [loader](#loader) does not optimize SVG images for a few reasons. First, SVG is a vector format meaning it can be resized losslessly. Second, SVG has many of the same features as HTML/CSS, which can lead to vulnerabilities without proper [Content Security Policy (CSP) headers](/docs/advanced-features/security-headers.md). -If you need to serve SVG images with the default Image Optimization API, you can set `dangerouslyAllowSVG` and `contentSecurityPolicy` inside your `next.config.js`: +If you need to serve SVG images with the default Image Optimization API, you can set `dangerouslyAllowSVG` inside your `next.config.js`: ```js module.exports = { images: { dangerouslyAllowSVG: true, + contentDispositionType: 'attachment', contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;", }, } ``` +In addition, it is strongly recommended to also set `contentDispositionType` to force the browser to download the image, as well as `contentSecurityPolicy` to prevent scripts embedded in the image from executing. + ### Animated Images The default [loader](#loader) will automatically bypass Image Optimization for animated images and serve the image as-is. diff --git a/docs/api-reference/next/legacy/image.md b/docs/api-reference/next/legacy/image.md index c6b8176c4d169..f5ef5d2468b13 100644 --- a/docs/api-reference/next/legacy/image.md +++ b/docs/api-reference/next/legacy/image.md @@ -571,17 +571,20 @@ module.exports = { The default [loader](#loader) does not optimize SVG images for a few reasons. First, SVG is a vector format meaning it can be resized losslessly. Second, SVG has many of the same features as HTML/CSS, which can lead to vulnerabilities without proper [Content Security Policy (CSP) headers](/docs/advanced-features/security-headers.md). -If you need to serve SVG images with the default Image Optimization API, you can set `dangerouslyAllowSVG` and `contentSecurityPolicy` inside your `next.config.js`: +If you need to serve SVG images with the default Image Optimization API, you can set `dangerouslyAllowSVG` inside your `next.config.js`: ```js module.exports = { images: { dangerouslyAllowSVG: true, + contentDispositionType: 'attachment', contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;", }, } ``` +In addition, it is strongly recommended to also set `contentDispositionType` to force the browser to download the image, as well as `contentSecurityPolicy` to prevent scripts embedded in the image from executing. + ### Animated Images The default [loader](#loader) will automatically bypass Image Optimization for animated images and serve the image as-is. diff --git a/docs/basic-features/data-fetching/incremental-static-regeneration.md b/docs/basic-features/data-fetching/incremental-static-regeneration.md index b7fb3ebc63eca..fee7f272b253e 100644 --- a/docs/basic-features/data-fetching/incremental-static-regeneration.md +++ b/docs/basic-features/data-fetching/incremental-static-regeneration.md @@ -73,7 +73,7 @@ export async function getStaticPaths() { })) // We'll pre-render only these paths at build time. - // { fallback: blocking } will server-render pages + // { fallback: 'blocking' } will server-render pages // on-demand if the path doesn't exist. return { paths, fallback: 'blocking' } } diff --git a/docs/basic-features/font-optimization.md b/docs/basic-features/font-optimization.md index f0db4c0c72f8d..2aa5fa0693519 100644 --- a/docs/basic-features/font-optimization.md +++ b/docs/basic-features/font-optimization.md @@ -1,38 +1,30 @@ --- -description: Optimizing loading web fonts with the built-in `@next/font` loaders. +description: Optimizing loading web fonts with the built-in `next/font` loaders. --- # Optimizing Fonts -[**`@next/font`**](/docs/api-reference/next/font.md) will automatically optimize your fonts (including custom fonts) and remove external network requests for improved privacy and performance. +[**`next/font`**](/docs/api-reference/next/font.md) will automatically optimize your fonts (including custom fonts) and remove external network requests for improved privacy and performance. -> **🎥 Watch:** Learn more about how to use `@next/font` → [YouTube (6 minutes)](https://www.youtube.com/watch?v=L8_98i_bMMA). +> **🎥 Watch:** Learn more about how to use `next/font` → [YouTube (6 minutes)](https://www.youtube.com/watch?v=L8_98i_bMMA). ## Overview -`@next/font` includes **built-in automatic self-hosting** for _any_ font file. This means you can optimally load web fonts with zero layout shift, thanks to the underlying CSS `size-adjust` property used. +`next/font` includes **built-in automatic self-hosting** for _any_ font file. This means you can optimally load web fonts with zero layout shift, thanks to the underlying CSS `size-adjust` property used. This new font system also allows you to conveniently use all Google Fonts with performance and privacy in mind. CSS and font files are downloaded at build time and self-hosted with the rest of your static assets. **No requests are sent to Google by the browser.** -## Usage - -To get started, install `@next/font`: - -```bash -npm install @next/font -``` - ### Google Fonts Automatically self-host any Google Font. Fonts are included in the deployment and served from the same domain as your deployment. **No requests are sent to Google by the browser.** -Import the font you would like to use from `@next/font/google` as a function. We recommend using [**variable fonts**](https://fonts.google.com/variablefonts) for the best performance and flexibility. +To get started, import the font you would like to use from `next/font/google` as a function. We recommend using [**variable fonts**](https://fonts.google.com/variablefonts) for the best performance and flexibility. To use the font in all your pages, add it to [`_app.js` file](https://nextjs.org/docs/advanced-features/custom-app) under `/pages` as shown below: ```js // pages/_app.js -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' // If loading a variable font, you don't need to specify the font weight const inter = Inter({ subsets: ['latin'] }) @@ -50,7 +42,7 @@ If you can't use a variable font, you will **need to specify a weight**: ```js // pages/_app.js -import { Roboto } from '@next/font/google' +import { Roboto } from 'next/font/google' const roboto = Roboto({ weight: '400', @@ -76,13 +68,15 @@ const roboto = Roboto({ }) ``` +> **Note**: You can use `_` for fonts with spaces in the name. For example `Titillium Web` should be `Titillium_Web`. + #### Apply the font in `` You can also use the font without a wrapper and `className` by injecting it inside the `` as follows: ```js // pages/_app.js -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' const inter = Inter({ subsets: ['latin'] }) @@ -106,7 +100,7 @@ To use the font on a single page, add it to the specific page as shown below: ```js // pages/index.js -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' const inter = Inter({ subsets: ['latin'] }) @@ -139,7 +133,7 @@ This can be done in 2 ways: module.exports = { experimental: { fontLoaders: [ - { loader: '@next/font/google', options: { subsets: ['latin'] } }, + { loader: 'next/font/google', options: { subsets: ['latin'] } }, ], }, } @@ -151,11 +145,11 @@ View the [Font API Reference](/docs/api-reference/next/font.md#nextfontgoogle) f ### Local Fonts -Import `@next/font/local` and specify the `src` of your local font file. We recommend using [**variable fonts**](https://fonts.google.com/variablefonts) for the best performance and flexibility. +Import `next/font/local` and specify the `src` of your local font file. We recommend using [**variable fonts**](https://fonts.google.com/variablefonts) for the best performance and flexibility. ```js // pages/_app.js -import localFont from '@next/font/local' +import localFont from 'next/font/local' // Font files can be colocated inside of `pages` const myFont = localFont({ src: './my-font.woff2' }) @@ -202,13 +196,13 @@ View the [Font API Reference](/docs/api-reference/next/font.md#nextfontlocal) fo ## With Tailwind CSS -`@next/font` can be used with Tailwind CSS through a [CSS variable](/docs/api-reference/next/font#css-variables). +`next/font` can be used with Tailwind CSS through a [CSS variable](/docs/api-reference/next/font#css-variables). -In the example below, we use the font `Inter` from `@next/font/google` (You can use any font from Google or Local Fonts). Load your font with the `variable` option to define your CSS variable name and assign it to `inter`. Then, use `inter.variable` to add the CSS variable to your HTML document. +In the example below, we use the font `Inter` from `next/font/google` (You can use any font from Google or Local Fonts). Load your font with the `variable` option to define your CSS variable name and assign it to `inter`. Then, use `inter.variable` to add the CSS variable to your HTML document. ```js // pages/_app.js -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' const inter = Inter({ subsets: ['latin'], diff --git a/docs/deployment.md b/docs/deployment.md index f17c1fce00211..a2ff1c1c4af5f 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -100,7 +100,7 @@ The following services support Next.js `v12+`. Below, you’ll find examples or - [Digital Ocean App Platform](https://docs.digitalocean.com/tutorials/app-nextjs-deploy/) - [Google Cloud Run](https://github.com/vercel/next.js/tree/canary/examples/with-docker) - [Heroku](https://elements.heroku.com/buildpacks/mars/heroku-nextjs) -- [Railway](https://railway.app/new/starters/nextjs-prisma) +- [Railway](https://docs.railway.app/getting-started) - [Render](https://render.com/docs/deploy-nextjs-app) > **Note:** There are also managed platforms that allow you to use a Dockerfile as shown in the [example above](/docs/deployment.md#docker-image). diff --git a/docs/manifest.json b/docs/manifest.json index 581c53ced2236..9e68f646fea7d 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -425,7 +425,7 @@ "path": "/docs/api-reference/next/server.md" }, { - "title": "@next/font", + "title": "next/font", "path": "/docs/api-reference/next/font.md" }, { diff --git a/docs/testing.md b/docs/testing.md index ac53daf2bc8c9..42f83416a1a24 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -320,17 +320,7 @@ const createJestConfig = nextJest({ const customJestConfig = { // Add more setup options before each test is run // setupFilesAfterEnv: ['/jest.setup.js'], - // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work - moduleDirectories: ['node_modules', '/'], - // If you're using [Module Path Aliases](https://nextjs.org/docs/advanced-features/module-path-aliases), - // you will have to add the moduleNameMapper in order for jest to resolve your absolute paths. - // The paths have to be matching with the paths option within the compilerOptions in the tsconfig.json - // For example: - - moduleNameMapper: { - '@/(.*)$': '/src/$1', - }, testEnvironment: 'jest-environment-jsdom', } @@ -341,7 +331,7 @@ module.exports = createJestConfig(customJestConfig) Under the hood, `next/jest` is automatically configuring Jest for you, including: - Setting up `transform` using [SWC](https://nextjs.org/docs/advanced-features/compiler) -- Auto mocking stylesheets (`.css`, `.module.css`, and their scss variants), image imports and [`@next/font`](https://nextjs.org/docs/basic-features/font-optimization) +- Auto mocking stylesheets (`.css`, `.module.css`, and their scss variants), image imports and [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) - Loading `.env` (and all variants) into `process.env` - Ignoring `node_modules` from test resolving and transforms - Ignoring `.next` from test resolving diff --git a/docs/upgrading.md b/docs/upgrading.md index fc61834c66f29..69596c4b4f35e 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -73,9 +73,9 @@ The behavior of [`next/script`](/docs/api-reference/next/script.md) has been upd ### Font Optimization -Previously, Next.js helped you optimize fonts by inlining font CSS. Version 13 introduces the new [`@next/font`](/docs/basic-features/font-optimization.md) module which gives you the ability to customize your font loading experience while still ensuring great performance and privacy. +Previously, Next.js helped you optimize fonts by inlining font CSS. Version 13 introduces the new [`next/font`](/docs/basic-features/font-optimization.md) module which gives you the ability to customize your font loading experience while still ensuring great performance and privacy. -See [Optimizing Fonts](/docs/basic-features/font-optimization.md) to learn how to use `@next/font`. +See [Optimizing Fonts](/docs/basic-features/font-optimization.md) to learn how to use `next/font`. ## Upgrading to 12.2 diff --git a/errors/built-in-next-font.md b/errors/built-in-next-font.md new file mode 100644 index 0000000000000..7120e1b47abde --- /dev/null +++ b/errors/built-in-next-font.md @@ -0,0 +1,18 @@ +# Built-in `next/font` + +#### Why This Error Occurred + +Starting with Next.js 13.2, `next/font` is built-in to Next.js and no longer needs to be installed. The `@next/font` package will be removed in Next.js 14. + +#### Possible Ways to Fix It + +Run the `built-in-next-font` codemod to automatically uninstall `@next/font` and change `@next/font` imports to `next/font`: + +```sh +npx @next/codemod built-in-next-font . +``` + +### Useful Links + +- [Codemods](https://nextjs.org/docs/advanced-features/codemods) +- [Optimizing Fonts](https://nextjs.org/docs/basic-features/font-optimization) diff --git a/errors/css-modules-npm.md b/errors/css-modules-npm.md index 20fe4a579b7cc..1220e02fb8dd1 100644 --- a/errors/css-modules-npm.md +++ b/errors/css-modules-npm.md @@ -21,4 +21,8 @@ imported by you, in your application. --- If this is **first party code**, try -[including said monorepo package in the compilation pipeline](https://github.com/vercel/next.js/tree/canary/examples/with-yarn-workspaces). +[including monorepo packages in the compilation pipeline](https://nextjs.org/docs/advanced-features/compiler#module-transpilation). + +--- + +This limitation does not exist when using the `app` directory: [beta.nextjs.org/docs](https://beta.nextjs.org/docs). diff --git a/errors/invalid-images-config.md b/errors/invalid-images-config.md index badaa4f3e1a88..d76741e61f3d9 100644 --- a/errors/invalid-images-config.md +++ b/errors/invalid-images-config.md @@ -33,6 +33,8 @@ module.exports = { dangerouslyAllowSVG: false, // set the Content-Security-Policy header contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;", + // sets the Content-Disposition header (inline or attachment) + contentDispositionType: 'inline', // limit of 50 objects remotePatterns: [], // when true, every image will be unoptimized diff --git a/errors/link-no-children.md b/errors/link-no-children.md index 103018f1f80e0..48fd21c803289 100644 --- a/errors/link-no-children.md +++ b/errors/link-no-children.md @@ -11,9 +11,11 @@ import Link from 'next/link' export default function Home() { return ( - - // or - + <> + + // or + + ) } ``` @@ -27,9 +29,13 @@ import Link from 'next/link' export default function Home() { return ( - - To About - + <> + To About + // or + + To About + + ) } ``` diff --git a/errors/manifest.json b/errors/manifest.json index d73a3e72c68b0..1f658614e3d6e 100644 --- a/errors/manifest.json +++ b/errors/manifest.json @@ -793,6 +793,14 @@ { "title": "app-static-to-dynamic-error", "path": "/errors/app-static-to-dynamic-error.md" + }, + { + "title": "built-in-next-font", + "path": "/errors/built-in-next-font.md" + }, + { + "title": "version-staleness", + "path": "/errors/version-staleness.md" } ] } diff --git a/errors/middleware-parse-user-agent.md b/errors/middleware-parse-user-agent.md index 60f80e10d4e45..1c9b095cd07ff 100644 --- a/errors/middleware-parse-user-agent.md +++ b/errors/middleware-parse-user-agent.md @@ -29,6 +29,6 @@ export function middleware(request: NextRequest) { const viewport = device.type === 'mobile' ? 'mobile' : 'desktop' request.nextUrl.searchParams.set('viewport', viewport) - return NextResponse.rewrites(request.nextUrl) + return NextResponse.rewrite(request.nextUrl) } ``` diff --git a/errors/node-module-in-edge-runtime.md b/errors/node-module-in-edge-runtime.md index e2cc63a126123..0ba79e4aa8ad8 100644 --- a/errors/node-module-in-edge-runtime.md +++ b/errors/node-module-in-edge-runtime.md @@ -10,7 +10,7 @@ However, the Edge Runtime does not support [Node.js APIs and globals](https://ne When running Next.js locally with `next dev`, your application will show in the console, and in your browser, which file is importing and using an unsupported module. This module must be avoided: either by not importing it, or by replacing it with a polyfill. -For example, you might replace the Node.js `crypto` module with the [Web Crypto API](<[https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API](https://nextjs.org/docs/api-reference/edge-runtime#web-crypto-apis)>). +For example, you might replace the Node.js `crypto` module with the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API). ### Useful Links diff --git a/errors/opening-an-issue.md b/errors/opening-an-issue.md index 34a08b391843a..e75cdab70ee15 100644 --- a/errors/opening-an-issue.md +++ b/errors/opening-an-issue.md @@ -2,7 +2,7 @@ #### Why This Message Occurred -When `next info` was run, Next.js detected that it's was not on the latest canary release. +When `next info` was run, Next.js detected that it was not on the newest canary release. `next@canary` is the canary version of Next.js that ships daily. It includes all features and fixes that have not been released to the stable version yet. Think of canary as a public beta. @@ -26,3 +26,6 @@ And go through the prepared reproduction steps once again, and check if the issu - [Video: How to Contribute to Open Source (Next.js)](https://www.youtube.com/watch?v=cuoNzXFLitc) - [Contributing to Next.js](https://github.com/vercel/next.js/blob/canary/contributing.md) +- [Triaging issues](https://github.com/vercel/next.js/blob/canary/contributing/repository/triaging.md) +- [Verifiying canary](https://github.com/vercel/next.js/blob/canary/.github/actions/issue-validator/canary.md) +- [Adding a reproduction](https://github.com/vercel/next.js/blob/canary/.github/actions/issue-validator/repro.md) diff --git a/errors/version-staleness.md b/errors/version-staleness.md new file mode 100644 index 0000000000000..6dadaf302b637 --- /dev/null +++ b/errors/version-staleness.md @@ -0,0 +1,52 @@ +# Version Staleness + +#### Why This Error Occurred + +In the error overlay, a message was shown that the detected Next.js version was out-of-date. + +To get the newest features and bug fixes, it is recommended to stay up to date. + +#### Possible Ways to Fix It + +If you are testing out a canary release, upgrade Next.js with one of the following: + +```sh +npm i next@canary +``` + +```sh +yarn add next@canary +``` + +```sh +pnpm add next@canary +``` + +If you are using a stable release, upgrade Next.js with one of the following: + +```sh +npm i next@latest +``` + +```sh +yarn add next@latest +``` + +```sh +pnpm add next@latest +``` + +If you are coming from an older major version, check out our [upgrade guides](https://nextjs.org/docs/upgrading). + +### Note + +If you want to report a bug on GitHub, you should upgrade to the newest canary release of Next.js first, to see if the bug has already been fixed in canary. + +### Useful Links + +- [Upgrade guide](https://nextjs.org/docs/upgrading) +- [Video: How to Contribute to Open Source (Next.js)](https://www.youtube.com/watch?v=cuoNzXFLitc) +- [Contributing to Next.js](https://github.com/vercel/next.js/blob/canary/contributing.md) +- [Triaging issues](https://github.com/vercel/next.js/blob/canary/contributing/repository/triaging.md) +- [Verifiying canary](https://github.com/vercel/next.js/blob/canary/.github/actions/issue-validator/canary.md) +- [Adding a reproduction](https://github.com/vercel/next.js/blob/canary/.github/actions/issue-validator/repro.md) diff --git a/examples/blog-starter/pages/posts/[slug].tsx b/examples/blog-starter/pages/posts/[slug].tsx index 8eafdc9dbb6f6..9eb67163f0a14 100644 --- a/examples/blog-starter/pages/posts/[slug].tsx +++ b/examples/blog-starter/pages/posts/[slug].tsx @@ -20,6 +20,7 @@ type Props = { export default function Post({ post, morePosts, preview }: Props) { const router = useRouter() + const title = `${post.title} | Next.js Blog Example with ${CMS_NAME}` if (!router.isFallback && !post?.slug) { return } @@ -33,9 +34,7 @@ export default function Post({ post, morePosts, preview }: Props) { <>
- - {post.title} | Next.js Blog Example with {CMS_NAME} - + {title} - {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-agilitycms/pages/[...slug].tsx b/examples/cms-agilitycms/pages/[...slug].tsx index a5227cbb67ba1..24cca5fcc72bd 100644 --- a/examples/cms-agilitycms/pages/[...slug].tsx +++ b/examples/cms-agilitycms/pages/[...slug].tsx @@ -27,7 +27,7 @@ export default function Slug({ <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} {router.isFallback ? ( diff --git a/examples/cms-builder-io/pages/index.js b/examples/cms-builder-io/pages/index.js index 0a747ad442cc9..daaed1a1d2028 100644 --- a/examples/cms-builder-io/pages/index.js +++ b/examples/cms-builder-io/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ allPosts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-contentful/pages/index.js b/examples/cms-contentful/pages/index.js index ce7c079c45424..5e93ffefb73ad 100644 --- a/examples/cms-contentful/pages/index.js +++ b/examples/cms-contentful/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ preview, allPosts }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-contentful/pages/posts/[slug].js b/examples/cms-contentful/pages/posts/[slug].js index c14841bd9ca0b..344deee1b4217 100644 --- a/examples/cms-contentful/pages/posts/[slug].js +++ b/examples/cms-contentful/pages/posts/[slug].js @@ -30,7 +30,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-cosmic/pages/index.tsx b/examples/cms-cosmic/pages/index.tsx index 33bb82b4be948..7c946c8e9e354 100644 --- a/examples/cms-cosmic/pages/index.tsx +++ b/examples/cms-cosmic/pages/index.tsx @@ -23,7 +23,7 @@ const Index = (props: IndexProps) => { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-cosmic/pages/posts/[slug].tsx b/examples/cms-cosmic/pages/posts/[slug].tsx index 3e3c1de504b28..3be31b18191b4 100644 --- a/examples/cms-cosmic/pages/posts/[slug].tsx +++ b/examples/cms-cosmic/pages/posts/[slug].tsx @@ -38,7 +38,7 @@ const Post = (props: PostProps) => {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-datocms/pages/posts/[slug].js b/examples/cms-datocms/pages/posts/[slug].js index b72236fab8c55..a39aa7d6f3f88 100644 --- a/examples/cms-datocms/pages/posts/[slug].js +++ b/examples/cms-datocms/pages/posts/[slug].js @@ -29,7 +29,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-drupal/pages/[...slug].js b/examples/cms-drupal/pages/[...slug].js index 924efa292eb30..8e52fb87bfb1d 100644 --- a/examples/cms-drupal/pages/[...slug].js +++ b/examples/cms-drupal/pages/[...slug].js @@ -35,7 +35,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-ghost/pages/index.js b/examples/cms-ghost/pages/index.js index 21ca17a8a5be9..7554c969c659d 100644 --- a/examples/cms-ghost/pages/index.js +++ b/examples/cms-ghost/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ allPosts }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-ghost/pages/posts/[slug].js b/examples/cms-ghost/pages/posts/[slug].js index bf2a6b4b266a4..d40af4408b50f 100644 --- a/examples/cms-ghost/pages/posts/[slug].js +++ b/examples/cms-ghost/pages/posts/[slug].js @@ -28,7 +28,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-graphcms/pages/index.js b/examples/cms-graphcms/pages/index.js index be1dce8bf80d4..0e0639fbb5dbf 100644 --- a/examples/cms-graphcms/pages/index.js +++ b/examples/cms-graphcms/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ posts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-graphcms/pages/posts/[slug].js b/examples/cms-graphcms/pages/posts/[slug].js index f19f07808f933..d4b76d503ea98 100644 --- a/examples/cms-graphcms/pages/posts/[slug].js +++ b/examples/cms-graphcms/pages/posts/[slug].js @@ -30,7 +30,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} {/* */} diff --git a/examples/cms-kontent-ai/pages/index.tsx b/examples/cms-kontent-ai/pages/index.tsx index 139b022d564f6..7e3a75449bb95 100644 --- a/examples/cms-kontent-ai/pages/index.tsx +++ b/examples/cms-kontent-ai/pages/index.tsx @@ -20,7 +20,7 @@ export default function Index({ allPosts, preview }: IndexProps) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-kontent-ai/pages/posts/[slug].tsx b/examples/cms-kontent-ai/pages/posts/[slug].tsx index 672cdf8e28b68..a132efd02c5d0 100644 --- a/examples/cms-kontent-ai/pages/posts/[slug].tsx +++ b/examples/cms-kontent-ai/pages/posts/[slug].tsx @@ -39,7 +39,7 @@ export default function Post({ post, morePosts = [], preview }: PostProps) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-prepr/pages/index.js b/examples/cms-prepr/pages/index.js index ad1d6147b21e7..c7fa551afe18a 100644 --- a/examples/cms-prepr/pages/index.js +++ b/examples/cms-prepr/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ posts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-prepr/pages/posts/[slug].js b/examples/cms-prepr/pages/posts/[slug].js index 2c46085b2d173..f378dba7317c9 100644 --- a/examples/cms-prepr/pages/posts/[slug].js +++ b/examples/cms-prepr/pages/posts/[slug].js @@ -30,7 +30,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} {/* */} diff --git a/examples/cms-prismic/pages/index.tsx b/examples/cms-prismic/pages/index.tsx index 691970862197e..76d5f2b7fe54a 100644 --- a/examples/cms-prismic/pages/index.tsx +++ b/examples/cms-prismic/pages/index.tsx @@ -21,7 +21,7 @@ export default function Index({ preview, allPosts }: IndexProps) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-sanity/README.md b/examples/cms-sanity/README.md index 81402ef7b0120..29303c9dc61be 100644 --- a/examples/cms-sanity/README.md +++ b/examples/cms-sanity/README.md @@ -37,18 +37,17 @@ You'll get: # Configuration - [Step 1. Set up the environment](#step-1-set-up-the-environment) -- [Step 2. Configure CORS for localhost](#step-2-configure-cors-for-localhost) -- [Step 3. Run Next.js locally in development mode](#step-3-run-nextjs-locally-in-development-mode) -- [Step 4. Populate content](#step-4-populate-content) -- [Step 5. Deploy to production & use Preview Mode from anywhere](#step-5-deploy-to-production--use-preview-mode-from-anywhere) +- [Step 2. Run Next.js locally in development mode](#step-3-run-nextjs-locally-in-development-mode) +- [Step 3. Populate content](#step-3-populate-content) +- [Step 4. Deploy to production & use Preview Mode from anywhere](#step-4-deploy-to-production--use-preview-mode-from-anywhere) - [If you didn't Deploy with Vercel earlier do so now](#if-you-didnt-deploy-with-vercel-earlier-do-so-now) - [Configure CORS for production](#configure-cors-for-production) - [Add the preview secret environment variable](#add-the-preview-secret-environment-variable) - [How to test locally that the secret is setup correctly](#how-to-test-locally-that-the-secret-is-setup-correctly) - [How to start Preview Mode for Next.js in production from a local Studio](#how-to-start-preview-mode-for-nextjs-in-production-from-a-local-studio) - [If you regret sending a preview link to someone](#if-you-regret-sending-a-preview-link-to-someone) -- [Step 6. Deploy your Studio and publish from anywhere](#step-6-deploy-your-studio-and-publish-from-anywhere) -- [Step 7. Setup Revalidation Webhook](#step-7-setup-revalidation-webhook) +- [Step 5. Deploy your Studio and publish from anywhere](#step-5-deploy-your-studio-and-publish-from-anywhere) +- [Step 6. Setup Revalidation Webhook](#step-6-setup-revalidation-webhook) - [Testing the Webhook](#testing-the-webhook) - [Next steps](#next-steps) @@ -71,81 +70,7 @@ Download the environment variables needed to connect Next.js and Studio to your npx vercel env pull ``` -
-You can also set up manually - -- [Bootstrap the example](#bootstrap-the-example) -- [Connect to a Sanity project](#connect-to-a-sanity-project) -- [Set up environment variables](#set-up-environment-variables) - -If using the [integration] isn't an option. Or maybe you want to work locally first and deploy to Vercel later. Whatever the reason this guide shows you how to setup manually. - -### Bootstrap the example - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io): - -```bash -npx create-next-app --example cms-sanity cms-sanity-app -``` - -```bash -yarn create next-app --example cms-sanity cms-sanity-app -``` - -```bash -pnpm create next-app --example cms-sanity cms-sanity-app -``` - -### Connect to a Sanity project - -Run this to select from your existing Sanity projects, or create a new one: - -```bash -(cd studio && npx @sanity/cli init) -``` - -The CLI will update [`sanity.json`] with the project ID and dataset name. - -### Set up environment variables - -Copy the [`.env.local.example`] file in this directory to `.env.local` (which will be ignored by Git): - -```bash -cp .env.local.example .env.local -``` - -Then set these variables in `.env.local`: - -- `NEXT_PUBLIC_SANITY_PROJECT_ID` should be the `projectId` value from [`sanity.json`]. -- `NEXT_PUBLIC_SANITY_DATASET` should be the `dataset` value from [`sanity.json`]. -- `SANITY_API_READ_TOKEN` create an API token with `read-only` permissions: - - Run this to open your project settings or go to https://manage.sanity.io/ and open your project: - ```bash - (cd studio && npx @sanity/cli manage) - ``` - - Go to **API** and the **Tokens** section at the bottom, launch its **Add API token** button. - - Name it `SANITY_API_READ_TOKEN`, set **Permissions** to `Viewer`. - - Hit **Save** and you can copy/paste the token. - -Your `.env.local` file should look like this: - -```bash -NEXT_PUBLIC_SANITY_PROJECT_ID=... -NEXT_PUBLIC_SANITY_DATASET=... -SANITY_API_READ_TOKEN=... -``` - -
- -## Step 2. Configure CORS for localhost - -Needed for live previewing unpublished/draft content. - -```bash -npm --prefix studio run cors:add -- http://localhost:3000 --credentials -``` - -## Step 3. Run Next.js locally in development mode +## Step 2. Run Next.js locally in development mode ```bash npm install && npm run dev @@ -157,6 +82,8 @@ yarn install && yarn dev Your blog should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions). +Note: This also installs dependencies for Sanity Studio as a post-install step. + ## Step 4. Populate content In another terminal start up the studio: @@ -167,6 +94,8 @@ npm run studio:dev Your studio should be up and running on [http://localhost:3333](http://localhost:3333)! +### Create content + Create content in Sanity Studio and live preview it in Next.js, side-by-side, by opening these URLs: - [`http://localhost:3333`](http://localhost:3333) @@ -216,7 +145,7 @@ We're all set to do some content creation! To exit Preview Mode, you can click on _"Click here to exit preview mode"_ at the top. -## Step 5. Deploy to production & use Preview Mode from anywhere +## Step 4. Deploy to production & use Preview Mode from anywhere ### If you didn't [Deploy with Vercel earlier](#step-1-set-up-the-environment) do so now @@ -317,7 +246,7 @@ npx vercel env add SANITY_STUDIO_PREVIEW_SECRET npx vercel --prod ``` -## Step 6. Deploy your Studio and publish from anywhere +## Step 5. Deploy your Studio and publish from anywhere Live previewing content is fun, but collaborating on content in real-time is next-level: @@ -344,7 +273,7 @@ Success! Studio deployed to https://cms-sanity.sanity.studio/ This snippet is stripped from verbose information, you'll see a lot of extra stuff in your terminal. -## Step 7. Setup Revalidation Webhook +## Step 6. Setup Revalidation Webhook Using GROQ Webhooks Next.js can rebuild pages that have changed content. It rebuilds so fast it can almost compete with Preview Mode. @@ -373,7 +302,7 @@ npx vercel --prod Wormhole into the [manager](https://manage.sanity.io/) by running: ```bash -(cd studio && npx @sanity/cli hook create) +(cd studio && npx sanity hook create) ``` - **Name** it "On-demand Revalidation". diff --git a/examples/cms-sanity/components/cover-image.js b/examples/cms-sanity/components/cover-image.js index 79cbbeaf97525..fa004df1bf8d2 100644 --- a/examples/cms-sanity/components/cover-image.js +++ b/examples/cms-sanity/components/cover-image.js @@ -12,7 +12,6 @@ export default function CoverImage({ title, slug, image: source, priority }) { > {`Cover +} diff --git a/examples/cms-sanity/components/landing.js b/examples/cms-sanity/components/landing.js new file mode 100644 index 0000000000000..f22b5a846c1ed --- /dev/null +++ b/examples/cms-sanity/components/landing.js @@ -0,0 +1,34 @@ +import Layout from './layout' +import Head from 'next/head' +import { CMS_NAME } from '../lib/constants' +import Container from './container' +import Intro from './intro' +import HeroPost from './hero-post' +import MoreStories from './more-stories' + +export default function Landing({ allPosts, preview }) { + const [heroPost, ...morePosts] = allPosts || [] + return ( + <> + + + {`Next.js Blog Example with ${CMS_NAME}`} + + + + {heroPost && ( + + )} + {morePosts.length > 0 && } + + + + ) +} diff --git a/examples/cms-sanity/components/more-stories.js b/examples/cms-sanity/components/more-stories.js index 57fdbb6c4659c..0587dbece2593 100644 --- a/examples/cms-sanity/components/more-stories.js +++ b/examples/cms-sanity/components/more-stories.js @@ -1,4 +1,4 @@ -import PostPreview from '../components/post-preview' +import PostPlug from './post-plug' export default function MoreStories({ posts }) { return ( @@ -8,7 +8,7 @@ export default function MoreStories({ posts }) {
{posts.map((post) => ( - +
+ +
+

+ + {title} + +

+
+ +
+

{excerpt}

+ {author && } +
+ ) +} diff --git a/examples/cms-sanity/components/post-preview.js b/examples/cms-sanity/components/post-preview.js index bd739db907919..adaf284988d17 100644 --- a/examples/cms-sanity/components/post-preview.js +++ b/examples/cms-sanity/components/post-preview.js @@ -1,31 +1,9 @@ -import Avatar from '../components/avatar' -import Date from '../components/date' -import CoverImage from './cover-image' -import Link from 'next/link' +import { usePreview } from '../lib/sanity' +import { postQuery } from '../lib/queries' +import Post from './post' -export default function PostPreview({ - title, - coverImage, - date, - excerpt, - author, - slug, -}) { - return ( -
-
- -
-

- - {title} - -

-
- -
-

{excerpt}

- {author && } -
- ) +export default function PostPreview({ data }) { + const slug = data?.post?.slug + const previewData = usePreview(null, postQuery, { slug }) + return } diff --git a/examples/cms-sanity/components/post.js b/examples/cms-sanity/components/post.js new file mode 100644 index 0000000000000..85275eafcb0db --- /dev/null +++ b/examples/cms-sanity/components/post.js @@ -0,0 +1,65 @@ +import { useRouter } from 'next/router' +import { urlForImage } from '../lib/sanity' +import ErrorPage from 'next/error' +import Layout from './layout' +import Container from './container' +import Header from './header' +import PostTitle from './post-title' +import Head from 'next/head' +import { CMS_NAME } from '../lib/constants' +import PostHeader from './post-header' +import PostBody from './post-body' +import SectionSeparator from './section-separator' +import MoreStories from './more-stories' + +export default function Post({ data = {}, preview = false }) { + const router = useRouter() + + const { post, morePosts } = data + const slug = post?.slug + + if (!router.isFallback && !slug) { + return + } + + return ( + + +
+ {router.isFallback ? ( + Loading… + ) : ( + <> +
+ + + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} + + {post.coverImage?.asset?._ref && ( + + )} + + + +
+ + {morePosts.length > 0 && } + + )} + + + ) +} diff --git a/examples/cms-sanity/lib/sanity.js b/examples/cms-sanity/lib/sanity.js index 1936305c132cf..c63007ffba8cb 100644 --- a/examples/cms-sanity/lib/sanity.js +++ b/examples/cms-sanity/lib/sanity.js @@ -1,5 +1,5 @@ import createImageUrlBuilder from '@sanity/image-url' -import { createPreviewSubscriptionHook } from 'next-sanity' +import { definePreview } from 'next-sanity/preview' import { sanityConfig } from './config' export const imageBuilder = createImageUrlBuilder(sanityConfig) @@ -7,5 +7,7 @@ export const imageBuilder = createImageUrlBuilder(sanityConfig) export const urlForImage = (source) => imageBuilder.image(source).auto('format').fit('max') -export const usePreviewSubscription = - createPreviewSubscriptionHook(sanityConfig) +export const usePreview = definePreview({ + projectId: sanityConfig.projectId, + dataset: sanityConfig.dataset, +}) diff --git a/examples/cms-sanity/package.json b/examples/cms-sanity/package.json index 07f9dc35ae96a..22addbb2a2a9b 100644 --- a/examples/cms-sanity/package.json +++ b/examples/cms-sanity/package.json @@ -8,19 +8,19 @@ "studio:deploy": "npx vercel env pull && npm --prefix studio run deploy" }, "dependencies": { - "@portabletext/react": "^1.0.6", - "@sanity/image-url": "^1.0.1", + "@portabletext/react": "^2.0.1", + "@sanity/image-url": "^1.0.2", "@sanity/webhook": "^2.0.0", "classnames": "^2.3.1", - "date-fns": "^2.29.1", + "date-fns": "^2.29.3", "next": "latest", - "next-sanity": "^0.6.0", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "next-sanity": "^4.1.2", + "react": "^18", + "react-dom": "^18" }, "devDependencies": { - "autoprefixer": "^10.4.8", - "postcss": "^8.4.14", - "tailwindcss": "^3.1.7" + "autoprefixer": "^10.4.13", + "postcss": "^8.4.21", + "tailwindcss": "^3.2.4" } } diff --git a/examples/cms-sanity/pages/index.js b/examples/cms-sanity/pages/index.js index bd9d90f62fe49..04104b659c4f5 100644 --- a/examples/cms-sanity/pages/index.js +++ b/examples/cms-sanity/pages/index.js @@ -1,43 +1,21 @@ -import Head from 'next/head' -import Container from '../components/container' -import MoreStories from '../components/more-stories' -import HeroPost from '../components/hero-post' -import Intro from '../components/intro' -import Layout from '../components/layout' -import { CMS_NAME } from '../lib/constants' import { indexQuery } from '../lib/queries' -import { usePreviewSubscription } from '../lib/sanity' import { getClient, overlayDrafts } from '../lib/sanity.server' +import { PreviewSuspense } from 'next-sanity/preview' +import { lazy } from 'react' +import Landing from '../components/landing' -export default function Index({ allPosts: initialAllPosts, preview }) { - const { data: allPosts } = usePreviewSubscription(indexQuery, { - initialData: initialAllPosts, - enabled: preview, - }) - const [heroPost, ...morePosts] = allPosts || [] - return ( - <> - - - Next.js Blog Example with {CMS_NAME} - - - - {heroPost && ( - - )} - {morePosts.length > 0 && } - - - - ) +const LandingPreview = lazy(() => import('../components/landing-preview')) + +export default function IndexPage({ allPosts, preview }) { + if (preview) { + return ( + + + + ) + } + + return } export async function getStaticProps({ preview = false }) { diff --git a/examples/cms-sanity/pages/posts/[slug].js b/examples/cms-sanity/pages/posts/[slug].js index 770b38bced458..a5db4e3013a8e 100644 --- a/examples/cms-sanity/pages/posts/[slug].js +++ b/examples/cms-sanity/pages/posts/[slug].js @@ -1,75 +1,21 @@ -import Head from 'next/head' -import { useRouter } from 'next/router' -import ErrorPage from 'next/error' -import Container from '../../components/container' -import PostBody from '../../components/post-body' -import MoreStories from '../../components/more-stories' -import Header from '../../components/header' -import PostHeader from '../../components/post-header' -import SectionSeparator from '../../components/section-separator' -import Layout from '../../components/layout' -import PostTitle from '../../components/post-title' -import { CMS_NAME } from '../../lib/constants' +import { lazy } from 'react' +import { PreviewSuspense } from 'next-sanity/preview' import { postQuery, postSlugsQuery } from '../../lib/queries' -import { urlForImage, usePreviewSubscription } from '../../lib/sanity' -import { sanityClient, getClient, overlayDrafts } from '../../lib/sanity.server' +import { getClient, overlayDrafts, sanityClient } from '../../lib/sanity.server' +import Post from '../../components/post' -export default function Post({ data = {}, preview }) { - const router = useRouter() +const PostPreview = lazy(() => import('../../components/post-preview')) - const slug = data?.post?.slug - const { - data: { post, morePosts }, - } = usePreviewSubscription(postQuery, { - params: { slug }, - initialData: data, - enabled: preview && slug, - }) - - if (!router.isFallback && !slug) { - return +export default function PostPage({ preview, data }) { + if (preview) { + return ( + + + + ) } - return ( - - -
- {router.isFallback ? ( - Loading… - ) : ( - <> -
- - - {post.title} | Next.js Blog Example with {CMS_NAME} - - {post.coverImage?.asset?._ref && ( - - )} - - - -
- - {morePosts.length > 0 && } - - )} - - - ) + return } export async function getStaticProps({ params, preview = false }) { diff --git a/examples/cms-sanity/studio/.gitignore b/examples/cms-sanity/studio/.gitignore index 438b08970e501..d620205eda6ce 100644 --- a/examples/cms-sanity/studio/.gitignore +++ b/examples/cms-sanity/studio/.gitignore @@ -29,4 +29,6 @@ yarn-error.log* # typescript *.tsbuildinfo -next-env.d.ts \ No newline at end of file +next-env.d.ts + +.sanity diff --git a/examples/cms-sanity/studio/config/.checksums b/examples/cms-sanity/studio/config/.checksums deleted file mode 100644 index 96f7d5007658f..0000000000000 --- a/examples/cms-sanity/studio/config/.checksums +++ /dev/null @@ -1,8 +0,0 @@ -{ - "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!", - "@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea", - "@sanity/default-login": "e2ed4e51e97331c0699ba7cf9f67cbf76f1c6a5f806d6eabf8259b2bcb5f1002", - "@sanity/form-builder": "b38478227ba5e22c91981da4b53436df22e48ff25238a55a973ed620be5068aa", - "@sanity/data-aspects": "d199e2c199b3e26cd28b68dc84d7fc01c9186bf5089580f2e2446994d36b3cb6", - "@sanity/vision": "da5b6ed712703ecd04bf4df560570c668aa95252c6bc1c41d6df1bda9b8b8f60" -} diff --git a/examples/cms-sanity/studio/config/@sanity/data-aspects.json b/examples/cms-sanity/studio/config/@sanity/data-aspects.json deleted file mode 100644 index d64838e727e98..0000000000000 --- a/examples/cms-sanity/studio/config/@sanity/data-aspects.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "listOptions": {} -} diff --git a/examples/cms-sanity/studio/config/@sanity/default-layout.json b/examples/cms-sanity/studio/config/@sanity/default-layout.json deleted file mode 100644 index 4d8b87f4d5245..0000000000000 --- a/examples/cms-sanity/studio/config/@sanity/default-layout.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "toolSwitcher": { - "order": [], - "hidden": [] - } -} diff --git a/examples/cms-sanity/studio/config/@sanity/default-login.json b/examples/cms-sanity/studio/config/@sanity/default-login.json deleted file mode 100644 index c5d12e3221db6..0000000000000 --- a/examples/cms-sanity/studio/config/@sanity/default-login.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "providers": { - "mode": "append", - "redirectOnSingle": false, - "entries": [] - }, - "loginMethod": "dual" -} diff --git a/examples/cms-sanity/studio/config/@sanity/form-builder.json b/examples/cms-sanity/studio/config/@sanity/form-builder.json deleted file mode 100644 index b97a6a6d9d7de..0000000000000 --- a/examples/cms-sanity/studio/config/@sanity/form-builder.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "images": { - "directUploads": true - } -} diff --git a/examples/cms-sanity/studio/config/@sanity/vision.json b/examples/cms-sanity/studio/config/@sanity/vision.json deleted file mode 100644 index f9bc5058e147d..0000000000000 --- a/examples/cms-sanity/studio/config/@sanity/vision.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "defaultApiVersion": "2022-03-13" -} diff --git a/examples/cms-sanity/studio/package.json b/examples/cms-sanity/studio/package.json index 26439bdaa05bb..b2c275cbfba2c 100644 --- a/examples/cms-sanity/studio/package.json +++ b/examples/cms-sanity/studio/package.json @@ -1,26 +1,27 @@ { "private": true, "scripts": { - "start": "npx @sanity/cli start", - "deploy": "npx @sanity/cli deploy", - "cors:add": "npx @sanity/cli cors add", + "start": "sanity dev", + "dev": "sanity dev", + "build": "sanity build", + "cors:add": "npx sanity cors add", + "deploy": "sanity deploy", "prestart": "npm run env", - "precors:add": "npm run env", "predeploy": "npm run env", - "env": "npx @sanity/cli install && cp ../.env .env.development || cp ../.env.local .env.development" + "env": "cp ../.env .env.development || cp ../.env.local .env.development" }, "dependencies": { - "@sanity/base": "^2.30.1", - "@sanity/core": "^2.30.2", - "@sanity/default-layout": "^2.30.1", - "@sanity/default-login": "^2.30.1", - "@sanity/desk-tool": "^2.30.1", - "@sanity/production-preview": "2.29.3", - "@sanity/vision": "^2.30.1", + "sanity": "^3.2.6", + "@sanity/vision": "^3.2.6", "prop-types": "^15.7", - "react": "^17.0", - "react-dom": "^17.0", - "sanity-plugin-asset-source-unsplash": "0.2.1", + "react": "^18", + "react-dom": "^18", + "sanity-plugin-asset-source-unsplash": "^1.0.6", "styled-components": "^5.2.0" + }, + "devDependencies": { + "autoprefixer": "^10.4.13", + "postcss": "^8.4.21", + "tailwindcss": "^3.2.4" } } diff --git a/examples/cms-sanity/studio/resolveProductionUrl.js b/examples/cms-sanity/studio/resolveProductionUrl.js index 72314b9d27cc8..db1b5e86ee0eb 100644 --- a/examples/cms-sanity/studio/resolveProductionUrl.js +++ b/examples/cms-sanity/studio/resolveProductionUrl.js @@ -1,18 +1,18 @@ let productionUrl try { productionUrl = new URL( - process.env.SANITY_STUDIO_PREVIEW_URL || 'http://localhost:3000' + import.meta.env.SANITY_STUDIO_PREVIEW_URL || 'http://localhost:3000' ) } catch (err) { console.error('Invalid productionUrl', err) } -export default function resolveProductionUrl(document) { +export function resolveProductionUrl(prev, { document }) { if (!productionUrl || !document.slug?.current) { - return false + return prev } const searchParams = new URLSearchParams() - searchParams.set('secret', process.env.SANITY_STUDIO_PREVIEW_SECRET || '') + searchParams.set('secret', import.meta.env.SANITY_STUDIO_PREVIEW_SECRET || '') searchParams.set('slug', document.slug.current) return `${productionUrl.origin}/api/preview?${searchParams}` } diff --git a/examples/cms-sanity/studio/sanity.cli.js b/examples/cms-sanity/studio/sanity.cli.js new file mode 100644 index 0000000000000..9e83299eb35ec --- /dev/null +++ b/examples/cms-sanity/studio/sanity.cli.js @@ -0,0 +1,18 @@ +import { loadEnvConfig } from '@next/env' +import { defineCliConfig } from 'sanity/cli' + +const dev = process.env.NODE_ENV !== 'production' +loadEnvConfig(__dirname, dev, { info: () => null, error: console.error }) + +const projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID +const dataset = process.env.NEXT_PUBLIC_SANITY_DATASET + +export default defineCliConfig({ + api: { projectId, dataset }, + vite: (config) => { + return { + ...config, + envPrefix: ['NEXT_', 'SANITY_STUDIO_', 'VITE_'], + } + }, +}) diff --git a/examples/cms-sanity/studio/sanity.config.js b/examples/cms-sanity/studio/sanity.config.js new file mode 100644 index 0000000000000..b7276baac940b --- /dev/null +++ b/examples/cms-sanity/studio/sanity.config.js @@ -0,0 +1,36 @@ +import { visionTool } from '@sanity/vision' +import { defineConfig } from 'sanity' +import { deskTool } from 'sanity/desk' +import { unsplashImageAsset } from 'sanity-plugin-asset-source-unsplash' + +import { resolveProductionUrl } from './resolveProductionUrl' +import { author } from './schemas/author' +import { post } from './schemas/post' + +const title = + import.meta.env.NEXT_PUBLIC_SANITY_PROJECT_TITLE || + 'Next.js Blog with Sanity.io' +const projectId = import.meta.env.NEXT_PUBLIC_SANITY_PROJECT_ID +const dataset = import.meta.env.NEXT_PUBLIC_SANITY_DATASET + +export default defineConfig({ + basePath: '/', + projectId: projectId || '', + dataset: dataset || '', + title, + schema: { + // If you want more content types, you can add them to this array + types: [author, post], + }, + document: { + productionUrl: resolveProductionUrl, + }, + plugins: [ + deskTool({}), + // Add an image asset source for Unsplash + unsplashImageAsset(), + // Vision lets you query your content with GROQ in the studio + // https://www.sanity.io/docs/the-vision-plugin + visionTool(), + ], +}) diff --git a/examples/cms-sanity/studio/sanity.json b/examples/cms-sanity/studio/sanity.json deleted file mode 100644 index 955ce5d6ed88c..0000000000000 --- a/examples/cms-sanity/studio/sanity.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "root": true, - "project": { - "name": "Blog" - }, - "plugins": [ - "@sanity/base", - "@sanity/default-layout", - "@sanity/default-login", - "@sanity/desk-tool", - "asset-source-unsplash", - "@sanity/production-preview" - ], - "env": { - "development": { - "plugins": ["@sanity/vision"] - } - }, - "parts": [ - { - "name": "part:@sanity/base/schema", - "path": "./schemas/schema" - }, - { - "implements": "part:@sanity/production-preview/resolve-production-url", - "path": "./resolveProductionUrl.js" - } - ] -} diff --git a/examples/cms-sanity/studio/schemas/author.js b/examples/cms-sanity/studio/schemas/author.js index 082779bea7d5a..8bfa6ecee4177 100644 --- a/examples/cms-sanity/studio/schemas/author.js +++ b/examples/cms-sanity/studio/schemas/author.js @@ -1,4 +1,4 @@ -export default { +export const author = { name: 'author', title: 'Author', type: 'document', diff --git a/examples/cms-sanity/studio/schemas/post.js b/examples/cms-sanity/studio/schemas/post.js index 02639b02a1cce..ccb406df2dce5 100644 --- a/examples/cms-sanity/studio/schemas/post.js +++ b/examples/cms-sanity/studio/schemas/post.js @@ -1,4 +1,4 @@ -export default { +export const post = { name: 'post', title: 'Post', type: 'document', diff --git a/examples/cms-sanity/studio/schemas/schema.js b/examples/cms-sanity/studio/schemas/schema.js deleted file mode 100644 index 2972a54b252dd..0000000000000 --- a/examples/cms-sanity/studio/schemas/schema.js +++ /dev/null @@ -1,23 +0,0 @@ -// First, we must import the schema creator -import createSchema from 'part:@sanity/base/schema-creator' - -// Then import schema types from any plugins that might expose them -import schemaTypes from 'all:part:@sanity/base/schema-type' - -// We import object and document schemas -// import blockContent from './blockContent' -import post from './post' -import author from './author' - -// Then we give our schema to the builder and provide the result to Sanity -export default createSchema({ - // We name our schema - name: 'default', - // Then proceed to concatenate our document type - // to the ones provided by any plugins that are installed - types: schemaTypes.concat([ - /* Your types here! */ - post, - author, - ]), -}) diff --git a/examples/cms-sanity/studio/tailwind.config.js b/examples/cms-sanity/studio/tailwind.config.js new file mode 100644 index 0000000000000..d8f8322c9e38f --- /dev/null +++ b/examples/cms-sanity/studio/tailwind.config.js @@ -0,0 +1,6 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./components/**/*.{js,ts,jsx,tsx}'], + theme: {}, + plugins: [], +} diff --git a/examples/cms-sanity/studio/tsconfig.json b/examples/cms-sanity/studio/tsconfig.json deleted file mode 100644 index d48e7dbf164f1..0000000000000 --- a/examples/cms-sanity/studio/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - // Note: This config is only used to help editors like VS Code understand/resolve - // parts, the actual transpilation is done by babel. Any compiler configuration in - // here will be ignored. - "include": [ - "./node_modules/@sanity/base/types/**/*.ts", - "./**/*.ts", - "./**/*.tsx" - ] -} diff --git a/examples/cms-sitefinity/pages/index.tsx b/examples/cms-sitefinity/pages/index.tsx index dbeaf7fb15366..aeb579d3a7ceb 100644 --- a/examples/cms-sitefinity/pages/index.tsx +++ b/examples/cms-sitefinity/pages/index.tsx @@ -19,7 +19,7 @@ export default function Index({ allPosts }: Props) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-sitefinity/pages/posts/[...slug].tsx b/examples/cms-sitefinity/pages/posts/[...slug].tsx index 941fda951775e..222b07a29d87c 100644 --- a/examples/cms-sitefinity/pages/posts/[...slug].tsx +++ b/examples/cms-sitefinity/pages/posts/[...slug].tsx @@ -33,7 +33,7 @@ export default function Post({ post, morePosts, preview }: Props) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-storyblok/pages/index.js b/examples/cms-storyblok/pages/index.js index 91b73e63edb0b..0f6be0d1a04ef 100644 --- a/examples/cms-storyblok/pages/index.js +++ b/examples/cms-storyblok/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ allPosts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-takeshape/pages/index.js b/examples/cms-takeshape/pages/index.js index 3ab6cd1f1712b..b0dec690f3d49 100644 --- a/examples/cms-takeshape/pages/index.js +++ b/examples/cms-takeshape/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ allPosts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-takeshape/pages/posts/[slug].js b/examples/cms-takeshape/pages/posts/[slug].js index b546d4e918ab8..8d71e7527327d 100644 --- a/examples/cms-takeshape/pages/posts/[slug].js +++ b/examples/cms-takeshape/pages/posts/[slug].js @@ -30,7 +30,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-tina/pages/posts/[slug].js b/examples/cms-tina/pages/posts/[slug].js index 83a1fb464af45..d6498c61c310f 100644 --- a/examples/cms-tina/pages/posts/[slug].js +++ b/examples/cms-tina/pages/posts/[slug].js @@ -27,7 +27,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-umbraco-heartcore/pages/[...slug].js b/examples/cms-umbraco-heartcore/pages/[...slug].js index 98a3b00c09467..87671dfaff857 100755 --- a/examples/cms-umbraco-heartcore/pages/[...slug].js +++ b/examples/cms-umbraco-heartcore/pages/[...slug].js @@ -30,7 +30,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} {} diff --git a/examples/cms-umbraco-heartcore/pages/index.js b/examples/cms-umbraco-heartcore/pages/index.js index 2de8b19465162..c650245c5d1ba 100755 --- a/examples/cms-umbraco-heartcore/pages/index.js +++ b/examples/cms-umbraco-heartcore/pages/index.js @@ -14,7 +14,7 @@ export default function Index({ posts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-webiny/pages/index.tsx b/examples/cms-webiny/pages/index.tsx index f3b0bb45062c4..ecb81ca5c9da9 100644 --- a/examples/cms-webiny/pages/index.tsx +++ b/examples/cms-webiny/pages/index.tsx @@ -14,7 +14,7 @@ export default function Index({ allPosts, preview }) { <> - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-webiny/pages/posts/[slug].tsx b/examples/cms-webiny/pages/posts/[slug].tsx index 20a0ccb41b8c9..737b70b1f08d6 100644 --- a/examples/cms-webiny/pages/posts/[slug].tsx +++ b/examples/cms-webiny/pages/posts/[slug].tsx @@ -28,7 +28,7 @@ export default function Post({ post, morePosts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-wordpress/pages/index.tsx b/examples/cms-wordpress/pages/index.tsx index 7d5f623210ab1..bc8d9c5500b57 100644 --- a/examples/cms-wordpress/pages/index.tsx +++ b/examples/cms-wordpress/pages/index.tsx @@ -15,7 +15,7 @@ export default function Index({ allPosts: { edges }, preview }) { return ( - Next.js Blog Example with {CMS_NAME} + {`Next.js Blog Example with ${CMS_NAME}`} diff --git a/examples/cms-wordpress/pages/posts/[slug].tsx b/examples/cms-wordpress/pages/posts/[slug].tsx index 56d6176386272..a95dae358baf4 100644 --- a/examples/cms-wordpress/pages/posts/[slug].tsx +++ b/examples/cms-wordpress/pages/posts/[slug].tsx @@ -33,7 +33,7 @@ export default function Post({ post, posts, preview }) {
- {post.title} | Next.js Blog Example with {CMS_NAME} + {`${post.title} | Next.js Blog Example with ${CMS_NAME}`} { - return neo4jgraphql(parent, args, context, resolveInfo) - }, - getMovie: (parent, args, context, resolveInfo) => { - return neo4jgraphql(parent, args, context, resolveInfo) - }, - getActor: (parent, args, context, resolveInfo) => { - return neo4jgraphql(parent, args, context, resolveInfo) - }, - }, -} diff --git a/examples/with-apollo-neo4j-graphql/apollo/schema.js b/examples/with-apollo-neo4j-graphql/apollo/schema.js deleted file mode 100644 index 77bcc35b2bdcb..0000000000000 --- a/examples/with-apollo-neo4j-graphql/apollo/schema.js +++ /dev/null @@ -1,11 +0,0 @@ -import { makeAugmentedSchema } from 'neo4j-graphql-js' -import typeDefs from './type-defs' -import resolvers from './resolvers' - -export default makeAugmentedSchema({ - typeDefs, - resolvers, - config: { - mutation: false, - }, -}) diff --git a/examples/with-apollo-neo4j-graphql/apollo/schema.ts b/examples/with-apollo-neo4j-graphql/apollo/schema.ts new file mode 100644 index 0000000000000..916531c474fd7 --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/apollo/schema.ts @@ -0,0 +1,10 @@ +import { Neo4jGraphQL } from '@neo4j/graphql' +import typeDefs from './type-defs' +import getDriver from '../util/neo4j' + +const driver = getDriver() + +export const neoSchema = new Neo4jGraphQL({ + typeDefs, + driver, +}) diff --git a/examples/with-apollo-neo4j-graphql/apollo/type-defs.js b/examples/with-apollo-neo4j-graphql/apollo/type-defs.js deleted file mode 100644 index ad6c49b1954d2..0000000000000 --- a/examples/with-apollo-neo4j-graphql/apollo/type-defs.js +++ /dev/null @@ -1,23 +0,0 @@ -import { gql } from '@apollo/client' - -export default gql` - type Movie { - title: String - tagline: String - released: String - actors: [Person] @relation(name: "ACTED_IN", direction: "IN") - directors: [Person] @relation(name: "DIRECTED", direction: "IN") - } - - type Person { - name: String - born: Int - movies: [Movie] @relation(name: "ACTED_IN", direction: "OUT") - } - - type Query { - getMovies: [Movie] - getMovie: Movie - getActor: Person - } -` diff --git a/examples/with-apollo-neo4j-graphql/apollo/type-defs.ts b/examples/with-apollo-neo4j-graphql/apollo/type-defs.ts new file mode 100644 index 0000000000000..f8cf4f8271e7f --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/apollo/type-defs.ts @@ -0,0 +1,17 @@ +import { gql } from '@apollo/client' + +export default gql` + type Movie { + title: String + tagline: String + released: Int + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + directors: [Person!]! @relationship(type: "DIRECTED", direction: IN) + } + + type Person { + name: String + born: Int + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } +` diff --git a/examples/with-apollo-neo4j-graphql/components/footer.js b/examples/with-apollo-neo4j-graphql/components/footer.tsx similarity index 100% rename from examples/with-apollo-neo4j-graphql/components/footer.js rename to examples/with-apollo-neo4j-graphql/components/footer.tsx diff --git a/examples/with-apollo-neo4j-graphql/components/header.js b/examples/with-apollo-neo4j-graphql/components/header.tsx similarity index 90% rename from examples/with-apollo-neo4j-graphql/components/header.js rename to examples/with-apollo-neo4j-graphql/components/header.tsx index 145c93b79ef3b..e6235dd9b1dcc 100644 --- a/examples/with-apollo-neo4j-graphql/components/header.js +++ b/examples/with-apollo-neo4j-graphql/components/header.tsx @@ -1,4 +1,4 @@ -export default function Header({ title }) { +export default function Header({ title }: { title?: string | string[] }) { return (

diff --git a/examples/with-apollo-neo4j-graphql/next.config.js b/examples/with-apollo-neo4j-graphql/next.config.js new file mode 100644 index 0000000000000..8b71f62400168 --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/next.config.js @@ -0,0 +1,13 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + webpack: (config) => { + // this will override the experiments + config.experiments = { ...config.experiments, topLevelAwait: true } + // this will just update topLevelAwait property of config.experiments + // config.experiments.topLevelAwait = true + return config + }, +} + +module.exports = nextConfig diff --git a/examples/with-apollo-neo4j-graphql/package.json b/examples/with-apollo-neo4j-graphql/package.json index 4b262081ed86a..4b5f277b43e25 100644 --- a/examples/with-apollo-neo4j-graphql/package.json +++ b/examples/with-apollo-neo4j-graphql/package.json @@ -6,12 +6,13 @@ "start": "next start" }, "dependencies": { - "@apollo/client": "^3.2.7", - "apollo-server-micro": "^2.19.0", - "deepmerge": "4.2.2", - "graphql": "14.2.1", - "neo4j-driver": "^4.2.1", - "neo4j-graphql-js": "^2.17.1", + "@apollo/client": "^3.7.3", + "@apollo/server": "^4.3.0", + "@as-integrations/next": "^1.2.0", + "@neo4j/graphql": "^3.14.1", + "deepmerge": "^4.2.2", + "graphql": "^16.6.0", + "neo4j-driver": "^5.3.0", "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/with-apollo-neo4j-graphql/pages/_app.js b/examples/with-apollo-neo4j-graphql/pages/_app.tsx similarity index 62% rename from examples/with-apollo-neo4j-graphql/pages/_app.js rename to examples/with-apollo-neo4j-graphql/pages/_app.tsx index 8a545e35648da..4d82196930e93 100644 --- a/examples/with-apollo-neo4j-graphql/pages/_app.js +++ b/examples/with-apollo-neo4j-graphql/pages/_app.tsx @@ -1,15 +1,13 @@ +import '../styles/globals.css' import { ApolloProvider } from '@apollo/client' import { useApollo } from '../apollo/client' -import globalStyles from '../styles/global' +import type { AppProps } from 'next/app' -export default function MyApp({ Component, pageProps }) { +export default function MyApp({ Component, pageProps }: AppProps) { const apolloClient = useApollo(pageProps.initialApolloState) return ( - ) } diff --git a/examples/with-apollo-neo4j-graphql/pages/actor/[name].js b/examples/with-apollo-neo4j-graphql/pages/actor/[name].tsx similarity index 89% rename from examples/with-apollo-neo4j-graphql/pages/actor/[name].js rename to examples/with-apollo-neo4j-graphql/pages/actor/[name].tsx index 32dd57bf428cf..5330f83756343 100644 --- a/examples/with-apollo-neo4j-graphql/pages/actor/[name].js +++ b/examples/with-apollo-neo4j-graphql/pages/actor/[name].tsx @@ -4,10 +4,11 @@ import { useRouter } from 'next/router' import { gql, useQuery } from '@apollo/client' import Header from '../../components/header' import Footer from '../../components/footer' +import { Actors } from '../../types' const GET_ACTOR = gql` query GetActor($actorName: String) { - getActor(filter: { name: $actorName }) { + people(where: { name: $actorName }) { name born movies { @@ -20,8 +21,8 @@ const GET_ACTOR = gql` export default function Actor() { const router = useRouter() const { name } = router.query - const { loading, error, data } = useQuery(GET_ACTOR, { - actorName: name, + const { loading, error, data } = useQuery<{ people: Actors }>(GET_ACTOR, { + variables: { actorName: name }, }) if (loading) return 'Loading...' @@ -42,12 +43,12 @@ export default function Actor() {

Information

Born: - {data.getActor.born} + {data.people[0].born}

Movies

- {data.getActor.movies.map((movie) => ( + {data.people[0].movies.map((movie) => (
{ - return { - driver, - ...ctx, - } - }, -}) - -export const config = { - api: { - bodyParser: false, - }, -} - -export default apolloServer.createHandler({ path: '/api/graphql' }) diff --git a/examples/with-apollo-neo4j-graphql/pages/api/graphql.ts b/examples/with-apollo-neo4j-graphql/pages/api/graphql.ts new file mode 100644 index 0000000000000..d22a0ea196068 --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/pages/api/graphql.ts @@ -0,0 +1,10 @@ +import { ApolloServer } from '@apollo/server' +import { startServerAndCreateNextHandler } from '@as-integrations/next' +import { neoSchema } from '../../apollo/schema' + +const server = async (): Promise => { + const schema = await neoSchema.getSchema() + return new ApolloServer({ schema }) +} + +export default startServerAndCreateNextHandler(await server()) diff --git a/examples/with-apollo-neo4j-graphql/pages/index.js b/examples/with-apollo-neo4j-graphql/pages/index.tsx similarity index 95% rename from examples/with-apollo-neo4j-graphql/pages/index.js rename to examples/with-apollo-neo4j-graphql/pages/index.tsx index 1086bc241c624..1842e3d44bbb9 100644 --- a/examples/with-apollo-neo4j-graphql/pages/index.js +++ b/examples/with-apollo-neo4j-graphql/pages/index.tsx @@ -3,10 +3,11 @@ import Link from 'next/link' import { gql, useQuery } from '@apollo/client' import Header from '../components/header' import Footer from '../components/footer' +import type { Movies } from '../types' const GET_MOVIES = gql` query GetMovies { - getMovies { + movies { title tagline released @@ -21,7 +22,7 @@ const GET_MOVIES = gql` ` export default function Home() { - const { loading, error, data } = useQuery(GET_MOVIES) + const { loading, error, data } = useQuery<{ movies: Movies }>(GET_MOVIES) if (loading) return 'Loading...' if (error) return `Error! ${error.message}` @@ -53,7 +54,7 @@ export default function Home() { - {data.getMovies.map((movie, index) => ( + {data.movies.map((movie, index) => ( {index + 1} diff --git a/examples/with-apollo-neo4j-graphql/pages/movie/[title].js b/examples/with-apollo-neo4j-graphql/pages/movie/[title].tsx similarity index 85% rename from examples/with-apollo-neo4j-graphql/pages/movie/[title].js rename to examples/with-apollo-neo4j-graphql/pages/movie/[title].tsx index 4916ac5a29b4c..e1b0999b7e4f6 100644 --- a/examples/with-apollo-neo4j-graphql/pages/movie/[title].js +++ b/examples/with-apollo-neo4j-graphql/pages/movie/[title].tsx @@ -4,10 +4,11 @@ import { useRouter } from 'next/router' import { gql, useQuery } from '@apollo/client' import Header from '../../components/header' import Footer from '../../components/footer' +import type { Movies } from '../../types' const GET_MOVIE = gql` query GetMovie($movieTitle: String) { - getMovie(filter: { title: $movieTitle }) { + movies(where: { title: $movieTitle }) { title tagline released @@ -24,8 +25,8 @@ const GET_MOVIE = gql` export default function Movie() { const router = useRouter() const { title } = router.query - const { loading, error, data } = useQuery(GET_MOVIE, { - movieTitle: title, + const { loading, error, data } = useQuery<{ movies: Movies }>(GET_MOVIE, { + variables: { movieTitle: title }, }) if (loading) return 'Loading...' @@ -46,22 +47,22 @@ export default function Movie() {

Information

Tagline: - {data.getMovie.tagline} + {data.movies[0].tagline}
Released: - {data.getMovie.released} + {data.movies[0].released}

Actors

- {data.getMovie.actors.map((actor) => ( + {data.movies[0].actors.map((actor) => (
{actor.name}
))}

Directors

- {data.getMovie.directors.map((director) => ( + {data.movies[0].directors.map((director) => (
{director.name}
))}
diff --git a/examples/with-apollo-neo4j-graphql/styles/global.js b/examples/with-apollo-neo4j-graphql/styles/global.js deleted file mode 100644 index 8121d0c48f469..0000000000000 --- a/examples/with-apollo-neo4j-graphql/styles/global.js +++ /dev/null @@ -1,18 +0,0 @@ -import css from 'styled-jsx/css' - -export default css.global` - html, - body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; - } - * { - box-sizing: border-box; - } - a { - color: inherit; - text-decoration: none; - } -` diff --git a/examples/with-apollo-neo4j-graphql/styles/globals.css b/examples/with-apollo-neo4j-graphql/styles/globals.css new file mode 100644 index 0000000000000..e5e2dcc23baf1 --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/styles/globals.css @@ -0,0 +1,16 @@ +html, +body { + padding: 0; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; +} + +a { + color: inherit; + text-decoration: none; +} + +* { + box-sizing: border-box; +} diff --git a/examples/with-apollo-neo4j-graphql/tsconfig.json b/examples/with-apollo-neo4j-graphql/tsconfig.json new file mode 100644 index 0000000000000..1563f3e878573 --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "incremental": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve" + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] +} diff --git a/examples/with-apollo-neo4j-graphql/types/index.ts b/examples/with-apollo-neo4j-graphql/types/index.ts new file mode 100644 index 0000000000000..30207a61dfdd0 --- /dev/null +++ b/examples/with-apollo-neo4j-graphql/types/index.ts @@ -0,0 +1,19 @@ +interface Person { + name: string + born: number + movies: Movies +} + +interface Movie { + title: string + tagline: string + released: number + actors: Actors + directors: Directors +} + +export type Movies = Partial[] + +export type Actors = Partial[] + +export type Directors = Partial[] diff --git a/examples/with-apollo-neo4j-graphql/util/neo4j.js b/examples/with-apollo-neo4j-graphql/util/neo4j.ts similarity index 85% rename from examples/with-apollo-neo4j-graphql/util/neo4j.js rename to examples/with-apollo-neo4j-graphql/util/neo4j.ts index 18ad7163fec5a..db7a3f3d25cb7 100644 --- a/examples/with-apollo-neo4j-graphql/util/neo4j.js +++ b/examples/with-apollo-neo4j-graphql/util/neo4j.ts @@ -1,6 +1,7 @@ import neo4j from 'neo4j-driver' +import type { Driver } from 'neo4j-driver' -let driver +let driver: Driver const defaultOptions = { uri: process.env.NEO4J_URI, diff --git a/examples/with-knex/pages/index.js b/examples/with-knex/pages/index.js index a7cbf37c32a2d..28b4c1b042e4f 100644 --- a/examples/with-knex/pages/index.js +++ b/examples/with-knex/pages/index.js @@ -29,7 +29,7 @@ export default function Home() { {todos && todos.map((todo) => { return ( -

+

{todo.text} {todo.done && '(complete)'}

) diff --git a/examples/with-opentelemetry/.gitignore b/examples/with-opentelemetry/.gitignore new file mode 100644 index 0000000000000..c87c9b392c020 --- /dev/null +++ b/examples/with-opentelemetry/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/with-opentelemetry/.vscode/settings.json b/examples/with-opentelemetry/.vscode/settings.json new file mode 100644 index 0000000000000..87e57c9a65f37 --- /dev/null +++ b/examples/with-opentelemetry/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "typescript.tsdk": "../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true +} diff --git a/examples/with-opentelemetry/README.md b/examples/with-opentelemetry/README.md new file mode 100644 index 0000000000000..b3adf6aef5fbf --- /dev/null +++ b/examples/with-opentelemetry/README.md @@ -0,0 +1,30 @@ +# Data fetch example + +Next.js was conceived to make it easy to create universal apps. That's why fetching data +on the server and the client when necessary is so easy with Next.js. + +By using `getStaticProps` Next.js will fetch data at build time from a page, and pre-render the page to static assets. + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/data-fetch) + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/data-fetch&project-name=data-fetch&repository-name=data-fetch) + +## How to use + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: + +```bash +npx create-next-app --example data-fetch data-fetch-app +``` + +```bash +yarn create next-app --example data-fetch data-fetch-app +``` + +```bash +pnpm create next-app --example data-fetch data-fetch-app +``` + +Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-opentelemetry/app/layout.tsx b/examples/with-opentelemetry/app/layout.tsx new file mode 100644 index 0000000000000..495209746f3ff --- /dev/null +++ b/examples/with-opentelemetry/app/layout.tsx @@ -0,0 +1,12 @@ +export default function Layout({ children }) { + return ( + + + Next.js with OpenTelemetry + + +
{children}
+ + + ) +} diff --git a/examples/with-opentelemetry/app/page.tsx b/examples/with-opentelemetry/app/page.tsx new file mode 100644 index 0000000000000..cc9d3dd67267e --- /dev/null +++ b/examples/with-opentelemetry/app/page.tsx @@ -0,0 +1,12 @@ +import Link from 'next/link' +import { fetchGithubStars } from '../shared/fetch-github-stars' + +export default async function Page() { + const stars = await fetchGithubStars() + return ( + <> +

Next.js has {stars} ⭐️

+ How about preact? + + ) +} diff --git a/examples/with-opentelemetry/instrumentation.js b/examples/with-opentelemetry/instrumentation.js new file mode 100644 index 0000000000000..f914d1bcb2fb5 --- /dev/null +++ b/examples/with-opentelemetry/instrumentation.js @@ -0,0 +1,23 @@ +export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + const opentelemetry = require('@opentelemetry/sdk-node') + const { + OTLPTraceExporter, + } = require('@opentelemetry/exporter-trace-otlp-http') + const { Resource } = require('@opentelemetry/resources') + const { + SemanticResourceAttributes, + } = require('@opentelemetry/semantic-conventions') + + const sdk = new opentelemetry.NodeSDK({ + traceExporter: new OTLPTraceExporter({}), + instrumentations: [], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: 'my-next-app', + [SemanticResourceAttributes.SERVICE_VERSION]: '1.0.0', + }), + }) + + sdk.start() + } +} diff --git a/examples/with-opentelemetry/next.config.js b/examples/with-opentelemetry/next.config.js new file mode 100644 index 0000000000000..2c7924dfb80c7 --- /dev/null +++ b/examples/with-opentelemetry/next.config.js @@ -0,0 +1,6 @@ +module.exports = { + experimental: { + instrumentationHook: true, + appDir: true, + }, +} diff --git a/examples/with-opentelemetry/package.json b/examples/with-opentelemetry/package.json new file mode 100644 index 0000000000000..4f66a4f90618b --- /dev/null +++ b/examples/with-opentelemetry/package.json @@ -0,0 +1,28 @@ +{ + "private": true, + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start", + "start:otel-verbose": "NEXT_OTEL_VERBOSE=1 next start" + }, + "dependencies": { + "@opentelemetry/api": "1.4.0", + "@opentelemetry/auto-instrumentations-node": "0.36.3", + "@opentelemetry/exporter-trace-otlp-grpc": "0.35.1", + "@opentelemetry/exporter-trace-otlp-http": "0.35.1", + "@opentelemetry/instrumentation-fetch": "0.35.1", + "@opentelemetry/resources": "1.9.1", + "@opentelemetry/sdk-node": "0.35.1", + "@opentelemetry/sdk-trace-base": "1.9.1", + "@opentelemetry/semantic-conventions": "1.9.1", + "next": "latest", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/node": "18.7.11", + "@types/react": "18.0.17", + "typescript": "4.7.4" + } +} diff --git a/examples/with-opentelemetry/pages/api/github-stars.ts b/examples/with-opentelemetry/pages/api/github-stars.ts new file mode 100644 index 0000000000000..5d144e9be55b6 --- /dev/null +++ b/examples/with-opentelemetry/pages/api/github-stars.ts @@ -0,0 +1,11 @@ +// hello world api route +import { NextApiRequest, NextApiResponse } from 'next' +import { fetchGithubStars } from '../../shared/fetch-github-stars' + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse +) { + const stars = await fetchGithubStars() + res.status(200).json({ stars }) +} diff --git a/examples/with-opentelemetry/pages/legacy.tsx b/examples/with-opentelemetry/pages/legacy.tsx new file mode 100644 index 0000000000000..1621fb737fce9 --- /dev/null +++ b/examples/with-opentelemetry/pages/legacy.tsx @@ -0,0 +1,20 @@ +import Link from 'next/link' +import { fetchGithubStars } from '../shared/fetch-github-stars' + +export async function getServerSideProps() { + const stars = await fetchGithubStars() + return { + props: { + stars, + }, + } +} + +export default function IndexPage({ stars }) { + return ( + <> +

Next.js has {stars} ⭐️

+ How about preact? + + ) +} diff --git a/examples/with-opentelemetry/shared/fetch-github-stars.ts b/examples/with-opentelemetry/shared/fetch-github-stars.ts new file mode 100644 index 0000000000000..2a1223b82bd88 --- /dev/null +++ b/examples/with-opentelemetry/shared/fetch-github-stars.ts @@ -0,0 +1,15 @@ +import { trace } from '@opentelemetry/api' + +export async function fetchGithubStars() { + const span = trace.getTracer('nextjs-example').startSpan('fetchGithubStars') + return fetch('https://api.github.com/repos/vercel/next.js', { + next: { + revalidate: 0, + }, + }) + .then((res) => res.json()) + .then((data) => data.stargazers_count) + .finally(() => { + span.end() + }) +} diff --git a/examples/with-opentelemetry/tsconfig.json b/examples/with-opentelemetry/tsconfig.json new file mode 100644 index 0000000000000..0eae8b96e9f90 --- /dev/null +++ b/examples/with-opentelemetry/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "strictNullChecks": true + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/examples/with-redux/package.json b/examples/with-redux/package.json index 9a9be6c261d9a..23b138a05f013 100644 --- a/examples/with-redux/package.json +++ b/examples/with-redux/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@testing-library/jest-dom": "^5.0.0", - "@testing-library/react": "^12.1.0", + "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^13.0.0", "@types/jest": "^27.0.1", "@types/node": "^16.9.1", diff --git a/examples/with-turbopack-loaders/.gitignore b/examples/with-turbopack-loaders/.gitignore new file mode 100644 index 0000000000000..c87c9b392c020 --- /dev/null +++ b/examples/with-turbopack-loaders/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/with-turbopack-loaders/README.md b/examples/with-turbopack-loaders/README.md new file mode 100644 index 0000000000000..667b90367b44f --- /dev/null +++ b/examples/with-turbopack-loaders/README.md @@ -0,0 +1,48 @@ +# Turbopack + Loaders + +Turbopack supports a subset of webpack's loader API, allowing you to use some webpack loaders to transform code in Turbopack. This example shows you how to configure Next.js to use webpack loaders when running with `next --turbo`. + +Install the dependencies and start the development server. + +```sh +npm install +npm run dev +``` + +or + +```sh +yarn +yarn dev +``` + +or + +```sh +pnpm install +pnpm dev +``` + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-turbopack-loaders) + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-turbopack-loaders&project-name=with-turbopack-loaders&repository-name=with-turbopack-loaders) + +## How to use + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: + +```bash +npx create-next-app --example with-turbopack-loaders with-turbopack-loaders-app +``` + +```bash +yarn create next-app --example with-turbopack-loaders with-turbopack-loaders-app +``` + +```bash +pnpm create next-app --example with-turbopack-loaders with-turbopack-loaders-app +``` + +Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-turbopack-loaders/next.config.js b/examples/with-turbopack-loaders/next.config.js new file mode 100644 index 0000000000000..4b89c10aa7529 --- /dev/null +++ b/examples/with-turbopack-loaders/next.config.js @@ -0,0 +1,9 @@ +module.exports = { + experimental: { + turbo: { + loaders: { + '.svg': ['@svgr/webpack'], + }, + }, + }, +} diff --git a/examples/with-turbopack-loaders/package.json b/examples/with-turbopack-loaders/package.json new file mode 100644 index 0000000000000..c70cb28065381 --- /dev/null +++ b/examples/with-turbopack-loaders/package.json @@ -0,0 +1,20 @@ +{ + "private": true, + "scripts": { + "dev": "next --turbo", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "latest", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@svgr/webpack": "6.5.1", + "@types/node": "^18.11.9", + "@types/react": "^18.0.25", + "@types/react-dom": "^18.0.9", + "typescript": "^4.9.3" + } +} diff --git a/examples/with-turbopack-loaders/pages/index.js b/examples/with-turbopack-loaders/pages/index.js new file mode 100644 index 0000000000000..574261858ff39 --- /dev/null +++ b/examples/with-turbopack-loaders/pages/index.js @@ -0,0 +1,5 @@ +import Vercel from '../vercel.svg' + +export default function Home() { + return +} diff --git a/examples/with-turbopack-loaders/vercel.svg b/examples/with-turbopack-loaders/vercel.svg new file mode 100644 index 0000000000000..fbf0e25a651c2 --- /dev/null +++ b/examples/with-turbopack-loaders/vercel.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/examples/with-typescript-types/package.json b/examples/with-typescript-types/package.json index c2de98839dd77..69d1d121f816b 100644 --- a/examples/with-typescript-types/package.json +++ b/examples/with-typescript-types/package.json @@ -8,13 +8,13 @@ }, "dependencies": { "next": "latest", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "react": "latest", + "react-dom": "latest" }, "devDependencies": { - "@types/node": "^12.12.21", - "@types/react": "^16.9.16", - "@types/react-dom": "^16.9.4", - "typescript": "4.0" + "@types/node": "latest", + "@types/react": "latest", + "@types/react-dom": "latest", + "typescript": "4.9.4" } } diff --git a/examples/with-web-worker/pages/index.tsx b/examples/with-web-worker/pages/index.tsx index 4337a8226fb1e..b51ecdd06efe9 100644 --- a/examples/with-web-worker/pages/index.tsx +++ b/examples/with-web-worker/pages/index.tsx @@ -8,12 +8,12 @@ export default function Index() { workerRef.current.onmessage = (event: MessageEvent) => alert(`WebWorker Response => ${event.data}`) return () => { - workerRef.current.terminate() + workerRef.current?.terminate() } }, []) const handleWork = useCallback(async () => { - workerRef.current.postMessage(100000) + workerRef.current?.postMessage(100000) }, []) return ( diff --git a/lerna.json b/lerna.json index 4e04df45a4cec..af4cf88ea9df7 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "13.1.7-canary.17" + "version": "13.2.3" } diff --git a/package.json b/package.json index c8d9b9736bf2e..a0e71f67596d9 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@babel/plugin-proposal-object-rest-spread": "7.14.7", "@babel/preset-flow": "7.14.5", "@babel/preset-react": "7.14.5", - "@edge-runtime/jest-environment": "2.0.0", + "@edge-runtime/jest-environment": "2.0.5", "@fullhuman/postcss-purgecss": "1.3.0", "@mdx-js/loader": "2.2.1", "@mdx-js/react": "2.2.1", @@ -189,11 +189,11 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-next-4bf2113a1-20230206", + "react-builtin": "npm:react@18.3.0-next-bfb9cbd8c-20230223", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-next-4bf2113a1-20230206", - "react-server-dom-webpack": "18.3.0-next-4bf2113a1-20230206", + "react-dom-builtin": "npm:react-dom@18.3.0-next-bfb9cbd8c-20230223", + "react-server-dom-webpack": "18.3.0-next-bfb9cbd8c-20230223", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 7df78b89086ea..5e8e749d06e70 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "13.1.7-canary.17", + "version": "13.2.3", "keywords": [ "react", "next", diff --git a/packages/create-next-app/templates/app/js/app/api/hello/route.js b/packages/create-next-app/templates/app/js/app/api/hello/route.js new file mode 100644 index 0000000000000..fec2f83802969 --- /dev/null +++ b/packages/create-next-app/templates/app/js/app/api/hello/route.js @@ -0,0 +1,3 @@ +export async function GET(request) { + return new Response('Hello, Next.js!') +} diff --git a/packages/create-next-app/templates/app/js/public/favicon.ico b/packages/create-next-app/templates/app/js/app/favicon.ico similarity index 100% rename from packages/create-next-app/templates/app/js/public/favicon.ico rename to packages/create-next-app/templates/app/js/app/favicon.ico diff --git a/packages/create-next-app/templates/app/js/app/head.js b/packages/create-next-app/templates/app/js/app/head.js deleted file mode 100644 index 5ad797f1f2191..0000000000000 --- a/packages/create-next-app/templates/app/js/app/head.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function Head() { - return ( - <> - Create Next App - - - - - ) -} diff --git a/packages/create-next-app/templates/app/js/app/layout.js b/packages/create-next-app/templates/app/js/app/layout.js index fca8f5b423eb6..3e3a9a26dfb6e 100644 --- a/packages/create-next-app/templates/app/js/app/layout.js +++ b/packages/create-next-app/templates/app/js/app/layout.js @@ -1,13 +1,13 @@ import './globals.css' +export const metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + export default function RootLayout({ children }) { return ( - {/* - will contain the components returned by the nearest parent - head.js. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head - */} - {children} ) diff --git a/packages/create-next-app/templates/app/js/app/page.js b/packages/create-next-app/templates/app/js/app/page.js index a8594adb52491..241b72c0f7f79 100644 --- a/packages/create-next-app/templates/app/js/app/page.js +++ b/packages/create-next-app/templates/app/js/app/page.js @@ -1,5 +1,5 @@ import Image from 'next/image' -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' import styles from './page.module.css' const inter = Inter({ subsets: ['latin'] }) diff --git a/packages/create-next-app/templates/app/js/jsconfig.json b/packages/create-next-app/templates/app/js/jsconfig.json index 9c33383354d7f..2a2e4b3bf8ba1 100644 --- a/packages/create-next-app/templates/app/js/jsconfig.json +++ b/packages/create-next-app/templates/app/js/jsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "baseUrl": ".", "paths": { "@/*": ["./*"] } diff --git a/packages/create-next-app/templates/app/js/pages/api/hello.js b/packages/create-next-app/templates/app/js/pages/api/hello.js deleted file mode 100644 index df63de88fa67c..0000000000000 --- a/packages/create-next-app/templates/app/js/pages/api/hello.js +++ /dev/null @@ -1,5 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction - -export default function handler(req, res) { - res.status(200).json({ name: 'John Doe' }) -} diff --git a/packages/create-next-app/templates/app/ts/app/api/hello/route.ts b/packages/create-next-app/templates/app/ts/app/api/hello/route.ts new file mode 100644 index 0000000000000..d1cc6ee25fedf --- /dev/null +++ b/packages/create-next-app/templates/app/ts/app/api/hello/route.ts @@ -0,0 +1,3 @@ +export async function GET(request: Request) { + return new Response('Hello, Next.js!') +} diff --git a/packages/create-next-app/templates/app/ts/public/favicon.ico b/packages/create-next-app/templates/app/ts/app/favicon.ico similarity index 100% rename from packages/create-next-app/templates/app/ts/public/favicon.ico rename to packages/create-next-app/templates/app/ts/app/favicon.ico diff --git a/packages/create-next-app/templates/app/ts/app/head.tsx b/packages/create-next-app/templates/app/ts/app/head.tsx deleted file mode 100644 index 5ad797f1f2191..0000000000000 --- a/packages/create-next-app/templates/app/ts/app/head.tsx +++ /dev/null @@ -1,10 +0,0 @@ -export default function Head() { - return ( - <> - Create Next App - - - - - ) -} diff --git a/packages/create-next-app/templates/app/ts/app/layout.tsx b/packages/create-next-app/templates/app/ts/app/layout.tsx index 245bd756ae580..3d9d72318cec6 100644 --- a/packages/create-next-app/templates/app/ts/app/layout.tsx +++ b/packages/create-next-app/templates/app/ts/app/layout.tsx @@ -1,5 +1,10 @@ import './globals.css' +export const metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + export default function RootLayout({ children, }: { @@ -7,11 +12,6 @@ export default function RootLayout({ }) { return ( - {/* - will contain the components returned by the nearest parent - head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head - */} - {children} ) diff --git a/packages/create-next-app/templates/app/ts/app/page.tsx b/packages/create-next-app/templates/app/ts/app/page.tsx index 47fcc959cf52b..965f40ed2bd92 100644 --- a/packages/create-next-app/templates/app/ts/app/page.tsx +++ b/packages/create-next-app/templates/app/ts/app/page.tsx @@ -1,5 +1,5 @@ import Image from 'next/image' -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' import styles from './page.module.css' const inter = Inter({ subsets: ['latin'] }) diff --git a/packages/create-next-app/templates/app/ts/pages/api/hello.ts b/packages/create-next-app/templates/app/ts/pages/api/hello.ts deleted file mode 100644 index f8bcc7e5caed1..0000000000000 --- a/packages/create-next-app/templates/app/ts/pages/api/hello.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction -import type { NextApiRequest, NextApiResponse } from 'next' - -type Data = { - name: string -} - -export default function handler( - req: NextApiRequest, - res: NextApiResponse -) { - res.status(200).json({ name: 'John Doe' }) -} diff --git a/packages/create-next-app/templates/app/ts/tsconfig.json b/packages/create-next-app/templates/app/ts/tsconfig.json index 597f483b2d632..e06a4454ab062 100644 --- a/packages/create-next-app/templates/app/ts/tsconfig.json +++ b/packages/create-next-app/templates/app/ts/tsconfig.json @@ -19,7 +19,6 @@ "name": "next" } ], - "baseUrl": ".", "paths": { "@/*": ["./*"] } diff --git a/packages/create-next-app/templates/default/js/jsconfig.json b/packages/create-next-app/templates/default/js/jsconfig.json index 9c33383354d7f..2a2e4b3bf8ba1 100644 --- a/packages/create-next-app/templates/default/js/jsconfig.json +++ b/packages/create-next-app/templates/default/js/jsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "baseUrl": ".", "paths": { "@/*": ["./*"] } diff --git a/packages/create-next-app/templates/default/js/pages/index.js b/packages/create-next-app/templates/default/js/pages/index.js index 9d4b3d56ec4b5..486c7fa248e3c 100644 --- a/packages/create-next-app/templates/default/js/pages/index.js +++ b/packages/create-next-app/templates/default/js/pages/index.js @@ -1,6 +1,6 @@ import Head from 'next/head' import Image from 'next/image' -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' import styles from '@/styles/Home.module.css' const inter = Inter({ subsets: ['latin'] }) diff --git a/packages/create-next-app/templates/default/ts/pages/index.tsx b/packages/create-next-app/templates/default/ts/pages/index.tsx index 3a20955f2acd6..e921148734131 100644 --- a/packages/create-next-app/templates/default/ts/pages/index.tsx +++ b/packages/create-next-app/templates/default/ts/pages/index.tsx @@ -1,6 +1,6 @@ import Head from 'next/head' import Image from 'next/image' -import { Inter } from '@next/font/google' +import { Inter } from 'next/font/google' import styles from '@/styles/Home.module.css' const inter = Inter({ subsets: ['latin'] }) diff --git a/packages/create-next-app/templates/default/ts/tsconfig.json b/packages/create-next-app/templates/default/ts/tsconfig.json index f4ab65fd2ebfc..8b8e58111e46d 100644 --- a/packages/create-next-app/templates/default/ts/tsconfig.json +++ b/packages/create-next-app/templates/default/ts/tsconfig.json @@ -14,7 +14,6 @@ "isolatedModules": true, "jsx": "preserve", "incremental": true, - "baseUrl": ".", "paths": { "@/*": ["./*"] } diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index 05d29dc93d3b1..5c988db8e51ac 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -88,6 +88,8 @@ export const installTemplate = async ({ const writeSema = new Sema(8, { capacity: files.length }) await Promise.all( files.map(async (file) => { + // We don't want to modify compiler options in [ts/js]config.json + if (file === 'tsconfig.json' || file === 'jsconfig.json') return await writeSema.acquire() const filePath = path.join(root, file) if ((await fs.promises.stat(filePath)).isFile()) { @@ -175,7 +177,6 @@ export const installTemplate = async ({ ? `@${process.env.NEXT_PRIVATE_TEST_VERSION}` : '' }`, - '@next/font', ] /** * TypeScript projects will have type definitions and other devDependencies. diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 1e4fd8c79899d..eaeca0efe444b 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "13.1.7-canary.17", + "version": "13.2.3", "description": "ESLint configuration used by NextJS.", "main": "index.js", "license": "MIT", @@ -12,7 +12,7 @@ "test-pack": "cd ../../ && pnpm test-pack eslint-config-next" }, "dependencies": { - "@next/eslint-plugin-next": "13.1.7-canary.17", + "@next/eslint-plugin-next": "13.2.3", "@rushstack/eslint-patch": "^1.1.3", "@typescript-eslint/parser": "^5.42.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 1040030ce43d5..81c1a077af813 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "13.1.7-canary.17", + "version": "13.2.3", "description": "ESLint plugin for NextJS.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 25abb6ecee3a3..163b6ecb283f4 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "13.1.7-canary.17", + "version": "13.2.3", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/font/src/google/font-data.json b/packages/font/src/google/font-data.json index e526ccd0d446b..212fdd2972793 100644 --- a/packages/font/src/google/font-data.json +++ b/packages/font/src/google/font-data.json @@ -3592,6 +3592,11 @@ "styles": ["normal"], "subsets": ["latin", "latin-ext"] }, + "Gajraj One": { + "weights": ["400"], + "styles": ["normal"], + "subsets": ["devanagari", "latin", "latin-ext"] + }, "Galada": { "weights": ["400"], "styles": ["normal"], @@ -3799,6 +3804,11 @@ "styles": ["normal"], "subsets": ["devanagari", "latin", "latin-ext"] }, + "Gloock": { + "weights": ["400"], + "styles": ["normal"], + "subsets": ["cyrillic-ext", "latin", "latin-ext"] + }, "Gloria Hallelujah": { "weights": ["400"], "styles": ["normal"], @@ -5089,6 +5099,30 @@ "styles": ["normal"], "subsets": ["latin"] }, + "Labrada": { + "weights": [ + "100", + "200", + "300", + "400", + "500", + "600", + "700", + "800", + "900", + "variable" + ], + "styles": ["normal", "italic"], + "axes": [ + { + "tag": "wght", + "min": 100, + "max": 900, + "defaultValue": 400 + } + ], + "subsets": ["latin", "latin-ext", "vietnamese"] + }, "Lacquer": { "weights": ["400"], "styles": ["normal"], @@ -6441,6 +6475,11 @@ "styles": ["normal"], "subsets": ["latin", "latin-ext", "vietnamese"] }, + "Mynerve": { + "weights": ["400"], + "styles": ["normal"], + "subsets": ["greek", "latin", "latin-ext", "vietnamese"] + }, "Mystery Quest": { "weights": ["400"], "styles": ["normal"], @@ -9405,6 +9444,19 @@ "styles": ["normal", "italic"], "subsets": ["cyrillic", "cyrillic-ext", "latin", "vietnamese"] }, + "Phudu": { + "weights": ["300", "400", "500", "600", "700", "800", "900", "variable"], + "styles": ["normal"], + "axes": [ + { + "tag": "wght", + "min": 300, + "max": 900, + "defaultValue": 400 + } + ], + "subsets": ["cyrillic-ext", "latin", "latin-ext", "vietnamese"] + }, "Piazzolla": { "weights": [ "100", @@ -10760,6 +10812,37 @@ "styles": ["normal"], "subsets": ["latin", "latin-ext", "vietnamese"] }, + "Shantell Sans": { + "weights": ["300", "400", "500", "600", "700", "800", "variable"], + "styles": ["normal", "italic"], + "axes": [ + { + "tag": "BNCE", + "min": -100, + "max": 100, + "defaultValue": 0 + }, + { + "tag": "INFM", + "min": 0, + "max": 100, + "defaultValue": 0 + }, + { + "tag": "SPAC", + "min": 0, + "max": 100, + "defaultValue": 0 + }, + { + "tag": "wght", + "min": 300, + "max": 800, + "defaultValue": 400 + } + ], + "subsets": ["cyrillic", "cyrillic-ext", "latin", "latin-ext", "vietnamese"] + }, "Shanti": { "weights": ["400"], "styles": ["normal"], @@ -11930,7 +12013,7 @@ "Unica One": { "weights": ["400"], "styles": ["normal"], - "subsets": ["latin", "latin-ext"] + "subsets": ["latin", "latin-ext", "vietnamese"] }, "UnifrakturCook": { "weights": ["700"], diff --git a/packages/font/src/google/index.ts b/packages/font/src/google/index.ts index 53d7cb0bd4187..11a882006dc19 100644 --- a/packages/font/src/google/index.ts +++ b/packages/font/src/google/index.ts @@ -6541,6 +6541,18 @@ export declare function Gafata< adjustFontFallback?: boolean subsets?: Array<'latin' | 'latin-ext'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Gajraj_One< + T extends CssVariable | undefined = undefined +>(options: { + weight: '400' | Array<'400'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'devanagari' | 'latin' | 'latin-ext'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Galada< T extends CssVariable | undefined = undefined >(options: { @@ -6894,6 +6906,18 @@ export declare function Glegoo< adjustFontFallback?: boolean subsets?: Array<'devanagari' | 'latin' | 'latin-ext'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Gloock< + T extends CssVariable | undefined = undefined +>(options: { + weight: '400' | Array<'400'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'cyrillic-ext' | 'latin' | 'latin-ext'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Gloria_Hallelujah< T extends CssVariable | undefined = undefined >(options: { @@ -9539,6 +9563,31 @@ export declare function La_Belle_Aurore< adjustFontFallback?: boolean subsets?: Array<'latin'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Labrada< + T extends CssVariable | undefined = undefined +>(options?: { + weight?: + | '100' + | '200' + | '300' + | '400' + | '500' + | '600' + | '700' + | '800' + | '900' + | 'variable' + | Array< + '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' + > + style?: 'normal' | 'italic' | Array<'normal' | 'italic'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'latin' | 'latin-ext' | 'vietnamese'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Lacquer< T extends CssVariable | undefined = undefined >(options: { @@ -12060,6 +12109,18 @@ export declare function My_Soul< adjustFontFallback?: boolean subsets?: Array<'latin' | 'latin-ext' | 'vietnamese'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Mynerve< + T extends CssVariable | undefined = undefined +>(options: { + weight: '400' | Array<'400'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'greek' | 'latin' | 'latin-ext' | 'vietnamese'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Mystery_Quest< T extends CssVariable | undefined = undefined >(options: { @@ -16681,6 +16742,27 @@ export declare function Philosopher< adjustFontFallback?: boolean subsets?: Array<'cyrillic' | 'cyrillic-ext' | 'latin' | 'vietnamese'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Phudu< + T extends CssVariable | undefined = undefined +>(options?: { + weight?: + | '300' + | '400' + | '500' + | '600' + | '700' + | '800' + | '900' + | 'variable' + | Array<'300' | '400' | '500' | '600' | '700' | '800' | '900'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'cyrillic-ext' | 'latin' | 'latin-ext' | 'vietnamese'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Piazzolla< T extends CssVariable | undefined = undefined >(options?: { @@ -19167,6 +19249,29 @@ export declare function Shalimar< adjustFontFallback?: boolean subsets?: Array<'latin' | 'latin-ext' | 'vietnamese'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Shantell_Sans< + T extends CssVariable | undefined = undefined +>(options?: { + weight?: + | '300' + | '400' + | '500' + | '600' + | '700' + | '800' + | 'variable' + | Array<'300' | '400' | '500' | '600' | '700' | '800'> + style?: 'normal' | 'italic' | Array<'normal' | 'italic'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array< + 'cyrillic' | 'cyrillic-ext' | 'latin' | 'latin-ext' | 'vietnamese' + > + axes?: ('BNCE' | 'INFM' | 'SPAC')[] +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Shanti< T extends CssVariable | undefined = undefined >(options: { @@ -21363,7 +21468,7 @@ export declare function Unica_One< preload?: boolean fallback?: string[] adjustFontFallback?: boolean - subsets?: Array<'latin' | 'latin-ext'> + subsets?: Array<'latin' | 'latin-ext' | 'vietnamese'> }): T extends undefined ? NextFont : NextFontWithVariable export declare function UnifrakturCook< T extends CssVariable | undefined = undefined diff --git a/packages/font/src/google/utils.ts b/packages/font/src/google/utils.ts index 07d5484bd6181..82295e68daa59 100644 --- a/packages/font/src/google/utils.ts +++ b/packages/font/src/google/utils.ts @@ -164,14 +164,14 @@ export function getUrl( // Variants are all combinations of weight and style, each variant will result in a separate font file const variants: Array<[string, string][]> = [] if (axes.wght) { - for (const wgth of axes.wght) { + for (const wght of axes.wght) { if (!axes.ital) { - variants.push([['wght', wgth], ...(axes.variableAxes ?? [])]) + variants.push([['wght', wght], ...(axes.variableAxes ?? [])]) } else { for (const ital of axes.ital) { variants.push([ ['ital', ital], - ['wght', wgth], + ['wght', wght], ...(axes.variableAxes ?? []), ]) } diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 4cb14b902ba15..a2522acfc8a0c 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "13.1.7-canary.17", + "version": "13.2.3", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index dfad5ba4f3e19..f27aa203a2852 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "13.1.7-canary.17", + "version": "13.2.3", "license": "MIT", "dependencies": { "chalk": "4.1.0", diff --git a/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.input.js b/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.input.tsx similarity index 88% rename from packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.input.js rename to packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.input.tsx index 64f707bb546ff..ed217c67a46fd 100644 --- a/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.input.js +++ b/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.input.tsx @@ -1,5 +1,8 @@ +// @ts-nocheck +/* eslint-disable */ import { Oswald } from "@next/font/google"; import localFont1 from "@next/font/local"; +import type { AdjustFontFallback } from "@next/font" const oswald = Oswald({ subsets: ["latin"] }); const myFont = localFont1({ diff --git a/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.output.js b/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.output.tsx similarity index 88% rename from packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.output.js rename to packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.output.tsx index 4ea81f02e4272..bcb0a646796d9 100644 --- a/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.output.js +++ b/packages/next-codemod/transforms/__testfixtures__/built-in-next-font/page.output.tsx @@ -1,5 +1,8 @@ +// @ts-nocheck +/* eslint-disable */ import { Oswald } from "next/font/google"; import localFont1 from "next/font/local"; +import type { AdjustFontFallback } from "next/font" const oswald = Oswald({ subsets: ["latin"] }); const myFont = localFont1({ diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/input/next.config.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/input/next.config.js new file mode 100644 index 0000000000000..06217557737ac --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/input/next.config.js @@ -0,0 +1,21 @@ +/** + * @type {import('next').NextConfig} + */ +module.exports = { + reactStrictMode: true, + + images: { + loader: "cloudinary", + path: "https://example.com/" + }, + + async redirects() { + return [ + { + source: '/source', + destination: '/dest', + permanent: true, + }, + ]; + }, +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/output/cloudinary-loader.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/output/cloudinary-loader.js new file mode 100644 index 0000000000000..f0ac0c3209d6b --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/output/cloudinary-loader.js @@ -0,0 +1,6 @@ +const normalizeSrc = (src) => src[0] === '/' ? src.slice(1) : src +export default function cloudinaryLoader({ src, width, quality }) { +const params = ['f_auto', 'c_limit', 'w_' + width, 'q_' + (quality || 'auto')] +const paramsString = params.join(',') + '/' +return 'https://example.com/' + paramsString + normalizeSrc(src) +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/output/next.config.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/output/next.config.js new file mode 100644 index 0000000000000..9430e62d4e6e0 --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/many-keys/output/next.config.js @@ -0,0 +1,21 @@ +/** + * @type {import('next').NextConfig} + */ +module.exports = { + reactStrictMode: true, + + images: { + loader: "custom", + loaderFile: "./cloudinary-loader.js" + }, + + async redirects() { + return [ + { + source: '/source', + destination: '/dest', + permanent: true, + }, + ]; + }, +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/input/app1/next.config.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/input/app1/next.config.js new file mode 100644 index 0000000000000..0a5810c97c6b3 --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/input/app1/next.config.js @@ -0,0 +1,6 @@ +module.exports = { + images: { + loader: "imgix", + path: "https://example.com/" + }, +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/input/app2/next.config.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/input/app2/next.config.js new file mode 100644 index 0000000000000..eba596451330a --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/input/app2/next.config.js @@ -0,0 +1,6 @@ +module.exports = { + images: { + loader: "cloudinary", + path: "https://example.com/" + }, +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app1/imgix-loader.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app1/imgix-loader.js new file mode 100644 index 0000000000000..22468f5a87f5d --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app1/imgix-loader.js @@ -0,0 +1,10 @@ +const normalizeSrc = (src) => src[0] === '/' ? src.slice(1) : src +export default function imgixLoader({ src, width, quality }) { +const url = new URL('https://example.com/' + normalizeSrc(src)) +const params = url.searchParams +params.set('auto', params.getAll('auto').join(',') || 'format') +params.set('fit', params.get('fit') || 'max') +params.set('w', params.get('w') || width.toString()) +if (quality) { params.set('q', quality.toString()) } +return url.href +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app1/next.config.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app1/next.config.js new file mode 100644 index 0000000000000..28ec52518cef4 --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app1/next.config.js @@ -0,0 +1,6 @@ +module.exports = { + images: { + loader: "custom", + loaderFile: "./imgix-loader.js" + }, +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app2/cloudinary-loader.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app2/cloudinary-loader.js new file mode 100644 index 0000000000000..f0ac0c3209d6b --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app2/cloudinary-loader.js @@ -0,0 +1,6 @@ +const normalizeSrc = (src) => src[0] === '/' ? src.slice(1) : src +export default function cloudinaryLoader({ src, width, quality }) { +const params = ['f_auto', 'c_limit', 'w_' + width, 'q_' + (quality || 'auto')] +const paramsString = params.join(',') + '/' +return 'https://example.com/' + paramsString + normalizeSrc(src) +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app2/next.config.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app2/next.config.js new file mode 100644 index 0000000000000..28175db3e45c9 --- /dev/null +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental-loader/monorepo/output/app2/next.config.js @@ -0,0 +1,6 @@ +module.exports = { + images: { + loader: "custom", + loaderFile: "./cloudinary-loader.js" + }, +} \ No newline at end of file diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.input.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.input.tsx similarity index 90% rename from packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.input.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.input.tsx index a9bbdd1ea28d9..a991a052e2877 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.input.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.input.tsx @@ -1,5 +1,9 @@ +// @ts-nocheck +/* eslint-disable */ import Image from "next/legacy/image"; import Named, { Blarg } from "next/legacy/image"; +import type { ImageProps } from "next/legacy/image"; +import { type ImageLoaderProps } from "next/legacy/image"; import Foo from "foo"; import img from "../public/img.jpg"; @@ -30,4 +34,4 @@ export default function Home() {
); -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.output.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.output.tsx similarity index 94% rename from packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.output.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.output.tsx index 60b9965a21f03..a63d8ba524e71 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.output.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/general.output.tsx @@ -1,5 +1,9 @@ +// @ts-nocheck +/* eslint-disable */ import Image from "next/image"; import Named, { Blarg } from "next/image"; +import type { ImageProps } from "next/image"; +import { type ImageLoaderProps } from "next/image"; import Foo from "foo"; import img from "../public/img.jpg"; @@ -99,4 +103,4 @@ export default function Home() { }} /> ); -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.input.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.input.tsx similarity index 90% rename from packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.input.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.input.tsx index 3859fab616338..701c057a208e5 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.input.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.input.tsx @@ -1,3 +1,5 @@ +// @ts-nocheck +/* eslint-disable */ const Image = require("next/legacy/image"); const Named = require("next/legacy/image"); const Foo = require("foo"); @@ -11,4 +13,4 @@ export default function Home() { ); -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.output.js b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.output.tsx similarity index 89% rename from packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.output.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.output.tsx index 549e68dd724f9..c546a68754afb 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.output.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-experimental/require.output.tsx @@ -1,3 +1,5 @@ +// @ts-nocheck +/* eslint-disable */ const Image = require("next/image"); const Named = require("next/image"); const Foo = require("foo"); @@ -11,4 +13,4 @@ export default function Home() { ); -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.input.js b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.input.tsx similarity index 93% rename from packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.input.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.input.tsx index 37ddd93dae0a0..4e9fb29057b8a 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.input.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.input.tsx @@ -1,3 +1,5 @@ +// @ts-nocheck +/* eslint-disable */ export async function Home() { const Image = await import("next/image"); const Named = await import("next/image"); @@ -11,4 +13,4 @@ export async function Home() { ) -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.output.js b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.output.tsx similarity index 93% rename from packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.output.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.output.tsx index c3e96f4d08951..fa833761e77c5 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.output.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/dynamic.output.tsx @@ -1,3 +1,5 @@ +// @ts-nocheck +/* eslint-disable */ export async function Home() { const Image = await import("next/legacy/image"); const Named = await import("next/legacy/image"); @@ -11,4 +13,4 @@ export async function Home() { ) -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.input.js b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.input.tsx similarity index 61% rename from packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.input.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.input.tsx index b5648fd6c9c94..c28d7b0248043 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.input.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.input.tsx @@ -1,8 +1,14 @@ +// @ts-nocheck +/* eslint-disable */ import Image from "next/image"; import Named from "next/image"; +import type { ImageProps } from "next/image"; +import { type ImageLoaderProps } from "next/image"; import Foo from "foo"; import Future1 from "next/future/image"; import Future2 from "next/future/image"; +import type { ImageProps as ImageFutureProps } from "next/future/image"; +import { type ImageLoaderProps as ImageFutureLoaderProps } from "next/future/image"; export default function Home() { return (
@@ -12,4 +18,4 @@ export default function Home() {
) -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.output.js b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.output.tsx similarity index 61% rename from packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.output.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.output.tsx index 0dba37efd5342..911fea9656fcd 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.output.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/general.output.tsx @@ -1,8 +1,14 @@ +// @ts-nocheck +/* eslint-disable */ import Image from "next/legacy/image"; import Named from "next/legacy/image"; +import type { ImageProps } from "next/legacy/image"; +import { type ImageLoaderProps } from "next/legacy/image"; import Foo from "foo"; import Future1 from "next/image"; import Future2 from "next/image"; +import type { ImageProps as ImageFutureProps } from "next/image"; +import { type ImageLoaderProps as ImageFutureLoaderProps } from "next/image"; export default function Home() { return (
@@ -12,4 +18,4 @@ export default function Home() {
) -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.input.js b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.input.tsx similarity index 92% rename from packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.input.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.input.tsx index 5b708d1d62377..5256e29bf7348 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.input.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.input.tsx @@ -1,3 +1,5 @@ +// @ts-nocheck +/* eslint-disable */ export async function Home() { const Image = require("next/image"); const Named = require("next/image"); @@ -11,4 +13,4 @@ export async function Home() { ) -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.output.js b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.output.tsx similarity index 92% rename from packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.output.js rename to packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.output.tsx index d8695910cb97e..217209f4cce02 100644 --- a/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.output.js +++ b/packages/next-codemod/transforms/__testfixtures__/next-image-to-legacy-image/require.output.tsx @@ -1,3 +1,5 @@ +// @ts-nocheck +/* eslint-disable */ export async function Home() { const Image = require("next/legacy/image"); const Named = require("next/legacy/image"); @@ -11,4 +13,4 @@ export async function Home() { ) -} \ No newline at end of file +} diff --git a/packages/next-codemod/transforms/__tests__/built-in-next-font.test.js b/packages/next-codemod/transforms/__tests__/built-in-next-font.test.js index 1822427e3598d..2a8c355c73ae6 100644 --- a/packages/next-codemod/transforms/__tests__/built-in-next-font.test.js +++ b/packages/next-codemod/transforms/__tests__/built-in-next-font.test.js @@ -7,10 +7,10 @@ const { join } = require('path') const fixtureDir = 'built-in-next-font' const fixtureDirPath = join(__dirname, '..', '__testfixtures__', fixtureDir) const fixtures = readdirSync(fixtureDirPath) - .filter(file => file.endsWith('.input.js')) - .map(file => file.replace('.input.js', '')) + .filter(file => file.endsWith('.input.tsx')) + .map(file => file.replace('.input.tsx', '')) for (const fixture of fixtures) { const prefix = `${fixtureDir}/${fixture}`; - defineTest(__dirname, fixtureDir, null, prefix) + defineTest(__dirname, fixtureDir, null, prefix, { parser: 'tsx' }); } diff --git a/packages/next-codemod/transforms/__tests__/next-image-experimental-loader.test.js b/packages/next-codemod/transforms/__tests__/next-image-experimental-loader.test.js index a80f8c5bc1b94..cb1bb262b5594 100644 --- a/packages/next-codemod/transforms/__tests__/next-image-experimental-loader.test.js +++ b/packages/next-codemod/transforms/__tests__/next-image-experimental-loader.test.js @@ -1,36 +1,46 @@ /* global jest */ jest.autoMockOff() const Runner = require('jscodeshift/dist/Runner'); -const { cp, mkdir, rm, readdir, readFile } = require('fs/promises') +const { cp, mkdir, mkdtemp, rm, readdir, readFile, stat } = require('fs/promises') const { readdirSync } = require('fs') +const { tmpdir } = require('os') const { join } = require('path') const fixtureDir = join(__dirname, '..', '__testfixtures__', 'next-image-experimental-loader') const transform = join(__dirname, '..', 'next-image-experimental.js') -const opts = { recursive: true } +const opts = { recursive: true, force: true } async function toObj(dir) { const obj = {} const files = await readdir(dir) for (const file of files) { - obj[file] = await readFile(join(dir, file), 'utf8') + const filePath = join(dir, file) + const s = await stat(filePath) + if (s.isDirectory()) { + obj[file] = await toObj(filePath) + } else { + obj[file] = await readFile(filePath, 'utf8') + } } return obj } it.each(readdirSync(fixtureDir))('should transform loader %s', async (loader) => { + const tmp = await mkdtemp(join(tmpdir(), `next-image-experimental-${loader}-`)) + const originalCwd = process.cwd() try { - await mkdir(join(fixtureDir, 'tmp'), opts) - await cp(join(fixtureDir, loader, 'input'), join(fixtureDir, 'tmp'), opts) - process.chdir(join(fixtureDir, 'tmp')) + await mkdir(tmp, opts) + await cp(join(fixtureDir, loader, 'input'), tmp, opts) + process.chdir(tmp) const result = await Runner.run(transform, [`.`], {}) expect(result.error).toBe(0) expect( - await toObj(join(fixtureDir, 'tmp')) + await toObj(tmp) ).toStrictEqual( await toObj(join(fixtureDir, loader, 'output')) ) } finally { - await rm(join(fixtureDir, 'tmp'), opts) + await rm(tmp, opts) + process.chdir(originalCwd) } }) \ No newline at end of file diff --git a/packages/next-codemod/transforms/__tests__/next-image-experimental.test.js b/packages/next-codemod/transforms/__tests__/next-image-experimental.test.js index 4da9cb5772871..bcc7cc31baf4e 100644 --- a/packages/next-codemod/transforms/__tests__/next-image-experimental.test.js +++ b/packages/next-codemod/transforms/__tests__/next-image-experimental.test.js @@ -7,10 +7,10 @@ const { join } = require('path') const fixtureDir = 'next-image-experimental' const fixtureDirPath = join(__dirname, '..', '__testfixtures__', fixtureDir) const fixtures = readdirSync(fixtureDirPath) - .filter(file => file.endsWith('.input.js')) - .map(file => file.replace('.input.js', '')) + .filter(file => file.endsWith('.input.tsx')) + .map(file => file.replace('.input.tsx', '')) for (const fixture of fixtures) { const prefix = `${fixtureDir}/${fixture}`; - defineTest(__dirname, fixtureDir, null, prefix) + defineTest(__dirname, fixtureDir, null, prefix, { parser: 'tsx' }) } diff --git a/packages/next-codemod/transforms/__tests__/next-image-to-legacy-image.test.js b/packages/next-codemod/transforms/__tests__/next-image-to-legacy-image.test.js index 35b9828665300..e0ce228146449 100644 --- a/packages/next-codemod/transforms/__tests__/next-image-to-legacy-image.test.js +++ b/packages/next-codemod/transforms/__tests__/next-image-to-legacy-image.test.js @@ -7,10 +7,10 @@ const { join } = require('path') const fixtureDir = 'next-image-to-legacy-image' const fixtureDirPath = join(__dirname, '..', '__testfixtures__', fixtureDir) const fixtures = readdirSync(fixtureDirPath) - .filter(file => file.endsWith('.input.js')) - .map(file => file.replace('.input.js', '')) + .filter(file => file.endsWith('.input.tsx')) + .map(file => file.replace('.input.tsx', '')) for (const fixture of fixtures) { const prefix = `${fixtureDir}/${fixture}`; - defineTest(__dirname, fixtureDir, null, prefix) + defineTest(__dirname, fixtureDir, null, prefix, { parser: 'tsx' }); } diff --git a/packages/next-codemod/transforms/built-in-next-font.ts b/packages/next-codemod/transforms/built-in-next-font.ts index c7fd5b2d4bab4..068bb6a176eb9 100644 --- a/packages/next-codemod/transforms/built-in-next-font.ts +++ b/packages/next-codemod/transforms/built-in-next-font.ts @@ -5,22 +5,27 @@ export default function transformer( api: API, options: Options ) { - const j = api.jscodeshift + const j = api.jscodeshift.withParser('tsx') const root = j(file.source) + // Before: import { ... } from '@next/font' + // After: import { ... } from 'next/font' + root + .find(j.ImportDeclaration, { + source: { value: '@next/font' }, + }) + .forEach((fontImport) => { + fontImport.node.source = j.stringLiteral('next/font') + }) + // Before: import { ... } from '@next/font/google' // After: import { ... } from 'next/font/google' root .find(j.ImportDeclaration, { source: { value: '@next/font/google' }, }) - .forEach((imageImport) => { - j(imageImport).replaceWith( - j.importDeclaration( - imageImport.node.specifiers, - j.stringLiteral('next/font/google') - ) - ) + .forEach((fontImport) => { + fontImport.node.source = j.stringLiteral('next/font/google') }) // Before: import localFont from '@next/font/local' @@ -29,13 +34,8 @@ export default function transformer( .find(j.ImportDeclaration, { source: { value: '@next/font/local' }, }) - .forEach((imageImport) => { - j(imageImport).replaceWith( - j.importDeclaration( - imageImport.node.specifiers, - j.stringLiteral('next/font/local') - ) - ) + .forEach((fontImport) => { + fontImport.node.source = j.stringLiteral('next/font/local') }) return root.toSource(options) diff --git a/packages/next-codemod/transforms/next-image-experimental.ts b/packages/next-codemod/transforms/next-image-experimental.ts index c26d471001b22..19f1729d0a3e7 100644 --- a/packages/next-codemod/transforms/next-image-experimental.ts +++ b/packages/next-codemod/transforms/next-image-experimental.ts @@ -1,3 +1,4 @@ +import { join, parse } from 'path' import { writeFileSync } from 'fs' import type { API, @@ -148,56 +149,65 @@ function findAndReplaceProps( }) } -function nextConfigTransformer(j: JSCodeshift, root: Collection) { +function nextConfigTransformer( + j: JSCodeshift, + root: Collection, + appDir: string +) { let pathPrefix = '' let loaderType = '' root.find(j.ObjectExpression).forEach((o) => { - const [images] = o.value.properties || [] - if ( - images.type === 'ObjectProperty' && - images.key.type === 'Identifier' && - images.key.name === 'images' && - images.value.type === 'ObjectExpression' && - images.value.properties - ) { - const properties = images.value.properties.filter((p) => { - if ( - p.type === 'ObjectProperty' && - p.key.type === 'Identifier' && - p.key.name === 'loader' && - 'value' in p.value - ) { + ;(o.value.properties || []).forEach((images) => { + if ( + images.type === 'ObjectProperty' && + images.key.type === 'Identifier' && + images.key.name === 'images' && + images.value.type === 'ObjectExpression' && + images.value.properties + ) { + const properties = images.value.properties.filter((p) => { if ( - p.value.value === 'imgix' || - p.value.value === 'cloudinary' || - p.value.value === 'akamai' + p.type === 'ObjectProperty' && + p.key.type === 'Identifier' && + p.key.name === 'loader' && + 'value' in p.value ) { - loaderType = p.value.value - p.value.value = 'custom' + if ( + p.value.value === 'imgix' || + p.value.value === 'cloudinary' || + p.value.value === 'akamai' + ) { + loaderType = p.value.value + p.value.value = 'custom' + } } - } - if ( - p.type === 'ObjectProperty' && - p.key.type === 'Identifier' && - p.key.name === 'path' && - 'value' in p.value - ) { - pathPrefix = String(p.value.value) - return false - } - return true - }) - if (loaderType && pathPrefix) { - let filename = `./${loaderType}-loader.js` - properties.push( - j.property('init', j.identifier('loaderFile'), j.literal(filename)) - ) - images.value.properties = properties - const normalizeSrc = `const normalizeSrc = (src) => src[0] === '/' ? src.slice(1) : src` - if (loaderType === 'imgix') { - writeFileSync( - filename, - `${normalizeSrc} + if ( + p.type === 'ObjectProperty' && + p.key.type === 'Identifier' && + p.key.name === 'path' && + 'value' in p.value + ) { + pathPrefix = String(p.value.value) + return false + } + return true + }) + if (loaderType && pathPrefix) { + const importSpecifier = `./${loaderType}-loader.js` + const filePath = join(appDir, importSpecifier) + properties.push( + j.property( + 'init', + j.identifier('loaderFile'), + j.literal(importSpecifier) + ) + ) + images.value.properties = properties + const normalizeSrc = `const normalizeSrc = (src) => src[0] === '/' ? src.slice(1) : src` + if (loaderType === 'imgix') { + writeFileSync( + filePath, + `${normalizeSrc} export default function imgixLoader({ src, width, quality }) { const url = new URL('${pathPrefix}' + normalizeSrc(src)) const params = url.searchParams @@ -207,37 +217,38 @@ function nextConfigTransformer(j: JSCodeshift, root: Collection) { if (quality) { params.set('q', quality.toString()) } return url.href }` - .split('\n') - .map((l) => l.trim()) - .join('\n') - ) - } else if (loaderType === 'cloudinary') { - writeFileSync( - filename, - `${normalizeSrc} + .split('\n') + .map((l) => l.trim()) + .join('\n') + ) + } else if (loaderType === 'cloudinary') { + writeFileSync( + filePath, + `${normalizeSrc} export default function cloudinaryLoader({ src, width, quality }) { const params = ['f_auto', 'c_limit', 'w_' + width, 'q_' + (quality || 'auto')] const paramsString = params.join(',') + '/' return '${pathPrefix}' + paramsString + normalizeSrc(src) }` - .split('\n') - .map((l) => l.trim()) - .join('\n') - ) - } else if (loaderType === 'akamai') { - writeFileSync( - filename, - `${normalizeSrc} + .split('\n') + .map((l) => l.trim()) + .join('\n') + ) + } else if (loaderType === 'akamai') { + writeFileSync( + filePath, + `${normalizeSrc} export default function akamaiLoader({ src, width, quality }) { return '${pathPrefix}' + normalizeSrc(src) + '?imwidth=' + width }` - .split('\n') - .map((l) => l.trim()) - .join('\n') - ) + .split('\n') + .map((l) => l.trim()) + .join('\n') + ) + } } } - } + }) }) return root } @@ -250,14 +261,15 @@ export default function transformer( const j = api.jscodeshift.withParser('tsx') const root = j(file.source) + const parsed = parse(file.path || '/') const isConfig = - file.path === 'next.config.js' || - file.path === 'next.config.ts' || - file.path === 'next.config.mjs' || - file.path === 'next.config.cjs' + parsed.base === 'next.config.js' || + parsed.base === 'next.config.ts' || + parsed.base === 'next.config.mjs' || + parsed.base === 'next.config.cjs' if (isConfig) { - const result = nextConfigTransformer(j, root) + const result = nextConfigTransformer(j, root, parsed.dir) return result.toSource() } @@ -272,14 +284,8 @@ export default function transformer( (node) => node.type === 'ImportDefaultSpecifier' ) as ImportDefaultSpecifier | undefined const tagName = defaultSpecifier?.local?.name - + imageImport.node.source = j.stringLiteral('next/image') if (tagName) { - j(imageImport).replaceWith( - j.importDeclaration( - imageImport.node.specifiers, - j.stringLiteral('next/image') - ) - ) findAndReplaceProps(j, root, tagName) } }) diff --git a/packages/next-codemod/transforms/next-image-to-legacy-image.ts b/packages/next-codemod/transforms/next-image-to-legacy-image.ts index 86d202a8cb76e..1453d594b9a90 100644 --- a/packages/next-codemod/transforms/next-image-to-legacy-image.ts +++ b/packages/next-codemod/transforms/next-image-to-legacy-image.ts @@ -15,12 +15,7 @@ export default function transformer( source: { value: 'next/image' }, }) .forEach((imageImport) => { - j(imageImport).replaceWith( - j.importDeclaration( - imageImport.node.specifiers, - j.stringLiteral('next/legacy/image') - ) - ) + imageImport.node.source = j.stringLiteral('next/legacy/image') }) // Before: const Image = await import("next/image") // After: const Image = await import("next/legacy/image") @@ -43,12 +38,7 @@ export default function transformer( source: { value: 'next/future/image' }, }) .forEach((imageFutureImport) => { - j(imageFutureImport).replaceWith( - j.importDeclaration( - imageFutureImport.node.specifiers, - j.stringLiteral('next/image') - ) - ) + imageFutureImport.node.source = j.stringLiteral('next/image') }) // Before: const Image = await import("next/future/image") diff --git a/packages/next-env/package.json b/packages/next-env/package.json index c289da848cd8d..ff39bbbb4029e 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "13.1.7-canary.17", + "version": "13.2.3", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 99095fd97ec24..f0d11f3095ca5 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "13.1.7-canary.17", + "version": "13.2.3", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 9b679374b3e89..e84226bdf7d8d 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "13.1.7-canary.17", + "version": "13.2.3", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index ce6ff41aa6cc3..c71b8c112db0a 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "13.1.7-canary.17", + "version": "13.2.3", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 07cb6ea1c5f1e..ba0fd2d0e8d63 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "13.1.7-canary.17", + "version": "13.2.3", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/Cargo.lock b/packages/next-swc/Cargo.lock index 9c202c6028496..0b126103c3cc6 100644 --- a/packages/next-swc/Cargo.lock +++ b/packages/next-swc/Cargo.lock @@ -101,6 +101,17 @@ dependencies = [ "syn", ] +[[package]] +name = "async-recursion" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b015a331cc64ebd1774ba119538573603427eaace0a1950c423ab971f903796" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "async-trait" version = "0.1.64" @@ -126,7 +137,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "serde", ] @@ -859,6 +870,12 @@ version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +[[package]] +name = "dunce" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" + [[package]] name = "easy-error" version = "1.0.0" @@ -2279,7 +2296,7 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "next-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "mdxjs", "modularize_imports", @@ -2295,7 +2312,7 @@ dependencies = [ [[package]] name = "next-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "auto-hash-map", @@ -2325,9 +2342,10 @@ dependencies = [ [[package]] name = "next-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", + "dunce", "futures", "mime", "next-core", @@ -2350,7 +2368,7 @@ dependencies = [ [[package]] name = "next-font" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "fxhash", "serde", @@ -2404,7 +2422,7 @@ dependencies = [ [[package]] name = "next-transform-dynamic" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "pathdiff", "swc_core", @@ -2413,7 +2431,7 @@ dependencies = [ [[package]] name = "next-transform-strip-page-exports" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "fxhash", "swc_core", @@ -2423,7 +2441,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "clap", @@ -5451,7 +5469,7 @@ dependencies = [ [[package]] name = "turbo-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "mimalloc", ] @@ -5459,7 +5477,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "auto-hash-map", @@ -5489,7 +5507,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "cargo-lock", @@ -5501,7 +5519,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "dotenvy", @@ -5515,7 +5533,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "indexmap", @@ -5532,13 +5550,14 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "auto-hash-map", "bitflags", "bytes", "concurrent-queue", + "dunce", "futures", "futures-retry", "include_dir", @@ -5558,7 +5577,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "base16", "hex", @@ -5570,7 +5589,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "convert_case 0.5.0", @@ -5584,7 +5603,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "proc-macro2", "quote", @@ -5594,7 +5613,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "auto-hash-map", @@ -5616,9 +5635,10 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", + "async-recursion", "indexmap", "lazy_static", "regex", @@ -5641,7 +5661,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "clap", @@ -5657,7 +5677,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "async-trait", @@ -5683,11 +5703,12 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "async-trait", "indexmap", + "indoc", "once_cell", "regex", "serde", @@ -5704,7 +5725,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "futures", @@ -5713,6 +5734,7 @@ dependencies = [ "indexmap", "mime", "mime_guess", + "once_cell", "parking_lot", "pin-project-lite", "serde", @@ -5733,7 +5755,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "async-trait", @@ -5772,7 +5794,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "serde", @@ -5787,7 +5809,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "serde", @@ -5802,7 +5824,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "mdxjs", @@ -5817,7 +5839,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "futures", @@ -5830,6 +5852,7 @@ dependencies = [ "tokio", "turbo-tasks", "turbo-tasks-build", + "turbo-tasks-env", "turbo-tasks-fs", "turbopack-core", "turbopack-dev-server", @@ -5840,7 +5863,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "anyhow", "serde", @@ -5856,7 +5879,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230214.2#6d5fee7f19b229e75d692ef6fbb75056c20511e8" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230228.1#ec742f70e150381d094636eff815f40f22c5d168" dependencies = [ "swc_core", "turbo-tasks", diff --git a/packages/next-swc/crates/core/Cargo.toml b/packages/next-swc/crates/core/Cargo.toml index 32fac85a8fb53..6c3e0ad5efba6 100644 --- a/packages/next-swc/crates/core/Cargo.toml +++ b/packages/next-swc/crates/core/Cargo.toml @@ -19,7 +19,7 @@ serde = "1" serde_json = "1" tracing = { version = "0.1.37", features = ["release_max_level_info"] } -next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2", features = [ +next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [ "__swc_core", "__swc_core_next_core", "__swc_transform_styled_jsx", @@ -29,7 +29,7 @@ next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-2 ] } [dev-dependencies] -next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2", features = [ +next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [ "__swc_core_testing_transform", "__swc_testing", ] } diff --git a/packages/next-swc/crates/core/src/auto_cjs/mod.rs b/packages/next-swc/crates/core/src/auto_cjs/mod.rs index 239a82a2b8df6..baf347f32b9db 100644 --- a/packages/next-swc/crates/core/src/auto_cjs/mod.rs +++ b/packages/next-swc/crates/core/src/auto_cjs/mod.rs @@ -20,7 +20,10 @@ impl Visit for CjsFinder { fn visit_member_expr(&mut self, e: &MemberExpr) { if let Expr::Ident(obj) = &*e.obj { if let MemberProp::Ident(prop) = &e.prop { - if &*obj.sym == "module" && &*prop.sym == "exports" { + // Detect `module.exports` and `exports.__esModule` + if (&*obj.sym == "module" && &*prop.sym == "exports") + || (&*obj.sym == "exports" && &*prop.sym == "__esModule") + { self.found = true; return; } @@ -31,9 +34,35 @@ impl Visit for CjsFinder { e.prop.visit_with(self); } - fn visit_str(&mut self, s: &Str) { - if s.value.contains("__esModule") { - self.found = true; + // Detect `Object.defineProperty(exports, "__esModule", ...)` + // Note that `Object.defineProperty(module.exports, ...)` will be handled by + // `visit_member_expr`. + fn visit_call_expr(&mut self, e: &CallExpr) { + if let Callee::Expr(expr) = &e.callee { + if let Expr::Member(member_expr) = &**expr { + if let (Expr::Ident(obj), MemberProp::Ident(prop)) = + (&*member_expr.obj, &member_expr.prop) + { + if &*obj.sym == "Object" && &*prop.sym == "defineProperty" { + if let Some(ExprOrSpread { expr: expr0, .. }) = e.args.get(0) { + if let Expr::Ident(arg0) = &**expr0 { + if &*arg0.sym == "exports" { + if let Some(ExprOrSpread { expr: expr1, .. }) = e.args.get(1) { + if let Expr::Lit(Lit::Str(arg1)) = &**expr1 { + if &*arg1.value == "__esModule" { + self.found = true; + return; + } + } + } + } + } + } + } + } + } } + + e.callee.visit_with(self); } } diff --git a/packages/next-swc/crates/core/src/react_server_components.rs b/packages/next-swc/crates/core/src/react_server_components.rs index a32d81b7cf98f..5271f3c02c4a1 100644 --- a/packages/next-swc/crates/core/src/react_server_components.rs +++ b/packages/next-swc/crates/core/src/react_server_components.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use std::path::PathBuf; use regex::Regex; @@ -42,6 +43,7 @@ struct ReactServerComponents { filepath: String, app_dir: Option, comments: C, + export_names: Vec, invalid_server_imports: Vec, invalid_client_imports: Vec, invalid_server_react_apis: Vec, @@ -77,7 +79,7 @@ impl ReactServerComponents { // Collects top level directives and imports, then removes specific ones // from the AST. fn collect_top_level_directives_and_imports( - &self, + &mut self, module: &mut Module, ) -> (bool, Vec) { let mut imports: Vec = vec![]; @@ -169,6 +171,52 @@ impl ReactServerComponents { finished_directives = true; } + // Collect all export names. + ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(e)) => { + for specifier in &e.specifiers { + self.export_names.push(match specifier { + ExportSpecifier::Default(_) => "default".to_string(), + ExportSpecifier::Namespace(_) => "*".to_string(), + ExportSpecifier::Named(named) => match &named.exported { + Some(exported) => match &exported { + ModuleExportName::Ident(i) => i.sym.to_string(), + ModuleExportName::Str(s) => s.value.to_string(), + }, + _ => match &named.orig { + ModuleExportName::Ident(i) => i.sym.to_string(), + ModuleExportName::Str(s) => s.value.to_string(), + }, + }, + }) + } + } + ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { decl, .. })) => { + match decl { + Decl::Class(ClassDecl { ident, .. }) => { + self.export_names.push(ident.sym.to_string()); + } + Decl::Fn(FnDecl { ident, .. }) => { + self.export_names.push(ident.sym.to_string()); + } + Decl::Var(var) => { + for decl in &var.decls { + if let Pat::Ident(ident) = &decl.name { + self.export_names.push(ident.id.sym.to_string()); + } + } + } + _ => {} + } + } + ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(ExportDefaultDecl { + decl: _, + .. + })) => { + self.export_names.push("default".to_string()); + } + ModuleItem::ModuleDecl(ModuleDecl::ExportAll(_)) => { + self.export_names.push("*".to_string()); + } _ => { finished_directives = true; } @@ -244,12 +292,16 @@ impl ReactServerComponents { Comment { span: DUMMY_SP, kind: CommentKind::Block, - text: " __next_internal_client_entry_do_not_use__ ".into(), + text: format!( + " __next_internal_client_entry_do_not_use__ {} ", + self.export_names.join(",") + ) + .into(), }, ); } - fn assert_server_graph(&self, imports: &Vec, module: &Module) { + fn assert_server_graph(&self, imports: &[ModuleImports], module: &Module) { for import in imports { let source = import.source.0.clone(); if self.invalid_server_imports.contains(&source) { @@ -292,7 +344,7 @@ impl ReactServerComponents { } } - self.assert_invalid_api(module); + self.assert_invalid_api(module, false); self.assert_server_filename(module); } @@ -321,7 +373,7 @@ impl ReactServerComponents { } } - fn assert_client_graph(&self, imports: &Vec, module: &Module) { + fn assert_client_graph(&self, imports: &[ModuleImports], module: &Module) { for import in imports { let source = import.source.0.clone(); if self.invalid_client_imports.contains(&source) { @@ -336,48 +388,48 @@ impl ReactServerComponents { } } - self.assert_invalid_api(module); + self.assert_invalid_api(module, true); } - fn assert_invalid_api(&self, module: &Module) { - // Assert `getServerSideProps` and `getStaticProps` exports. + fn assert_invalid_api(&self, module: &Module, is_client_entry: bool) { let is_layout_or_page = Regex::new(r"/(page|layout)\.(ts|js)x?$") .unwrap() .is_match(&self.filepath); if is_layout_or_page { let mut span = DUMMY_SP; - let mut has_get_server_side_props = false; - let mut has_get_static_props = false; + let mut invalid_export_name = String::new(); + let mut invalid_exports: HashMap = HashMap::new(); + + fn invalid_exports_matcher( + export_name: &str, + invalid_exports: &mut HashMap, + ) -> bool { + match export_name { + "getServerSideProps" | "getStaticProps" | "generateMetadata" | "metadata" => { + invalid_exports.insert(export_name.to_string(), true); + true + } + _ => false, + } + } - 'matcher: for export in &module.body { + for export in &module.body { match export { ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(export)) => { for specifier in &export.specifiers { if let ExportSpecifier::Named(named) = specifier { match &named.orig { ModuleExportName::Ident(i) => { - if i.sym == *"getServerSideProps" { - has_get_server_side_props = true; - span = named.span; - break 'matcher; - } - if i.sym == *"getStaticProps" { - has_get_static_props = true; + if invalid_exports_matcher(&i.sym, &mut invalid_exports) { span = named.span; - break 'matcher; + invalid_export_name = i.sym.to_string(); } } ModuleExportName::Str(s) => { - if s.value == *"getServerSideProps" { - has_get_server_side_props = true; - span = named.span; - break 'matcher; - } - if s.value == *"getStaticProps" { - has_get_static_props = true; + if invalid_exports_matcher(&s.value, &mut invalid_exports) { span = named.span; - break 'matcher; + invalid_export_name = s.value.to_string(); } } } @@ -386,29 +438,17 @@ impl ReactServerComponents { } ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(export)) => match &export.decl { Decl::Fn(f) => { - if f.ident.sym == *"getServerSideProps" { - has_get_server_side_props = true; + if invalid_exports_matcher(&f.ident.sym, &mut invalid_exports) { span = f.ident.span; - break 'matcher; - } - if f.ident.sym == *"getStaticProps" { - has_get_static_props = true; - span = f.ident.span; - break 'matcher; + invalid_export_name = f.ident.sym.to_string(); } } Decl::Var(v) => { for decl in &v.decls { if let Pat::Ident(i) = &decl.name { - if i.sym == *"getServerSideProps" { - has_get_server_side_props = true; - span = i.span; - break 'matcher; - } - if i.sym == *"getStaticProps" { - has_get_static_props = true; + if invalid_exports_matcher(&i.sym, &mut invalid_exports) { span = i.span; - break 'matcher; + invalid_export_name = i.sym.to_string(); } } } @@ -419,20 +459,45 @@ impl ReactServerComponents { } } - if has_get_server_side_props || has_get_static_props { + // Assert invalid metadata and generateMetadata exports. + let has_gm_export = invalid_exports.contains_key("generateMetadata"); + let has_metadata_export = invalid_exports.contains_key("metadata"); + + // Client entry can't export `generateMetadata` or `metadata`. + if is_client_entry { + if has_gm_export || has_metadata_export { + HANDLER.with(|handler| { + handler + .struct_span_err( + span, + format!( + "NEXT_RSC_ERR_CLIENT_METADATA_EXPORT: {}", + invalid_export_name + ) + .as_str(), + ) + .emit() + }) + } + } else { + // Server entry can't export `generateMetadata` and `metadata` together. + if has_gm_export && has_metadata_export { + HANDLER.with(|handler| { + handler + .struct_span_err(span, "NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT") + .emit() + }) + } + } + // Assert `getServerSideProps` and `getStaticProps` exports. + if invalid_export_name == "getServerSideProps" + || invalid_export_name == "getStaticProps" + { HANDLER.with(|handler| { handler .struct_span_err( span, - format!( - "NEXT_RSC_ERR_INVALID_API: {}", - if has_get_server_side_props { - "getServerSideProps" - } else { - "getStaticProps" - } - ) - .as_str(), + format!("NEXT_RSC_ERR_INVALID_API: {}", invalid_export_name).as_str(), ) .emit() }) @@ -456,6 +521,7 @@ pub fn server_components( comments, filepath: filename.to_string(), app_dir, + export_names: vec![], invalid_server_imports: vec![ JsWord::from("client-only"), JsWord::from("react-dom/client"), diff --git a/packages/next-swc/crates/core/src/server_actions.rs b/packages/next-swc/crates/core/src/server_actions.rs index ea27cfeb60c19..949a911564e0c 100644 --- a/packages/next-swc/crates/core/src/server_actions.rs +++ b/packages/next-swc/crates/core/src/server_actions.rs @@ -166,6 +166,17 @@ impl VisitMut for ServerActions { .push(annotate(&f.ident, "$$name", action_name.into())); if self.top_level { + // myAction.$$bound = []; + self.annotations.push(annotate( + &f.ident, + "$$bound", + ArrayLit { + span: DUMMY_SP, + elems: Vec::new(), + } + .into(), + )); + if !(self.in_action_file && self.in_export_decl) { // export const $ACTION_myAction = myAction; self.extra_items @@ -197,10 +208,10 @@ impl VisitMut for ServerActions { used_ids: &ids_from_closure, }); - // myAction.$$closure = [id1, id2] + // myAction.$$bound = [id1, id2] self.annotations.push(annotate( &f.ident, - "$$closure", + "$$bound", ArrayLit { span: DUMMY_SP, elems: ids_from_closure @@ -218,7 +229,7 @@ impl VisitMut for ServerActions { args: vec![f .ident .clone() - .make_member(quote_ident!("$$closure")) + .make_member(quote_ident!("$$bound")) .as_arg()], type_args: Default::default(), }; diff --git a/packages/next-swc/crates/core/tests/errors/server-actions/1/output.js b/packages/next-swc/crates/core/tests/errors/server-actions/1/output.js index 8b63bdd40d8de..38a993359dad0 100644 --- a/packages/next-swc/crates/core/tests/errors/server-actions/1/output.js +++ b/packages/next-swc/crates/core/tests/errors/server-actions/1/output.js @@ -2,3 +2,4 @@ foo.$$typeof = Symbol.for("react.server.reference"); foo.$$filepath = "/app/item.js"; foo.$$name = "foo"; +foo.$$bound = []; \ No newline at end of file diff --git a/packages/next-swc/crates/core/tests/errors/server-actions/2/output.js b/packages/next-swc/crates/core/tests/errors/server-actions/2/output.js index 895b3089eb564..78ee72aa0b2f5 100644 --- a/packages/next-swc/crates/core/tests/errors/server-actions/2/output.js +++ b/packages/next-swc/crates/core/tests/errors/server-actions/2/output.js @@ -3,3 +3,4 @@ export function bar() {} bar.$$typeof = Symbol.for("react.server.reference"); bar.$$filepath = "/app/item.js"; bar.$$name = "bar"; +bar.$$bound = []; \ No newline at end of file diff --git a/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/input.js b/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/input.js index 3755b02505490..bcb3d113ad0a6 100644 --- a/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/input.js +++ b/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/input.js @@ -25,3 +25,10 @@ import "fs" export default function () { return null; } + +export const a = 1 +const b = 1 +export { b } +export { c } from 'c' +export * from 'd' +export { e as f } from 'e' diff --git a/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/output.js b/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/output.js index 6d2e4f9a4d1a1..4cb0208db1f51 100644 --- a/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/output.js +++ b/packages/next-swc/crates/core/tests/fixture/react-server-components/server-graph/client-entry/output.js @@ -1,3 +1,3 @@ // This is a comment. -/* __next_internal_client_entry_do_not_use__ */ const { createProxy } = require("private-next-rsc-mod-ref-proxy"); +/* __next_internal_client_entry_do_not_use__ default,a,b,c,*,f */ const { createProxy } = require("private-next-rsc-mod-ref-proxy"); module.exports = createProxy("/some-project/src/some-file.js"); diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/1/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/1/output.js index 69431941a707c..f8458be654646 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/1/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/1/output.js @@ -1,12 +1,12 @@ /* __next_internal_action_entry_do_not_use__ $ACTION_deleteItem */ import deleteFromDb from 'db' export function Item({ id1 , id2 }) { async function deleteItem() { - return $ACTION_deleteItem(deleteItem.$$closure); + return $ACTION_deleteItem(deleteItem.$$bound); } deleteItem.$$typeof = Symbol.for("react.server.reference"); deleteItem.$$filepath = "/app/item.js"; deleteItem.$$name = "$ACTION_deleteItem"; - deleteItem.$$closure = [ + deleteItem.$$bound = [ id1, id2 ]; diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/2/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/2/output.js index 270db3ccf1d86..8b95415ec63b4 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/2/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/2/output.js @@ -4,6 +4,7 @@ myAction.$$typeof = Symbol.for("react.server.reference"); myAction.$$filepath = "/app/item.js"; myAction.$$name = "$ACTION_myAction"; +myAction.$$bound = []; export const $ACTION_myAction = myAction; export default function Page() { return ; diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/3/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/3/output.js index 7206640f72924..79b7a1fefafd5 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/3/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/3/output.js @@ -5,3 +5,4 @@ myAction.$$typeof = Symbol.for("react.server.reference"); myAction.$$filepath = "/app/item.js"; myAction.$$name = "myAction"; +myAction.$$bound = []; diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/4/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/4/output.js index 07d24aefc5e3e..ebca00e095c85 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/4/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/4/output.js @@ -2,22 +2,25 @@ a.$$typeof = Symbol.for("react.server.reference"); a.$$filepath = "/app/item.js"; a.$$name = "a"; +a.$$bound = []; export async function b() {} b.$$typeof = Symbol.for("react.server.reference"); b.$$filepath = "/app/item.js"; b.$$name = "b"; +b.$$bound = []; export async function c() {} c.$$typeof = Symbol.for("react.server.reference"); c.$$filepath = "/app/item.js"; c.$$name = "c"; +c.$$bound = []; function d() {} function Foo() { async function e() { - return $ACTION_e(e.$$closure); + return $ACTION_e(e.$$bound); } e.$$typeof = Symbol.for("react.server.reference"); e.$$filepath = "/app/item.js"; e.$$name = "$ACTION_e"; - e.$$closure = []; + e.$$bound = []; } export async function $ACTION_e(closure) {} \ No newline at end of file diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/5/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/5/output.js index c3805b24d12fe..0dac9bbb9fd18 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/5/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/5/output.js @@ -3,12 +3,12 @@ const v1 = 'v1'; export function Item({ id1 , id2 }) { const v2 = id2; async function deleteItem() { - return $ACTION_deleteItem(deleteItem.$$closure); + return $ACTION_deleteItem(deleteItem.$$bound); } deleteItem.$$typeof = Symbol.for("react.server.reference"); deleteItem.$$filepath = "/app/item.js"; deleteItem.$$name = "$ACTION_deleteItem"; - deleteItem.$$closure = [ + deleteItem.$$bound = [ id1, v2 ]; diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/6/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/6/output.js index f365c7fcf38aa..1a439964a2e28 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/6/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/6/output.js @@ -18,12 +18,12 @@ export function y(p, [p1, { p2 }], ...p3) { const f8 = 1; } async function action() { - return $ACTION_action(action.$$closure); + return $ACTION_action(action.$$bound); } action.$$typeof = Symbol.for("react.server.reference"); action.$$filepath = "/app/item.js"; action.$$name = "$ACTION_action"; - action.$$closure = [ + action.$$bound = [ f2, f2, f11, diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/7/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/7/output.js index d292a7466a5e7..e6fc67b750c9b 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/7/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/7/output.js @@ -1,12 +1,12 @@ /* __next_internal_action_entry_do_not_use__ $ACTION_deleteItem */ import deleteFromDb from 'db'; export function Item(product, foo, bar) { async function deleteItem() { - return $ACTION_deleteItem(deleteItem.$$closure); + return $ACTION_deleteItem(deleteItem.$$bound); } deleteItem.$$typeof = Symbol.for("react.server.reference"); deleteItem.$$filepath = "/app/item.js"; deleteItem.$$name = "$ACTION_deleteItem"; - deleteItem.$$closure = [ + deleteItem.$$bound = [ product.id, product?.foo, product.bar.baz, diff --git a/packages/next-swc/crates/core/tests/fixture/server-actions/8/output.js b/packages/next-swc/crates/core/tests/fixture/server-actions/8/output.js index df571e856f05a..23ef58e08cd83 100644 --- a/packages/next-swc/crates/core/tests/fixture/server-actions/8/output.js +++ b/packages/next-swc/crates/core/tests/fixture/server-actions/8/output.js @@ -6,6 +6,7 @@ myAction.$$typeof = Symbol.for("react.server.reference"); myAction.$$filepath = "/app/item.js"; myAction.$$name = "$ACTION_myAction"; +myAction.$$bound = []; export const $ACTION_myAction = myAction; export default function Page() { return ; diff --git a/packages/next-swc/crates/core/tests/full/auto-cjs/2/input.js b/packages/next-swc/crates/core/tests/full/auto-cjs/2/input.js new file mode 100644 index 0000000000000..6ee76458e3be6 --- /dev/null +++ b/packages/next-swc/crates/core/tests/full/auto-cjs/2/input.js @@ -0,0 +1,2 @@ +export default 1 +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/next-swc/crates/core/tests/full/auto-cjs/2/output.js b/packages/next-swc/crates/core/tests/full/auto-cjs/2/output.js new file mode 100644 index 0000000000000..116e09cb5d6b5 --- /dev/null +++ b/packages/next-swc/crates/core/tests/full/auto-cjs/2/output.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: !0 +}), Object.defineProperty(exports, "default", { + enumerable: !0, + get: function() { + return e; + } +}); +var e = 1; +Object.defineProperty(exports, "__esModule", { + value: !0 +}); diff --git a/packages/next-swc/crates/core/tests/full/auto-cjs/3/input.js b/packages/next-swc/crates/core/tests/full/auto-cjs/3/input.js new file mode 100644 index 0000000000000..1b7eefb6a8ec3 --- /dev/null +++ b/packages/next-swc/crates/core/tests/full/auto-cjs/3/input.js @@ -0,0 +1,4 @@ +export default 1 +console.log("__esModule") +Object.defineProperty({}, '__esModule', { value: true }) +Object.defineProperty() diff --git a/packages/next-swc/crates/core/tests/full/auto-cjs/3/output.js b/packages/next-swc/crates/core/tests/full/auto-cjs/3/output.js new file mode 100644 index 0000000000000..7e5d970edef9a --- /dev/null +++ b/packages/next-swc/crates/core/tests/full/auto-cjs/3/output.js @@ -0,0 +1,4 @@ +export default 1; +console.log("__esModule"), Object.defineProperty({}, "__esModule", { + value: !0 +}), Object.defineProperty(); diff --git a/packages/next-swc/crates/napi/Cargo.toml b/packages/next-swc/crates/napi/Cargo.toml index 17b49e0ed63ef..bd4ffa65e76f1 100644 --- a/packages/next-swc/crates/napi/Cargo.toml +++ b/packages/next-swc/crates/napi/Cargo.toml @@ -39,10 +39,10 @@ tracing = { version = "0.1.37", features = ["release_max_level_info"] } tracing-futures = "0.2.5" tracing-subscriber = "0.3.9" tracing-chrome = "0.5.0" -turbo-malloc = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2" } -turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2" } -turbo-tasks-memory = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2" } -next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2", features = [ +turbo-malloc = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1" } +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1" } +turbo-tasks-memory = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1" } +next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [ "__swc_core_binding_napi", "__turbo_next_dev_server", "__turbo_node_file_trace", diff --git a/packages/next-swc/crates/wasm/Cargo.toml b/packages/next-swc/crates/wasm/Cargo.toml index de587f8b4f706..ccfa221ca2fb1 100644 --- a/packages/next-swc/crates/wasm/Cargo.toml +++ b/packages/next-swc/crates/wasm/Cargo.toml @@ -31,7 +31,7 @@ wasm-bindgen-futures = "0.4.8" getrandom = { version = "0.2.5", optional = true, default-features = false } js-sys = "0.3.59" serde-wasm-bindgen = "0.4.3" -next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230214.2", features = [ +next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [ "__swc_core_binding_wasm", "__feature_mdx_rs", ] } diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 40703ec959a76..df888ee63af05 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "13.1.7-canary.17", + "version": "13.2.3", "private": true, "scripts": { "clean": "rm -rf ./native/*", diff --git a/packages/next/navigation-types/compat/navigation.d.ts b/packages/next/navigation-types/compat/navigation.d.ts index 28b46d331740e..fb6e2d07ab00a 100644 --- a/packages/next/navigation-types/compat/navigation.d.ts +++ b/packages/next/navigation-types/compat/navigation.d.ts @@ -18,7 +18,4 @@ declare module 'next/navigation' { * router is not ready. */ export function usePathname(): string | null - - // Re-export the types for next/navigation. - export * from 'next/dist/client/components/navigation' } diff --git a/packages/next/navigation-types/navigation.d.ts b/packages/next/navigation-types/navigation.d.ts deleted file mode 100644 index 12ed2d55c8394..0000000000000 --- a/packages/next/navigation-types/navigation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { ReadonlyURLSearchParams } from 'next/navigation' - -declare module 'next/navigation' { - /** - * Get a read-only URLSearchParams object. For example searchParams.get('foo') would return 'bar' when ?foo=bar - * Learn more about URLSearchParams here: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams - */ - export function useSearchParams(): ReadonlyURLSearchParams - - /** - * Get the current pathname. For example, if the URL is - * https://example.com/foo?bar=baz, the pathname would be /foo. - */ - export function usePathname(): string - - // Re-export the types for next/navigation. - export * from 'next/dist/client/components/navigation' -} diff --git a/packages/next/package.json b/packages/next/package.json index 2fdc9c8dab000..55e5aaca2d393 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "13.1.7-canary.17", + "version": "13.2.3", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -80,13 +80,14 @@ ] }, "dependencies": { - "@next/env": "13.1.7-canary.17", + "@next/env": "13.2.3", "@swc/helpers": "0.4.14", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", "styled-jsx": "5.1.1" }, "peerDependencies": { + "@opentelemetry/api": "^1.4.0", "fibers": ">= 3.1.0", "node-sass": "^6.0.0 || ^7.0.0", "react": "^18.2.0", @@ -102,6 +103,9 @@ }, "fibers": { "optional": true + }, + "@opentelemetry/api": { + "optional": true } }, "devDependencies": { @@ -126,15 +130,17 @@ "@babel/runtime": "7.15.4", "@babel/traverse": "7.18.0", "@babel/types": "7.18.0", - "@edge-runtime/primitives": "2.0.0", + "@edge-runtime/cookies": "3.0.4", + "@edge-runtime/primitives": "2.0.5", "@hapi/accept": "5.0.2", "@napi-rs/cli": "2.14.7", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "13.1.7-canary.17", - "@next/polyfill-nomodule": "13.1.7-canary.17", - "@next/react-dev-overlay": "13.1.7-canary.17", - "@next/react-refresh-utils": "13.1.7-canary.17", - "@next/swc": "13.1.7-canary.17", + "@next/polyfill-module": "13.2.3", + "@next/polyfill-nomodule": "13.2.3", + "@next/react-dev-overlay": "13.2.3", + "@next/react-refresh-utils": "13.2.3", + "@next/swc": "13.2.3", + "@opentelemetry/api": "1.4.0", "@segment/ajv-human-errors": "2.1.2", "@taskr/clear": "1.1.0", "@taskr/esnext": "1.1.0", @@ -152,6 +158,7 @@ "@types/cookie": "0.3.3", "@types/cross-spawn": "6.0.0", "@types/debug": "4.1.5", + "@types/express-serve-static-core": "4.17.33", "@types/fresh": "0.5.0", "@types/glob": "7.1.1", "@types/jsonwebtoken": "9.0.0", @@ -204,7 +211,7 @@ "cross-spawn": "7.0.3", "crypto-browserify": "3.12.0", "css.escape": "1.5.1", - "cssnano-simple": "3.0.1", + "cssnano-preset-default": "5.2.14", "data-uri-to-buffer": "3.0.1", "debug": "4.1.1", "devalue": "2.0.1", @@ -227,6 +234,7 @@ "jest-worker": "27.0.0-next.5", "json5": "2.2.3", "jsonwebtoken": "9.0.0", + "loader-runner": "4.3.0", "loader-utils2": "npm:loader-utils@2.0.0", "loader-utils3": "npm:loader-utils@3.1.3", "lodash.curry": "4.1.1", diff --git a/packages/next/src/build/analysis/get-page-static-info.ts b/packages/next/src/build/analysis/get-page-static-info.ts index 65a8dfe568fc7..e55339b116236 100644 --- a/packages/next/src/build/analysis/get-page-static-info.ts +++ b/packages/next/src/build/analysis/get-page-static-info.ts @@ -17,6 +17,7 @@ import { tryToParsePath } from '../../lib/try-to-parse-path' import { isAPIRoute } from '../../lib/is-api-route' import { isEdgeRuntime } from '../../lib/is-edge-runtime' import { RSC_MODULE_TYPES } from '../../shared/lib/constants' +import type { RSCMeta } from '../webpack/loaders/get-module-build-info' export interface MiddlewareConfig { matchers: MiddlewareMatcher[] @@ -39,21 +40,18 @@ export interface PageStaticInfo { middleware?: Partial } -const CLIENT_MODULE_LABEL = '/* __next_internal_client_entry_do_not_use__ */' +const CLIENT_MODULE_LABEL = + /\/\* __next_internal_client_entry_do_not_use__ ([^ ]*) \*\// const ACTION_MODULE_LABEL = /\/\* __next_internal_action_entry_do_not_use__ ([^ ]+) \*\// export type RSCModuleType = 'server' | 'client' -export function getRSCModuleInformation(source: string): { - type: RSCModuleType - actions?: string[] -} { - const type = source.includes(CLIENT_MODULE_LABEL) - ? RSC_MODULE_TYPES.client - : RSC_MODULE_TYPES.server - +export function getRSCModuleInformation(source: string): RSCMeta { + const clientRefs = source.match(CLIENT_MODULE_LABEL)?.[1]?.split(',') const actions = source.match(ACTION_MODULE_LABEL)?.[1]?.split(',') - return { type, actions } + + const type = clientRefs ? RSC_MODULE_TYPES.client : RSC_MODULE_TYPES.server + return { type, actions, clientRefs } } /** @@ -142,7 +140,7 @@ async function tryToReadFile(filePath: string, shouldThrow: boolean) { } } -function getMiddlewareMatchers( +export function getMiddlewareMatchers( matcherOrMatchers: unknown, nextConfig: NextConfig ): MiddlewareMatcher[] { diff --git a/packages/next/src/build/build-context.ts b/packages/next/src/build/build-context.ts index 0130be1746b16..4222d8738912e 100644 --- a/packages/next/src/build/build-context.ts +++ b/packages/next/src/build/build-context.ts @@ -1,10 +1,11 @@ -import { LoadedEnvFiles } from '@next/env' -import { Ora } from 'next/dist/compiled/ora' -import { Rewrite } from '../lib/load-custom-routes' -import { __ApiPreviewProps } from '../server/api-utils' -import { NextConfigComplete } from '../server/config-shared' -import { Span } from '../trace' -import { TelemetryPlugin } from './webpack/plugins/telemetry-plugin' +import type { LoadedEnvFiles } from '@next/env' +import type { Ora } from 'next/dist/compiled/ora' +import type { Rewrite, Redirect } from '../lib/load-custom-routes' +import type { __ApiPreviewProps } from '../server/api-utils' +import type { NextConfigComplete } from '../server/config-shared' +import type { Span } from '../trace' +import type getBaseWebpackConfig from './webpack-config' +import type { TelemetryPlugin } from './webpack/plugins/telemetry-plugin' // a global object to store context for the current build // this is used to pass data between different steps of the build without having @@ -22,6 +23,12 @@ export const NextBuildContext: Partial<{ afterFiles: Rewrite[] beforeFiles: Rewrite[] } + originalRewrites: { + fallback: Rewrite[] + afterFiles: Rewrite[] + beforeFiles: Rewrite[] + } + originalRedirects: Redirect[] loadedEnvFiles: LoadedEnvFiles previewProps: __ApiPreviewProps mappedPages: @@ -37,6 +44,7 @@ export const NextBuildContext: Partial<{ mappedRootPaths: { [page: string]: string } + hasInstrumentationHook: boolean // misc fields telemetryPlugin: TelemetryPlugin @@ -47,4 +55,7 @@ export const NextBuildContext: Partial<{ reactProductionProfiling: boolean noMangling: boolean appDirOnly: boolean + clientRouterFilters: Parameters< + typeof getBaseWebpackConfig + >[1]['clientRouterFilters'] }> = {} diff --git a/packages/next/src/build/entries.ts b/packages/next/src/build/entries.ts index b359e92afbf0d..192adaaf8df7d 100644 --- a/packages/next/src/build/entries.ts +++ b/packages/next/src/build/entries.ts @@ -17,6 +17,7 @@ import { ROOT_DIR_ALIAS, APP_DIR_ALIAS, WEBPACK_LAYERS, + INSTRUMENTATION_HOOK_FILENAME, } from '../lib/constants' import { isAPIRoute } from '../lib/is-api-route' import { isEdgeRuntime } from '../lib/is-edge-runtime' @@ -36,6 +37,7 @@ import { warn } from './output/log' import { isMiddlewareFile, isMiddlewareFilename, + isInstrumentationHookFile, NestedMiddlewareError, } from './utils' import { getPageStaticInfo } from './analysis/get-page-static-info' @@ -148,6 +150,7 @@ export interface CreateEntrypointsParams { appDir?: string appPaths?: Record pageExtensions: string[] + hasInstrumentationHook?: boolean } export function getEdgeServerEntry(opts: { @@ -163,6 +166,7 @@ export function getEdgeServerEntry(opts: { middleware?: Partial pagesType: 'app' | 'pages' | 'root' appDirLoader?: string + hasInstrumentationHook?: boolean }) { if ( opts.pagesType === 'app' && @@ -200,6 +204,13 @@ export function getEdgeServerEntry(opts: { return `next-edge-function-loader?${stringify(loaderParams)}!` } + if (isInstrumentationHookFile(opts.page)) { + return { + import: opts.absolutePagePath, + filename: `edge-${INSTRUMENTATION_HOOK_FILENAME}.js`, + } + } + const loaderParams: EdgeSSRLoaderQuery = { absolute500Path: opts.pages['/500'] || '', absoluteAppPath: opts.pages['/_app'], @@ -214,6 +225,8 @@ export function getEdgeServerEntry(opts: { pagesType: opts.pagesType, appDirLoader: Buffer.from(opts.appDirLoader || '').toString('base64'), sriEnabled: !opts.isDev && !!opts.config.experimental.sri?.algorithm, + incrementalCacheHandlerPath: + opts.config.experimental.incrementalCacheHandlerPath, } return { @@ -267,7 +280,13 @@ export async function runDependingOnPageType(params: { onServer: () => T page: string pageRuntime: ServerRuntime + pageType?: 'app' | 'pages' | 'root' }): Promise { + if (params.pageType === 'root' && isInstrumentationHookFile(params.page)) { + await Promise.all([params.onServer(), params.onEdgeServer()]) + return + } + if (isMiddlewareFile(params.page)) { await params.onEdgeServer() return @@ -404,6 +423,7 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { await runDependingOnPageType({ page, pageRuntime: staticInfo.runtime, + pageType: pagesType, onClient: () => { if (isServerComponent || isInsideAppDir) { // We skip the initial entries for server component pages and let the @@ -427,7 +447,15 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { assetPrefix: config.assetPrefix, }) } else { - server[serverBundlePath] = [mappings[page]] + if (isInstrumentationHookFile(page) && pagesType === 'root') { + server[serverBundlePath.replace('src/', '')] = { + import: mappings[page], + // the '../' is needed to make sure the file is not chunked + filename: `../${INSTRUMENTATION_HOOK_FILENAME}.js`, + } + } else { + server[serverBundlePath] = [mappings[page]] + } } }, onEdgeServer: () => { @@ -443,8 +471,11 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { assetPrefix: config.assetPrefix, }).import } - - edgeServer[serverBundlePath] = getEdgeServerEntry({ + const normalizedServerBundlePath = + isInstrumentationHookFile(page) && pagesType === 'root' + ? serverBundlePath.replace('src/', '') + : serverBundlePath + edgeServer[normalizedServerBundlePath] = getEdgeServerEntry({ ...params, rootDir, absolutePagePath: mappings[page], diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index 4dbabf4165a9e..c727009ea9a15 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -23,6 +23,7 @@ import { PUBLIC_DIR_MIDDLEWARE_CONFLICT, MIDDLEWARE_FILENAME, PAGES_DIR_ALIAS, + INSTRUMENTATION_HOOK_FILENAME, } from '../lib/constants' import { fileExists } from '../lib/file-exists' import { findPagesDir } from '../lib/find-pages-dir' @@ -67,6 +68,7 @@ import { MIDDLEWARE_REACT_LOADABLE_MANIFEST, TURBO_TRACE_DEFAULT_MEMORY_LIMIT, TRACE_OUTPUT_VERSION, + SERVER_REFERENCE_MANIFEST, } from '../shared/lib/constants' import { getSortedRoutes, isDynamicRoute } from '../shared/lib/router/utils' import { __ApiPreviewProps } from '../server/api-utils' @@ -129,22 +131,26 @@ import { import { webpackBuild } from './webpack-build' import { NextBuildContext } from './build-context' import { normalizePathSep } from '../shared/lib/page-path/normalize-path-sep' +import { isAppRouteRoute } from '../lib/is-app-route-route' +import { createClientRouterFilter } from '../lib/create-client-router-filter' export type SsgRoute = { initialRevalidateSeconds: number | false srcRoute: string | null - dataRoute: string + dataRoute: string | null + initialStatus?: number + initialHeaders?: Record } export type DynamicSsgRoute = { routeRegex: string fallback: string | null | false - dataRoute: string - dataRouteRegex: string + dataRoute: string | null + dataRouteRegex: string | null } export type PrerenderManifest = { - version: 3 + version: 4 routes: { [route: string]: SsgRoute } dynamicRoutes: { [route: string]: DynamicSsgRoute } notFoundRoutes: string[] @@ -287,6 +293,8 @@ export default async function build( const { headers, rewrites, redirects } = customRoutes NextBuildContext.rewrites = rewrites + NextBuildContext.originalRewrites = config._originalRewrites + NextBuildContext.originalRedirects = config._originalRedirects const cacheDir = path.join(distDir, 'cache') if (ciEnvironment.isCI && !ciEnvironment.hasNextSupport) { @@ -513,11 +521,30 @@ export default async function build( `^${MIDDLEWARE_FILENAME}\\.(?:${config.pageExtensions.join('|')})$` ) + const instrumentationHookDetectionRegExp = new RegExp( + `^${INSTRUMENTATION_HOOK_FILENAME}\\.(?:${config.pageExtensions.join( + '|' + )})$` + ) + const rootDir = path.join((pagesDir || appDir)!, '..') + const instrumentationHookEnabled = Boolean( + config.experimental.instrumentationHook + ) const rootPaths = ( - await flatReaddir(rootDir, middlewareDetectionRegExp) + await flatReaddir(rootDir, [ + middlewareDetectionRegExp, + ...(instrumentationHookEnabled + ? [instrumentationHookDetectionRegExp] + : []), + ]) ).map((absoluteFile) => absoluteFile.replace(dir, '')) + const hasInstrumentationHook = rootPaths.some((p) => + p.includes(INSTRUMENTATION_HOOK_FILENAME) + ) + NextBuildContext.hasInstrumentationHook = hasInstrumentationHook + // needed for static exporting since we want to replace with HTML // files @@ -817,6 +844,18 @@ export default async function build( ...rewrites.fallback, ] + if (config.experimental.clientRouterFilter) { + const nonInternalRedirects = (config._originalRedirects || []).filter( + (r: any) => !r.internal + ) + const clientRouterFilters = createClientRouterFilter( + appPageKeys, + nonInternalRedirects + ) + + NextBuildContext.clientRouterFilters = clientRouterFilters + } + const distDirCreated = await nextBuildSpan .traceChild('create-dist-dir') .traceAsyncFn(async () => { @@ -860,6 +899,9 @@ export default async function build( ) ) + const outputFileTracingRoot = + config.experimental.outputFileTracingRoot || dir + const manifestPath = path.join(distDir, SERVER_DIRECTORY, PAGES_MANIFEST) const requiredServerFiles = nextBuildSpan @@ -877,9 +919,17 @@ export default async function build( experimental: { ...config.experimental, trustHostHeader: ciEnvironment.hasNextSupport, + incrementalCacheHandlerPath: config.experimental + .incrementalCacheHandlerPath + ? path.relative( + distDir, + config.experimental.incrementalCacheHandlerPath + ) + : undefined, }, }, appDir: dir, + relativeAppDir: path.relative(outputFileTracingRoot, dir), files: [ ROUTES_MANIFEST, path.relative(distDir, manifestPath), @@ -923,6 +973,14 @@ export default async function build( SERVER_DIRECTORY, FLIGHT_SERVER_CSS_MANIFEST + '.json' ), + path.join( + SERVER_DIRECTORY, + SERVER_REFERENCE_MANIFEST + '.js' + ), + path.join( + SERVER_DIRECTORY, + SERVER_REFERENCE_MANIFEST + '.json' + ), ] : []), REACT_LOADABLE_MANIFEST, @@ -933,6 +991,18 @@ export default async function build( appDir ? path.join(SERVER_DIRECTORY, APP_PATHS_MANIFEST) : null, path.join(SERVER_DIRECTORY, FONT_LOADER_MANIFEST + '.js'), path.join(SERVER_DIRECTORY, FONT_LOADER_MANIFEST + '.json'), + ...(hasInstrumentationHook + ? [ + path.join( + SERVER_DIRECTORY, + `${INSTRUMENTATION_HOOK_FILENAME}.js` + ), + path.join( + SERVER_DIRECTORY, + `edge-${INSTRUMENTATION_HOOK_FILENAME}.js` + ), + ] + : []), ] .filter(nonNullable) .map((file) => path.join(config.distDir, file)), @@ -1337,17 +1407,7 @@ export default async function build( pageType === 'app' && staticInfo?.rsc !== RSC_MODULE_TYPES.client - if ( - !isReservedPage(page) && - // TODO-APP: static generation of route - !( - pageType === 'app' && - isEdgeRuntime(pageRuntime) && - pagePath - .replace(/\\/g, '/') - .match(`/route\\.(?:${config.pageExtensions.join('|')})$`) - ) - ) { + if (pageType === 'app' || !isReservedPage(page)) { try { let edgeInfo: any @@ -1409,26 +1469,41 @@ export default async function build( ssgPageRoutes = workerResult.prerenderRoutes isSsg = true } - if ( - (!isDynamicRoute(page) || - !workerResult.prerenderRoutes?.length) && - workerResult.appConfig?.revalidate !== 0 && - // TODO-APP: (wyattjoh) this may be where we can enable prerendering for app handlers - originalAppPath.endsWith('/page') - ) { - appStaticPaths.set(originalAppPath, [page]) - appStaticPathsEncoded.set(originalAppPath, [page]) - isStatic = true + + const appConfig = workerResult.appConfig || {} + if (workerResult.appConfig?.revalidate !== 0) { + const isDynamic = isDynamicRoute(page) + const hasGenerateStaticParams = + !!workerResult.prerenderRoutes?.length + + if ( + // Mark the app as static if: + // - It has no dynamic param + // - It doesn't have generateStaticParams but `dynamic` is set to + // `error` or `force-static` + !isDynamic + ) { + appStaticPaths.set(originalAppPath, [page]) + appStaticPathsEncoded.set(originalAppPath, [page]) + isStatic = true + } else if ( + isDynamic && + !hasGenerateStaticParams && + (appConfig.dynamic === 'error' || + appConfig.dynamic === 'force-static') + ) { + appStaticPaths.set(originalAppPath, []) + appStaticPathsEncoded.set(originalAppPath, []) + isStatic = true + } } + if (workerResult.prerenderFallback) { // whether or not to allow requests for paths not // returned from generateStaticParams appDynamicParamPaths.add(originalAppPath) } - appDefaultConfigs.set( - originalAppPath, - workerResult.appConfig || {} - ) + appDefaultConfigs.set(originalAppPath, appConfig) } } else { if (isEdgeRuntime(pageRuntime)) { @@ -1827,7 +1902,13 @@ export default async function build( 'cache/next-server.js.nft.json' ) - if (lockFiles.length > 0) { + if ( + lockFiles.length > 0 && + // we can't leverage trace cache if this is configured + // currently unless we break this to a separate trace + // file + !config.experimental.incrementalCacheHandlerPath + ) { const cacheHash = ( require('crypto') as typeof import('crypto') ).createHash('sha256') @@ -1860,8 +1941,8 @@ export default async function build( const root = config.experimental?.turbotrace?.contextDirectory ?? - config.experimental?.outputFileTracingRoot ?? - dir + outputFileTracingRoot + const nextServerEntry = require.resolve( 'next/dist/server/next-server' ) @@ -2106,9 +2187,6 @@ export default async function build( ) ) - const outputFileTracingRoot = - config.experimental.outputFileTracingRoot || dir - if (config.output === 'standalone') { await nextBuildSpan .traceChild('copy-traced-files') @@ -2195,6 +2273,7 @@ export default async function build( const exportConfig: any = { ...config, initialPageRevalidationMap: {}, + initialPageMetaMap: {}, pageDurationMap: {}, ssgNotFoundPaths: [] as string[], // Default map will be the collection of automatic statically exported @@ -2330,6 +2409,8 @@ export default async function build( appConfig.revalidate === 0 || exportConfig.initialPageRevalidationMap[page] === 0 + const isRouteHandler = isAppRouteRoute(originalAppPath) + routes.forEach((route) => { if (isDynamicRoute(page) && route === page) return @@ -2352,8 +2433,29 @@ export default async function build( if (revalidate !== 0) { const normalizedRoute = normalizePagePath(route) - const dataRoute = path.posix.join(`${normalizedRoute}.rsc`) + const dataRoute = isRouteHandler + ? null + : path.posix.join(`${normalizedRoute}.rsc`) + + let routeMeta: { + initialStatus?: SsgRoute['initialStatus'] + initialHeaders?: SsgRoute['initialHeaders'] + } = {} + + if (isRouteHandler) { + const exportRouteMeta = + exportConfig.initialPageMetaMap[route] || {} + + if (exportRouteMeta.status !== 200) { + routeMeta.initialStatus = exportRouteMeta.status + } + if (Object.keys(exportRouteMeta.headers).length) { + routeMeta.initialHeaders = exportRouteMeta.headers + } + } + finalPrerenderRoutes[route] = { + ...routeMeta, initialRevalidateSeconds: revalidate, srcRoute: page, dataRoute, @@ -2386,11 +2488,13 @@ export default async function build( fallback: appDynamicParamPaths.has(originalAppPath) ? null : false, - dataRouteRegex: normalizeRouteRegex( - getNamedRouteRegex( - dataRoute.replace(/\.rsc$/, '') - ).re.source.replace(/\(\?:\\\/\)\?\$$/, '\\.rsc$') - ), + dataRouteRegex: isRouteHandler + ? null + : normalizeRouteRegex( + getNamedRouteRegex( + dataRoute.replace(/\.rsc$/, '') + ).re.source.replace(/\(\?:\\\/\)\?\$$/, '\\.rsc$') + ), } } } @@ -2737,7 +2841,7 @@ export default async function build( } }) const prerenderManifest: PrerenderManifest = { - version: 3, + version: 4, routes: finalPrerenderRoutes, dynamicRoutes: finalDynamicRoutes, notFoundRoutes: ssgNotFoundPaths, @@ -2756,7 +2860,7 @@ export default async function build( }) } else { const prerenderManifest: PrerenderManifest = { - version: 3, + version: 4, routes: {}, dynamicRoutes: {}, preview: previewProps, diff --git a/packages/next/src/build/swc/index.ts b/packages/next/src/build/swc/index.ts index eb75aa997d695..f44cd285032b4 100644 --- a/packages/next/src/build/swc/index.ts +++ b/packages/next/src/build/swc/index.ts @@ -424,13 +424,17 @@ function loadNative(isCustomTurbopack = false) { let child = spawn(__INTERNAL_CUSTOM_TURBOPACK_BINARY, args, { stdio: 'pipe', - env: { - ...process.env, - }, }) child.on('message', (message: any) => { - console.log(message) + require('console').log(message) }) + child.stdout.on('data', (data: any) => { + require('console').log(data.toString()) + }) + child.stderr.on('data', (data: any) => { + require('console').log(data.toString()) + }) + child.on('close', (code: any) => { if (code !== 0) { reject({ diff --git a/packages/next/src/build/swc/options.ts b/packages/next/src/build/swc/options.ts index 7499ec9c47c7c..9d4d91ed190db 100644 --- a/packages/next/src/build/swc/options.ts +++ b/packages/next/src/build/swc/options.ts @@ -183,11 +183,10 @@ export function getJestSWCOptions({ esm, nextConfig, jsConfig, + resolvedBaseUrl, pagesDir, hasServerComponents, -}: // This is not passed yet as "paths" resolving needs a test first -// resolvedBaseUrl, -any) { +}: any) { let baseOptions = getBaseSWCOptions({ filename, jest: true, @@ -197,7 +196,7 @@ any) { nextConfig, jsConfig, hasServerComponents, - // resolvedBaseUrl, + resolvedBaseUrl, }) const isNextDist = nextDistPath.test(filename) diff --git a/packages/next/src/build/utils.ts b/packages/next/src/build/utils.ts index dc790b36b91d9..6b70d52c07755 100644 --- a/packages/next/src/build/utils.ts +++ b/packages/next/src/build/utils.ts @@ -26,6 +26,7 @@ import { SERVER_PROPS_GET_INIT_PROPS_CONFLICT, SERVER_PROPS_SSG_CONFLICT, MIDDLEWARE_FILENAME, + INSTRUMENTATION_HOOK_FILENAME, } from '../lib/constants' import { MODERN_BROWSERSLIST_TARGET } from '../shared/lib/constants' import prettyBytes from '../lib/pretty-bytes' @@ -110,6 +111,10 @@ function sum(a: ReadonlyArray): number { } function denormalizeAppPagePath(page: string): string { + // `/` is normalized to `/index` and `/index` is normalized to `/index/index` + if (page.endsWith('/index')) { + page = page.replace(/\/index$/, '') + } return page + '/page' } @@ -286,6 +291,13 @@ export function isMiddlewareFilename(file?: string) { return file === MIDDLEWARE_FILENAME || file === `src/${MIDDLEWARE_FILENAME}` } +export function isInstrumentationHookFilename(file?: string) { + return ( + file === INSTRUMENTATION_HOOK_FILENAME || + file === `src/${INSTRUMENTATION_HOOK_FILENAME}` + ) +} + export interface PageInfo { isHybridAmp?: boolean size: number @@ -1053,7 +1065,7 @@ export type AppConfig = { fetchCache?: 'force-cache' | 'only-cache' preferredRegion?: string } -type GenerateParams = Array<{ +export type GenerateParams = Array<{ config?: AppConfig segmentPath: string getStaticPaths?: GetStaticPaths @@ -1322,7 +1334,21 @@ export async function isPageStatic({ if (pageType === 'app') { isClientComponent = isClientReference(componentsResult.ComponentMod) const tree = componentsResult.ComponentMod.tree - const generateParams = await collectGenerateParams(tree) + const handlers = componentsResult.ComponentMod.handlers + + const generateParams: GenerateParams = handlers + ? [ + { + config: { + revalidate: handlers.revalidate, + dynamic: handlers.dynamic, + dynamicParams: handlers.dynamicParams, + }, + generateStaticParams: handlers.generateStaticParams, + segmentPath: page, + }, + ] + : await collectGenerateParams(tree) appConfig = generateParams.reduce( (builtConfig: AppConfig, curGenParams): AppConfig => { @@ -1554,6 +1580,17 @@ export function detectConflictingPaths( >() const dynamicSsgPages = [...ssgPages].filter((page) => isDynamicRoute(page)) + const additionalSsgPathsByPath: { + [page: string]: { [path: string]: string } + } = {} + + additionalSsgPaths.forEach((paths, pathsPage) => { + additionalSsgPathsByPath[pathsPage] ||= {} + paths.forEach((curPath) => { + const currentPath = curPath.toLowerCase() + additionalSsgPathsByPath[pathsPage][currentPath] = curPath + }) + }) additionalSsgPaths.forEach((paths, pathsPage) => { paths.forEach((curPath) => { @@ -1573,9 +1610,10 @@ export function detectConflictingPaths( conflictingPage = dynamicSsgPages.find((page) => { if (page === pathsPage) return false - conflictingPath = additionalSsgPaths - .get(page) - ?.find((compPath) => compPath.toLowerCase() === lowerPath) + conflictingPath = + additionalSsgPaths.get(page) == null + ? undefined + : additionalSsgPathsByPath[page][lowerPath] return conflictingPath }) @@ -1828,6 +1866,28 @@ export function isMiddlewareFile(file: string) { ) } +export function isInstrumentationHookFile(file: string) { + return ( + file === `/${INSTRUMENTATION_HOOK_FILENAME}` || + file === `/src/${INSTRUMENTATION_HOOK_FILENAME}` + ) +} + +export function getPossibleInstrumentationHookFilenames( + folder: string, + extensions: string[] +) { + const files = [] + for (const extension of extensions) { + files.push( + path.join(folder, `${INSTRUMENTATION_HOOK_FILENAME}.${extension}`), + path.join(folder, `src`, `${INSTRUMENTATION_HOOK_FILENAME}.${extension}`) + ) + } + + return files +} + export function getPossibleMiddlewareFilenames( folder: string, extensions: string[] diff --git a/packages/next/src/build/webpack-build.ts b/packages/next/src/build/webpack-build.ts index 9b5e3cfe7f57c..bf6d237f8197e 100644 --- a/packages/next/src/build/webpack-build.ts +++ b/packages/next/src/build/webpack-build.ts @@ -60,6 +60,7 @@ async function webpackBuildImpl(): Promise<{ const nextBuildSpan = NextBuildContext.nextBuildSpan! const buildSpinner = NextBuildContext.buildSpinner const dir = NextBuildContext.dir! + const config = NextBuildContext.config! const runWebpackSpan = nextBuildSpan.traceChild('run-webpack-compiler') const entrypoints = await nextBuildSpan @@ -67,30 +68,34 @@ async function webpackBuildImpl(): Promise<{ .traceAsyncFn(() => createEntrypoints({ buildId: NextBuildContext.buildId!, - config: NextBuildContext.config!, + config: config, envFiles: NextBuildContext.loadedEnvFiles!, isDev: false, rootDir: dir, - pageExtensions: NextBuildContext.config!.pageExtensions!, + pageExtensions: config.pageExtensions!, pagesDir: NextBuildContext.pagesDir!, appDir: NextBuildContext.appDir!, pages: NextBuildContext.mappedPages!, appPaths: NextBuildContext.mappedAppPages!, previewMode: NextBuildContext.previewProps!, rootPaths: NextBuildContext.mappedRootPaths!, + hasInstrumentationHook: NextBuildContext.hasInstrumentationHook!, }) ) const commonWebpackOptions = { isServer: false, buildId: NextBuildContext.buildId!, - config: NextBuildContext.config!, - target: NextBuildContext.config!.target!, + config: config, + target: config.target!, appDir: NextBuildContext.appDir!, pagesDir: NextBuildContext.pagesDir!, rewrites: NextBuildContext.rewrites!, + originalRewrites: NextBuildContext.originalRewrites, + originalRedirects: NextBuildContext.originalRedirects, reactProductionProfiling: NextBuildContext.reactProductionProfiling!, noMangling: NextBuildContext.noMangling!, + clientRouterFilters: NextBuildContext.clientRouterFilters!, } const configs = await runWebpackSpan diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index 9f03654422687..0a55f1d825113 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -2,7 +2,6 @@ import React from 'react' import ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-utils/dist/ReactRefreshWebpackPlugin' import chalk from 'next/dist/compiled/chalk' import crypto from 'crypto' -import { builtinModules } from 'module' import { webpack } from 'next/dist/compiled/webpack/webpack' import path from 'path' import { escapeStringRegexp } from '../shared/lib/escape-regexp' @@ -49,7 +48,7 @@ import { regexLikeCss } from './webpack/config/blocks/css' import { CopyFilePlugin } from './webpack/plugins/copy-file-plugin' import { FlightManifestPlugin } from './webpack/plugins/flight-manifest-plugin' import { FlightClientEntryPlugin } from './webpack/plugins/flight-client-entry-plugin' -import { FlightTypesPlugin } from './webpack/plugins/flight-types-plugin' +import { NextTypesPlugin } from './webpack/plugins/next-types-plugin' import type { Feature, SWC_TARGET_TRIPLE, @@ -64,7 +63,8 @@ import { FontLoaderManifestPlugin } from './webpack/plugins/font-loader-manifest import { getSupportedBrowsers } from './utils' import { METADATA_IMAGE_RESOURCE_QUERY } from './webpack/loaders/metadata/discover' -const EXTERNAL_PACKAGES = require('../lib/server-external-packages.json') +const EXTERNAL_PACKAGES = + require('../lib/server-external-packages.json') as string[] const NEXT_PROJECT_ROOT = path.join(__dirname, '..', '..') const NEXT_PROJECT_ROOT_DIST = path.join(NEXT_PROJECT_ROOT, 'dist') @@ -101,14 +101,6 @@ const BABEL_CONFIG_FILES = [ 'babel.config.cjs', ] -function appDirIssuerLayer(layer: string) { - return ( - layer === WEBPACK_LAYERS.client || - layer === WEBPACK_LAYERS.server || - layer === WEBPACK_LAYERS.appClient - ) -} - export const getBabelConfigFile = async (dir: string) => { const babelConfigFile = await BABEL_CONFIG_FILES.reduce( async (memo: Promise, filename) => { @@ -180,6 +172,7 @@ export function getDefineEnv({ isNodeServer, isEdgeServer, middlewareMatchers, + clientRouterFilters, }: { dev?: boolean distDir: string @@ -189,6 +182,9 @@ export function getDefineEnv({ isEdgeServer?: boolean middlewareMatchers?: MiddlewareMatcher[] config: NextConfigComplete + clientRouterFilters: Parameters< + typeof getBaseWebpackConfig + >[1]['clientRouterFilters'] }) { return { // internal field to identify the plugin config @@ -237,6 +233,15 @@ export function getDefineEnv({ 'process.env.__NEXT_NEW_LINK_BEHAVIOR': JSON.stringify( config.experimental.newNextLinkBehavior ), + 'process.env.__NEXT_CLIENT_ROUTER_FILTER_ENABLED': JSON.stringify( + config.experimental.clientRouterFilter + ), + 'process.env.__NEXT_CLIENT_ROUTER_S_FILTER': JSON.stringify( + clientRouterFilters?.staticFilter + ), + 'process.env.__NEXT_CLIENT_ROUTER_D_FILTER': JSON.stringify( + clientRouterFilters?.dynamicFilter + ), 'process.env.__NEXT_OPTIMISTIC_CLIENT_CACHE': JSON.stringify( config.experimental.optimisticClientCache ), @@ -610,6 +615,8 @@ export default async function getBaseWebpackConfig( pagesDir, reactProductionProfiling = false, rewrites, + originalRewrites, + originalRedirects, runWebpackSpan, target = COMPILER_NAMES.server, appDir, @@ -618,6 +625,7 @@ export default async function getBaseWebpackConfig( jsConfig, resolvedBaseUrl, supportedBrowsers, + clientRouterFilters, }: { buildId: string config: NextConfigComplete @@ -628,6 +636,8 @@ export default async function getBaseWebpackConfig( pagesDir?: string reactProductionProfiling?: boolean rewrites: CustomRoutes['rewrites'] + originalRewrites: CustomRoutes['rewrites'] | undefined + originalRedirects: CustomRoutes['redirects'] | undefined runWebpackSpan: Span target?: string appDir?: string @@ -636,6 +646,14 @@ export default async function getBaseWebpackConfig( jsConfig: any resolvedBaseUrl: string | undefined supportedBrowsers: string[] | undefined + clientRouterFilters?: { + staticFilter: ReturnType< + import('../shared/lib/bloom-filter').BloomFilter['export'] + > + dynamicFilter: ReturnType< + import('../shared/lib/bloom-filter').BloomFilter['export'] + > + } } ): Promise { const isClient = compilerType === COMPILER_NAMES.client @@ -758,12 +776,8 @@ export default async function getBaseWebpackConfig( } } - const getBabelOrSwcLoader = () => { - return useSWCLoader ? getSwcLoader() : getBabelLoader() - } - const defaultLoaders = { - babel: getBabelOrSwcLoader(), + babel: useSWCLoader ? getSwcLoader() : getBabelLoader(), } const swcLoaderForRSC = hasServerComponents @@ -903,11 +917,22 @@ export default async function getBaseWebpackConfig( const mainFieldsPerCompiler: Record = { [COMPILER_NAMES.server]: ['main', 'module'], [COMPILER_NAMES.client]: ['browser', 'module', 'main'], - [COMPILER_NAMES.edgeServer]: ['edge-light', 'browser', 'module', 'main'], + [COMPILER_NAMES.edgeServer]: [ + 'edge-light', + 'worker', + 'browser', + 'module', + 'main', + ], } const reactDir = path.dirname(require.resolve('react/package.json')) const reactDomDir = path.dirname(require.resolve('react-dom/package.json')) + let hasOptionalOTELAPIPackage = false + try { + require('@opentelemetry/api') + hasOptionalOTELAPIPackage = true + } catch {} const resolveConfig: webpack.Configuration['resolve'] = { // Disable .mjs for node_modules bundling @@ -950,6 +975,9 @@ export default async function getBaseWebpackConfig( 'next/dist/client/components/navigation', [require.resolve('next/dist/client/components/headers')]: 'next/dist/client/components/headers', + '@opentelemetry/api': hasOptionalOTELAPIPackage + ? '@opentelemetry/api' + : 'next/dist/compiled/@opentelemetry/api', } : undefined), @@ -1022,7 +1050,13 @@ export default async function getBaseWebpackConfig( } : undefined), mainFields: mainFieldsPerCompiler[compilerType], - ...(isEdgeServer && { conditionNames: ['edge-light', 'import', 'node'] }), + ...(isEdgeServer && { + conditionNames: [ + ...mainFieldsPerCompiler[COMPILER_NAMES.edgeServer], + 'import', + 'node', + ], + }), plugins: [], } @@ -1090,7 +1124,6 @@ export default async function getBaseWebpackConfig( // Returning from the function in case the directory has already been added and traversed if (topLevelFrameworkPaths.includes(directory)) return topLevelFrameworkPaths.push(directory) - const dependencies = require(packageJsonPath).dependencies || {} for (const name of Object.keys(dependencies)) { addPackagePath(name, directory) @@ -1110,6 +1143,11 @@ export default async function getBaseWebpackConfig( const optOutBundlingPackages = EXTERNAL_PACKAGES.concat( ...(config.experimental.serverComponentsExternalPackages || []) ) + const optOutBundlingPackageRegex = new RegExp( + `[/\\\\]node_modules[/\\\\](${optOutBundlingPackages + .map((p) => p.replace(/\//g, '[/\\\\]')) + .join('|')})[/\\\\]` + ) let resolvedExternalPackageDirs: Map @@ -1146,7 +1184,7 @@ export default async function getBaseWebpackConfig( if (layer === WEBPACK_LAYERS.server) { if ( reactPackagesRegex.test(request) || - request === 'next/dist/compiled/react-server-dom-webpack/server.browser' + request === 'next/dist/compiled/react-server-dom-webpack/server.edge' ) { return } @@ -1247,39 +1285,6 @@ export default async function getBaseWebpackConfig( // If the request cannot be resolved we need to have // webpack "bundle" it so it surfaces the not found error. if (!res) { - // We tried to bundle this request in the server layer but it failed. - // In this case we need to display a helpful error message for people to - // add the package to the `serverComponentsExternalPackages` config. - if (layer === WEBPACK_LAYERS.server && !request.startsWith('#')) { - if (/[/\\]node_modules[/\\]/.test(context)) { - // Built-in modules can be safely ignored. - if (!builtinModules.includes(request)) { - // Try to match the package name from the context path: - // - /node_modules/package-name/... - // - /node_modules/.pnpm/package-name@version/... - // - /node_modules/@scope/package-name/... - // - /node_modules/.pnpm/scope+package-name@version/... - const packageName = - context.match( - /[/\\]node_modules[/\\](\.pnpm[/\\])?([^/\\@]+)/ - )?.[2] || - context.match( - /[/\\]node_modules[/\\](@[^/\\]+[/\\][^/\\]+)[/\\]/ - )?.[2] || - context - .match( - /[/\\]node_modules[/\\]\.pnpm[/\\](@[^/\\@]+\+[^/\\@]+)/ - )?.[1] - ?.replace(/\+/g, '/') - - throw new Error( - `Failed to bundle ${ - packageName ? `package "${packageName}"` : context - } in Server Components because it uses "${request}". Please try adding it to the \`serverComponentsExternalPackages\` config: https://beta.nextjs.org/docs/api-reference/next.config.js#servercomponentsexternalpackages` - ) - } - } - } return } @@ -1356,7 +1361,7 @@ export default async function getBaseWebpackConfig( if (layer === WEBPACK_LAYERS.server) { // All packages should be bundled for the server layer if they're not opted out. // This option takes priority over the transpilePackages option. - if (isResourceInPackages(res, optOutBundlingPackages)) { + if (optOutBundlingPackageRegex.test(res)) { return `${externalType} ${request}` } @@ -1706,25 +1711,27 @@ export default async function getBaseWebpackConfig( ? [ { issuerLayer: WEBPACK_LAYERS.server, - test: (req: string) => { - // If it's not a source code file, or has been opted out of - // bundling, don't resolve it. - if ( - !codeCondition.test.test(req) || - isResourceInPackages( - req, - config.experimental.serverComponentsExternalPackages - ) - ) { - return false - } - - return true + test: { + // Resolve it if it is a source code file, and it has NOT been + // opted out of bundling. + and: [ + codeCondition.test, + { + not: [ + optOutBundlingPackageRegex, + staticGenerationAsyncStorageRegex, + ], + }, + ], }, resolve: { conditionNames: [ 'react-server', - ...(!isEdgeServer ? [] : ['edge-light']), + ...mainFieldsPerCompiler[ + isEdgeServer + ? COMPILER_NAMES.edgeServer + : COMPILER_NAMES.server + ], 'node', 'import', 'require', @@ -1738,15 +1745,18 @@ export default async function getBaseWebpackConfig( 'next/dist/compiled/react-dom/server-rendering-stub', }, }, + use: { + loader: 'next-flight-loader', + }, + }, + { + // Make sure that AsyncLocalStorage module instance is shared between server and client + // layers. + layer: WEBPACK_LAYERS.shared, + test: staticGenerationAsyncStorageRegex, }, ] : []), - ...[ - { - layer: WEBPACK_LAYERS.shared, - test: staticGenerationAsyncStorageRegex, - }, - ], // TODO: FIXME: do NOT webpack 5 support with this // x-ref: https://github.com/webpack/webpack/issues/11467 ...(!config.experimental.fullySpecified @@ -1770,24 +1780,17 @@ export default async function getBaseWebpackConfig( }, ] : []), - ...(hasServerComponents && !isClient - ? [ - // RSC server compilation loaders - { - test: codeCondition.test, - exclude: [staticGenerationAsyncStorageRegex], - issuerLayer: WEBPACK_LAYERS.server, - use: { - loader: 'next-flight-loader', - }, - }, - ] - : []), ...(hasServerComponents ? [ { test: codeCondition.test, - issuerLayer: appDirIssuerLayer, + issuerLayer: { + or: [ + WEBPACK_LAYERS.server, + WEBPACK_LAYERS.client, + WEBPACK_LAYERS.appClient, + ], + }, resolve: { alias: { // Alias next/head component to noop for RSC @@ -1808,17 +1811,15 @@ export default async function getBaseWebpackConfig( { exclude: [staticGenerationAsyncStorageRegex], issuerLayer: WEBPACK_LAYERS.server, - test(req: string) { - // If it's not a source code file, or has been opted out of - // bundling, don't resolve it. - if ( - !codeCondition.test.test(req) || - isResourceInPackages(req, optOutBundlingPackages) - ) { - return false - } - - return true + test: { + // Resolve it if it is a source code file, and it has NOT been + // opted out of bundling. + and: [ + codeCondition.test, + { + not: [optOutBundlingPackageRegex], + }, + ], }, resolve: { // It needs `conditionNames` here to require the proper asset, @@ -2074,6 +2075,7 @@ export default async function getBaseWebpackConfig( isNodeServer, isEdgeServer, middlewareMatchers, + clientRouterFilters, }) ), isClient && @@ -2195,13 +2197,16 @@ export default async function getBaseWebpackConfig( })), hasAppDir && !isClient && - new FlightTypesPlugin({ + new NextTypesPlugin({ dir, distDir: config.distDir, appDir, dev, isEdgeServer, + pageExtensions: config.pageExtensions, typedRoutes: enableTypedRoutes, + originalRewrites, + originalRedirects, }), !dev && isClient && diff --git a/packages/next/src/build/webpack/config/blocks/css/index.ts b/packages/next/src/build/webpack/config/blocks/css/index.ts index 03efc6d7a0a2c..6ba1e51a5c445 100644 --- a/packages/next/src/build/webpack/config/blocks/css/index.ts +++ b/packages/next/src/build/webpack/config/blocks/css/index.ts @@ -188,7 +188,9 @@ export const css = curry(async function css( ) const googleLoaderOptions = ctx.experimental?.fontLoaders?.find( - (loaderConfig) => loaderConfig.loader === '@next/font/google' + (loaderConfig) => + loaderConfig.loader === '@next/font/google' || + loaderConfig.loader === 'next/font/google' )?.options ?? {} const fontLoaders: Array<[string | RegExp, string, any?]> = [ [ @@ -269,7 +271,10 @@ export const css = curry(async function css( issuerLayer: APP_LAYER_RULE, use: [ require.resolve('../../../loaders/next-flight-css-loader'), - ...getCssModuleLoader(ctx, true, lazyPostCSSInitializer), + ...getCssModuleLoader( + { ...ctx, isAppDir: true }, + lazyPostCSSInitializer + ), ], }) : null, @@ -277,7 +282,10 @@ export const css = curry(async function css( sideEffects: false, test: regexCssModules, issuerLayer: PAGES_LAYER_RULE, - use: getCssModuleLoader(ctx, false, lazyPostCSSInitializer), + use: getCssModuleLoader( + { ...ctx, isAppDir: false }, + lazyPostCSSInitializer + ), }), ].filter(nonNullable), }), @@ -297,8 +305,7 @@ export const css = curry(async function css( use: [ require.resolve('../../../loaders/next-flight-css-loader'), ...getCssModuleLoader( - ctx, - true, + { ...ctx, isAppDir: true }, lazyPostCSSInitializer, sassPreprocessors ), @@ -310,8 +317,7 @@ export const css = curry(async function css( test: regexSassModules, issuerLayer: PAGES_LAYER_RULE, use: getCssModuleLoader( - ctx, - false, + { ...ctx, isAppDir: false }, lazyPostCSSInitializer, sassPreprocessors ), @@ -396,7 +402,10 @@ export const css = curry(async function css( issuerLayer: APP_LAYER_RULE, use: [ require.resolve('../../../loaders/next-flight-css-loader'), - ...getGlobalCssLoader(ctx, true, lazyPostCSSInitializer), + ...getGlobalCssLoader( + { ...ctx, isAppDir: true }, + lazyPostCSSInitializer + ), ], }), markRemovable({ @@ -406,8 +415,7 @@ export const css = curry(async function css( use: [ require.resolve('../../../loaders/next-flight-css-loader'), ...getGlobalCssLoader( - ctx, - true, + { ...ctx, isAppDir: true }, lazyPostCSSInitializer, sassPreprocessors ), @@ -421,7 +429,10 @@ export const css = curry(async function css( include: allowedPagesGlobalCSSPath, issuer: allowedPagesGlobalCSSIssuer, issuerLayer: PAGES_LAYER_RULE, - use: getGlobalCssLoader(ctx, false, lazyPostCSSInitializer), + use: getGlobalCssLoader( + { ...ctx, isAppDir: false }, + lazyPostCSSInitializer + ), }), markRemovable({ sideEffects: true, @@ -430,8 +441,7 @@ export const css = curry(async function css( issuer: allowedPagesGlobalCSSIssuer, issuerLayer: PAGES_LAYER_RULE, use: getGlobalCssLoader( - ctx, - false, + { ...ctx, isAppDir: false }, lazyPostCSSInitializer, sassPreprocessors ), @@ -448,7 +458,10 @@ export const css = curry(async function css( sideEffects: true, test: regexCssGlobal, issuer: { and: [ctx.customAppFile] }, - use: getGlobalCssLoader(ctx, false, lazyPostCSSInitializer), + use: getGlobalCssLoader( + { ...ctx, isAppDir: false }, + lazyPostCSSInitializer + ), }), ], }), @@ -459,8 +472,7 @@ export const css = curry(async function css( test: regexSassGlobal, issuer: { and: [ctx.customAppFile] }, use: getGlobalCssLoader( - ctx, - false, + { ...ctx, isAppDir: false }, lazyPostCSSInitializer, sassPreprocessors ), diff --git a/packages/next/src/build/webpack/config/blocks/css/loaders/client.ts b/packages/next/src/build/webpack/config/blocks/css/loaders/client.ts index be889904ebc72..c668f28aff567 100644 --- a/packages/next/src/build/webpack/config/blocks/css/loaders/client.ts +++ b/packages/next/src/build/webpack/config/blocks/css/loaders/client.ts @@ -2,15 +2,19 @@ import type { webpack } from 'next/dist/compiled/webpack/webpack' export function getClientStyleLoader({ hasAppDir, + isAppDir, isDevelopment, assetPrefix, }: { hasAppDir: boolean + isAppDir?: boolean isDevelopment: boolean assetPrefix: string }): webpack.RuleSetUseItem { + const shouldEnableApp = typeof isAppDir === 'boolean' ? isAppDir : hasAppDir + // Keep next-style-loader for development mode in `pages/` - if (isDevelopment && !hasAppDir) { + if (isDevelopment && !shouldEnableApp) { return { loader: 'next-style-loader', options: { diff --git a/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts b/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts index da7adc88c9ca8..b912769db7b50 100644 --- a/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts +++ b/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts @@ -6,7 +6,6 @@ import { cssFileResolve } from './file-resolve' export function getGlobalCssLoader( ctx: ConfigurationContext, - hasAppDir: boolean, postcss: any, preProcessors: readonly webpack.RuleSetUseItem[] = [] ): webpack.RuleSetUseItem[] { @@ -17,7 +16,8 @@ export function getGlobalCssLoader( // loader loaders.push( getClientStyleLoader({ - hasAppDir: hasAppDir, + hasAppDir: ctx.hasAppDir, + isAppDir: ctx.isAppDir, isDevelopment: ctx.isDevelopment, assetPrefix: ctx.assetPrefix, }) diff --git a/packages/next/src/build/webpack/config/blocks/css/loaders/modules.ts b/packages/next/src/build/webpack/config/blocks/css/loaders/modules.ts index 0622f7e7949b6..55533e6d1cca1 100644 --- a/packages/next/src/build/webpack/config/blocks/css/loaders/modules.ts +++ b/packages/next/src/build/webpack/config/blocks/css/loaders/modules.ts @@ -6,7 +6,6 @@ import { getCssModuleLocalIdent } from './getCssModuleLocalIdent' export function getCssModuleLoader( ctx: ConfigurationContext, - hasAppDir: boolean, postcss: any, preProcessors: readonly webpack.RuleSetUseItem[] = [] ): webpack.RuleSetUseItem[] { @@ -17,7 +16,8 @@ export function getCssModuleLoader( // loader loaders.push( getClientStyleLoader({ - hasAppDir: hasAppDir, + hasAppDir: ctx.hasAppDir, + isAppDir: ctx.isAppDir, isDevelopment: ctx.isDevelopment, assetPrefix: ctx.assetPrefix, }) diff --git a/packages/next/src/build/webpack/config/utils.ts b/packages/next/src/build/webpack/config/utils.ts index cf7c04853b49b..0cae76e8a83f2 100644 --- a/packages/next/src/build/webpack/config/utils.ts +++ b/packages/next/src/build/webpack/config/utils.ts @@ -2,7 +2,10 @@ import type { webpack } from 'next/dist/compiled/webpack/webpack' import type { NextConfigComplete } from '../../../server/config-shared' export type ConfigurationContext = { + // If the `appDir` feature is enabled hasAppDir: boolean + // If the current rule matches a resource in the app layer + isAppDir?: boolean supportedBrowsers: string[] | undefined rootDirectory: string customAppFile: RegExp | undefined diff --git a/packages/next/src/build/webpack/loaders/get-module-build-info.ts b/packages/next/src/build/webpack/loaders/get-module-build-info.ts index bd3dd8a32b31a..0233f44096a2e 100644 --- a/packages/next/src/build/webpack/loaders/get-module-build-info.ts +++ b/packages/next/src/build/webpack/loaders/get-module-build-info.ts @@ -25,7 +25,9 @@ export function getModuleBuildInfo(webpackModule: webpack.Module) { } export interface RSCMeta { - type?: RSCModuleType + type: RSCModuleType + actions?: string[] + clientRefs?: string[] requests?: string[] // client requests in flight client entry } diff --git a/packages/next/src/build/webpack/loaders/next-app-loader.ts b/packages/next/src/build/webpack/loaders/next-app-loader.ts index d7004631eaf2b..2fd5396b54347 100644 --- a/packages/next/src/build/webpack/loaders/next-app-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-app-loader.ts @@ -64,6 +64,14 @@ async function createAppRouteCode({ export * as handlers from ${JSON.stringify(resolvedPagePath)} export const resolvedPagePath = ${JSON.stringify(resolvedPagePath)} + export { staticGenerationAsyncStorage } from 'next/dist/client/components/static-generation-async-storage' + + export * as serverHooks from 'next/dist/client/components/hooks-server-context' + + export { staticGenerationBailout } from 'next/dist/client/components/static-generation-bailout' + + export * as headerHooks from 'next/dist/client/components/headers' + export { requestAsyncStorage } from 'next/dist/client/components/request-async-storage' ` } @@ -402,11 +410,12 @@ const nextAppLoader: AppLoader = async function nextAppLoader() { )} export { staticGenerationAsyncStorage } from 'next/dist/client/components/static-generation-async-storage' + export { requestAsyncStorage } from 'next/dist/client/components/request-async-storage' export * as serverHooks from 'next/dist/client/components/hooks-server-context' - export { renderToReadableStream } from 'next/dist/compiled/react-server-dom-webpack/server.browser' + export { renderToReadableStream } from 'next/dist/compiled/react-server-dom-webpack/server.edge' export const __next_app_webpack_require__ = __webpack_require__ ` diff --git a/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/handle.ts b/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/handle.ts index 328aa91a88e3e..830ba823e19b3 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/handle.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/handle.ts @@ -6,6 +6,7 @@ import { AppRouteRouteHandler } from '../../../../server/future/route-handlers/a import { RouteKind } from '../../../../server/future/route-kind' import { AppRouteRouteMatcher } from '../../../../server/future/route-matchers/app-route-route-matcher' import { normalizeAppPath } from '../../../../shared/lib/router/utils/app-paths' +import { removeTrailingSlash } from '../../../../shared/lib/router/utils/remove-trailing-slash' export function getHandle({ page, mod }: any) { const appRouteRouteHandler = new AppRouteRouteHandler() @@ -20,12 +21,16 @@ export function getHandle({ page, mod }: any) { return async function handle(request: Request) { const extendedReq = new WebNextRequest(request) const extendedRes = new WebNextResponse() - const match = appRouteRouteMatcher.match(new URL(request.url).pathname)! + const match = appRouteRouteMatcher.match( + removeTrailingSlash(new URL(request.url).pathname) + )! const response = await appRouteRouteHandler.execute( match, mod, extendedReq, extendedRes, + // TODO: pass incrementalCache here + { supportsDynamicHTML: true }, request ) diff --git a/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts b/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts index 684b392363618..8673c090511cf 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts @@ -50,6 +50,8 @@ export default async function edgeAppRouteLoader(this: any) { page: ${JSON.stringify(page)}, }) + export const ComponentMod = mod + export default function(opts) { return adapter({ ...opts, diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts index 1de9b6617a398..627e419869e01 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts @@ -15,6 +15,7 @@ export type EdgeSSRLoaderQuery = { appDirLoader?: string pagesType: 'app' | 'pages' | 'root' sriEnabled: boolean + incrementalCacheHandlerPath?: string } /* @@ -44,6 +45,7 @@ export default async function edgeSSRLoader(this: any) { appDirLoader: appDirLoaderBase64, pagesType, sriEnabled, + incrementalCacheHandlerPath, } = this.getOptions() const appDirLoader = Buffer.from( @@ -90,7 +92,7 @@ export default async function edgeSSRLoader(this: any) { import { getRender } from 'next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render' enhanceGlobals() - + const pageType = ${JSON.stringify(pagesType)} ${ isAppDir @@ -117,11 +119,18 @@ export default async function edgeSSRLoader(this: any) { const appRenderToHTML = null ` } + + const incrementalCacheHandler = ${ + incrementalCacheHandlerPath + ? `require("${incrementalCacheHandlerPath}")` + : 'null' + } const buildManifest = self.__BUILD_MANIFEST const reactLoadableManifest = self.__REACT_LOADABLE_MANIFEST const rscManifest = self.__RSC_MANIFEST const rscCssManifest = self.__RSC_CSS_MANIFEST + const rscServerManifest = self.__RSC_SERVER_MANIFEST const subresourceIntegrityManifest = ${ sriEnabled ? 'self.__SUBRESOURCE_INTEGRITY_MANIFEST' : 'undefined' } @@ -142,10 +151,12 @@ export default async function edgeSSRLoader(this: any) { reactLoadableManifest, serverComponentManifest: ${isServerComponent} ? rscManifest : null, serverCSSManifest: ${isServerComponent} ? rscCssManifest : null, + serverActionsManifest: ${isServerComponent} ? rscServerManifest : null, subresourceIntegrityManifest, config: ${stringifiedConfig}, buildId: ${JSON.stringify(buildId)}, fontLoaderManifest, + incrementalCacheHandler, }) export const ComponentMod = pageMod diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts index ff616c2f06af5..a29b8a306f947 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts @@ -1,4 +1,4 @@ -import type { NextConfig } from '../../../../server/config-shared' +import type { NextConfigComplete } from '../../../../server/config-shared' import type { DocumentType, AppType } from '../../../../shared/lib/utils' import type { BuildManifest } from '../../../../server/get-page-files' @@ -28,9 +28,11 @@ export function getRender({ serverComponentManifest, subresourceIntegrityManifest, serverCSSManifest, + serverActionsManifest, config, buildId, fontLoaderManifest, + incrementalCacheHandler, }: { pagesType: 'app' | 'pages' | 'root' dev: boolean @@ -47,10 +49,12 @@ export function getRender({ subresourceIntegrityManifest?: Record serverComponentManifest: any serverCSSManifest: any + serverActionsManifest: any appServerMod: any - config: NextConfig + config: NextConfigComplete buildId: string fontLoaderManifest: FontLoaderManifest + incrementalCacheHandler?: any }) { const isAppPath = pagesType === 'app' const baseLoadComponentResult = { @@ -77,11 +81,14 @@ export function getRender({ disableOptimizedLoading: true, serverComponentManifest, serverCSSManifest, + serverActionsManifest, }, appRenderToHTML, pagesRenderToHTML, + incrementalCacheHandler, loadComponent: async (pathname) => { if (isAppPath) return null + if (pathname === page) { return { ...baseLoadComponentResult, @@ -91,6 +98,7 @@ export function getRender({ getServerSideProps: pageMod.getServerSideProps, getStaticPaths: pageMod.getStaticPaths, ComponentMod: pageMod, + isAppPath: !!pageMod.__next_app_webpack_require__, pathname, } } diff --git a/packages/next/src/build/webpack/loaders/next-flight-loader/index.ts b/packages/next/src/build/webpack/loaders/next-flight-loader/index.ts index 4c15f1d3987dc..26c76898eb7a0 100644 --- a/packages/next/src/build/webpack/loaders/next-flight-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-flight-loader/index.ts @@ -22,6 +22,46 @@ export default async function transformSource( const buildInfo = getModuleBuildInfo(this._module) buildInfo.rsc = getRSCModuleInformation(source) + const isESM = this._module?.parser?.sourceType === 'module' + + // A client boundary. + if (isESM && buildInfo.rsc?.type === RSC_MODULE_TYPES.client) { + const clientRefs = buildInfo.rsc.clientRefs! + if (clientRefs.includes('*')) { + return callback( + new Error( + `It's currently unsupport to use "export *" in a client boundary. Please use named exports instead.` + ) + ) + } + + // For ESM, we can't simply export it as a proxy via `module.exports`. + // Use multiple named exports instead. + const proxyFilepath = source.match(/createProxy\((.+)\)/)?.[1] + if (!proxyFilepath) { + return callback( + new Error( + `Failed to find the proxy file path in the client boundary. This is a bug in Next.js.` + ) + ) + } + + let esmSource = ` + import { createProxy } from "private-next-rsc-mod-ref-proxy" + const proxy = createProxy(${proxyFilepath}) + ` + let cnt = 0 + for (const ref of clientRefs) { + if (ref === 'default') { + esmSource += `\nexport default proxy.default` + } else { + esmSource += `\nconst e${cnt} = proxy["${ref}"]\nexport { e${cnt++} as ${ref} }` + } + } + + return callback(null, esmSource, sourceMap) + } + if (buildInfo.rsc?.type !== RSC_MODULE_TYPES.client) { if (noopHeadPath === this.resourcePath) { warnOnce( diff --git a/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts b/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts index 805f6fa9bc77e..e3a82896164f1 100644 --- a/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts +++ b/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts @@ -11,7 +11,7 @@ import path from 'path' import { sources } from 'next/dist/compiled/webpack/webpack' import { getInvalidator, - entries, + getEntries, EntryTypes, } from '../../../server/dev/on-demand-entry-handler' import { WEBPACK_LAYERS } from '../../../lib/constants' @@ -31,6 +31,7 @@ import { } from '../loaders/utils' import { traverseModules } from '../utils' import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep' +import { isAppRouteRoute } from '../../../lib/is-app-route-route' interface Options { dev: boolean @@ -145,7 +146,7 @@ export class FlightClientEntryPlugin { }) } - async createClientEntries(compiler: any, compilation: any) { + async createClientEntries(compiler: webpack.Compiler, compilation: any) { const addClientEntryAndSSRModulesList: Array< ReturnType > = [] @@ -165,7 +166,13 @@ export class FlightClientEntryPlugin { ) { for (const [name, entry] of compilation.entries.entries()) { // Skip for entries under pages/ - if (name.startsWith('pages/')) continue + if ( + name.startsWith('pages/') || + // Skip for route.js entries + (name.startsWith('app/') && isAppRouteRoute(name)) + ) { + continue + } // Check if the page entry is a server component or not. const entryDependency: webpack.NormalModule | undefined = @@ -240,7 +247,7 @@ export class FlightClientEntryPlugin { // Replace file suffix as `.js` will be added. const bundlePath = normalizePathSep( - relativeRequest.replace(/\.(js|ts)x?$/, '').replace(/^src[\\/]/, '') + relativeRequest.replace(/\.[^.\\/]+$/, '').replace(/^src[\\/]/, '') ) addClientEntryAndSSRModulesList.push( @@ -250,6 +257,7 @@ export class FlightClientEntryPlugin { entryName: name, clientImports, bundlePath, + absolutePagePath: entryRequest, }) ) } @@ -419,7 +427,7 @@ export class FlightClientEntryPlugin { ) // Invalidate in development to trigger recompilation - const invalidator = getInvalidator() + const invalidator = getInvalidator(compiler.outputPath) // Check if any of the entry injections need an invalidation if ( invalidator && @@ -567,12 +575,14 @@ export class FlightClientEntryPlugin { entryName, clientImports, bundlePath, + absolutePagePath, }: { compiler: webpack.Compiler compilation: webpack.Compilation entryName: string clientImports: ClientComponentImports bundlePath: string + absolutePagePath?: string }): [shouldInvalidate: boolean, addEntryPromise: Promise] { let shouldInvalidate = false @@ -587,7 +597,10 @@ export class FlightClientEntryPlugin { const clientLoader = `next-flight-client-entry-loader?${stringify({ modules: this.isEdgeServer ? clientImports.map((importPath) => - importPath.replace('next/dist/esm/', 'next/dist/') + importPath.replace( + /[\\/]next[\\/]dist[\\/]esm[\\/]/, + '/next/dist/'.replace(/\//g, path.sep) + ) ) : clientImports, server: false, @@ -601,11 +614,14 @@ export class FlightClientEntryPlugin { // Add for the client compilation // Inject the entry to the client compiler. if (this.dev) { + const entries = getEntries(compiler.outputPath) const pageKey = COMPILER_NAMES.client + bundlePath + if (!entries[pageKey]) { entries[pageKey] = { type: EntryTypes.CHILD_ENTRY, parentEntries: new Set([entryName]), + absoluteEntryFilePath: absolutePagePath, bundlePath, request: clientLoader, dispose: false, @@ -622,6 +638,8 @@ export class FlightClientEntryPlugin { if (entryData.type === EntryTypes.CHILD_ENTRY) { entryData.parentEntries.add(entryName) } + entryData.dispose = false + entryData.lastActiveTime = Date.now() } } else { injectedClientEntries.set(bundlePath, clientLoader) @@ -757,6 +775,9 @@ export class FlightClientEntryPlugin { } const json = JSON.stringify(serverActions, null, this.dev ? 2 : undefined) + assets[SERVER_REFERENCE_MANIFEST + '.js'] = new sources.RawSource( + 'self.__RSC_SERVER_MANIFEST=' + json + ) as unknown as webpack.sources.RawSource assets[SERVER_REFERENCE_MANIFEST + '.json'] = new sources.RawSource( json ) as unknown as webpack.sources.RawSource diff --git a/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts b/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts index e2d3090115cba..d43c18e8d7ed8 100644 --- a/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts +++ b/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path' import { webpack, sources } from 'next/dist/compiled/webpack/webpack' import { CLIENT_REFERENCE_MANIFEST, @@ -162,11 +163,6 @@ export class FlightManifestPlugin { mod: webpack.NormalModule, chunkCSS: string[] ) { - // Skip all modules from the pages folder. - if (mod.layer !== WEBPACK_LAYERS.appClient) { - return - } - const isCSSModule = regexCSS.test(mod.resource) || mod.type === 'css/mini-extract' || @@ -179,6 +175,13 @@ export class FlightManifestPlugin { item.loader.includes('mini-css-extract-plugin/loader.js') ))) + // Skip all modules from the pages folder. CSS modules are a special case + // as they are generated by mini-css-extract-plugin and these modules + // don't have layer information attached. + if (!isCSSModule && mod.layer !== WEBPACK_LAYERS.appClient) { + return + } + const resource = mod.type === 'css/mini-extract' ? // @ts-expect-error TODO: use `identifier()` instead. @@ -323,9 +326,13 @@ export class FlightManifestPlugin { // The client compiler will always use the CJS Next.js build, so here we // also add the mapping for the ESM build (Edge runtime) to consume. - if (/\/next\/dist\//.test(resource)) { - manifest[resource.replace(/\/next\/dist\//, '/next/dist/esm/')] = - moduleExports + if (/[\\/]next[\\/]dist[\\/]/.test(resource)) { + manifest[ + resource.replace( + /[\\/]next[\\/]dist[\\/]/, + '/next/dist/esm/'.replace(/\//g, path.sep) + ) + ] = moduleExports } manifest.__ssr_module_mapping__ = moduleIdMapping @@ -367,7 +374,12 @@ export class FlightManifestPlugin { if (entryName?.startsWith('app/')) { // The `key` here should be the absolute file path but without extension. // We need to replace the separator in the entry name to match the system separator. - const key = this.appDir + entryName.slice(3).replace(/\//g, sep) + const key = + this.appDir + + entryName + .slice(3) + .replace(/\//g, sep) + .replace(/\.[^\\/.]+$/, '') entryCSSFiles[key] = files.concat(entryCSSFiles[key] || []) } } diff --git a/packages/next/src/build/webpack/plugins/middleware-plugin.ts b/packages/next/src/build/webpack/plugins/middleware-plugin.ts index 61bd2d4ff8c1d..1464b915e0abb 100644 --- a/packages/next/src/build/webpack/plugins/middleware-plugin.ts +++ b/packages/next/src/build/webpack/plugins/middleware-plugin.ts @@ -20,6 +20,7 @@ import { FLIGHT_SERVER_CSS_MANIFEST, SUBRESOURCE_INTEGRITY_MANIFEST, FONT_LOADER_MANIFEST, + SERVER_REFERENCE_MANIFEST, } from '../../../shared/lib/constants' import { getPageStaticInfo, @@ -29,6 +30,8 @@ import { Telemetry } from '../../../telemetry/storage' import { traceGlobals } from '../../../trace/shared' import { EVENT_BUILD_FEATURE_USAGE } from '../../../telemetry/events' import { normalizeAppPath } from '../../../shared/lib/router/utils/app-paths' +import { INSTRUMENTATION_HOOK_FILENAME } from '../../../lib/constants' +import { NextBuildContext } from '../../build-context' export interface EdgeFunctionDefinition { env: string[] @@ -90,11 +93,14 @@ function isUsingIndirectEvalAndUsedByExports(args: { function getEntryFiles( entryFiles: string[], meta: EntryMetadata, - opts: { sriEnabled: boolean } + opts: { + sriEnabled: boolean + } ) { const files: string[] = [] if (meta.edgeSSR) { if (meta.edgeSSR.isServerComponent) { + files.push(`server/${SERVER_REFERENCE_MANIFEST}.js`) files.push(`server/${CLIENT_REFERENCE_MANIFEST}.js`) files.push(`server/${FLIGHT_SERVER_CSS_MANIFEST}.js`) if (opts.sriEnabled) { @@ -121,6 +127,10 @@ function getEntryFiles( ) files.push(`server/${FONT_LOADER_MANIFEST}.js`) + + if (NextBuildContext!.hasInstrumentationHook) { + files.push(`server/edge-${INSTRUMENTATION_HOOK_FILENAME}.js`) + } } files.push( @@ -134,7 +144,9 @@ function getEntryFiles( function getCreateAssets(params: { compilation: webpack.Compilation metadataByEntry: Map - opts: { sriEnabled: boolean } + opts: { + sriEnabled: boolean + } }) { const { compilation, metadataByEntry, opts } = params return (assets: any) => { diff --git a/packages/next/src/build/webpack/plugins/flight-types-plugin.ts b/packages/next/src/build/webpack/plugins/next-types-plugin.ts similarity index 63% rename from packages/next/src/build/webpack/plugins/flight-types-plugin.ts rename to packages/next/src/build/webpack/plugins/next-types-plugin.ts index cd3175014d22f..6c790c6dbe533 100644 --- a/packages/next/src/build/webpack/plugins/flight-types-plugin.ts +++ b/packages/next/src/build/webpack/plugins/next-types-plugin.ts @@ -1,12 +1,25 @@ +import type { Rewrite, Redirect } from '../../../lib/load-custom-routes' +import type { Token } from 'next/dist/compiled/path-to-regexp' + import path from 'path' import { promises as fs } from 'fs' import { webpack, sources } from 'next/dist/compiled/webpack/webpack' +import { parse } from 'next/dist/compiled/path-to-regexp' import { WEBPACK_LAYERS } from '../../../lib/constants' -import { normalizeAppPath } from '../../../shared/lib/router/utils/app-paths' import { isDynamicRoute } from '../../../shared/lib/router/utils' +import { normalizeAppPath } from '../../../shared/lib/router/utils/app-paths' +import { denormalizePagePath } from '../../../shared/lib/page-path/denormalize-page-path' +import { getPageFromPath } from '../../entries' +import { ensureLeadingSlash } from '../../../shared/lib/page-path/ensure-leading-slash' -const PLUGIN_NAME = 'FlightTypesPlugin' +const PLUGIN_NAME = 'NextTypesPlugin' + +type Rewrites = { + fallback: Rewrite[] + afterFiles: Rewrite[] + beforeFiles: Rewrite[] +} interface Options { dir: string @@ -14,7 +27,10 @@ interface Options { appDir: string dev: boolean isEdgeServer: boolean + pageExtensions: string[] typedRoutes: boolean + originalRewrites: Rewrites | undefined + originalRedirects: Redirect[] | undefined } function createTypeGuardFile( @@ -75,7 +91,7 @@ export interface PageProps { searchParams?: any } export interface LayoutProps { - children: React.ReactNode + children?: React.ReactNode ${ options.slots ? options.slots.map((slot) => ` ${slot}: React.ReactNode`).join('\n') @@ -118,21 +134,123 @@ async function collectNamedSlots(layoutPath: string) { return slots } -const nodeRouteTypes: string[] = [] -const edgeRouteTypes: string[] = [] +export const devPageFiles = new Set() + +const edgeRoutes: string[] = [] +const nodeRoutes: string[] = [] + +function createRouteDefinitions( + rewrites: Rewrites | undefined, + redirects: Redirect[] | undefined +) { + const extraRoutes: string[] = [] + function addExtraRoute(source: string) { + let tokens: Token[] | undefined + try { + tokens = parse(source) + } catch { + // Ignore invalid routes - they will be handled by other checks. + } + + if (Array.isArray(tokens)) { + let normalizedRoute = '' + + for (const token of tokens) { + if (typeof token === 'object') { + if (token.modifier === '*') { + normalizedRoute += `${token.prefix}[[...${token.name}]]` + } else if (token.modifier === '+') { + normalizedRoute += `${token.prefix}[...${token.name}]` + } else { + normalizedRoute += `${token.prefix}[${token.name}]` + // TODO: Optional modifier `?` is not supported yet. + } + } else if (typeof token === 'string') { + normalizedRoute += token + } + } + + extraRoutes.push(normalizedRoute) + } + } + + if (rewrites) { + for (const rewrite of rewrites.beforeFiles) { + addExtraRoute(rewrite.source) + } + for (const rewrite of rewrites.afterFiles) { + addExtraRoute(rewrite.source) + } + for (const rewrite of rewrites.fallback) { + addExtraRoute(rewrite.source) + } + } + + if (redirects) { + for (const redirect of redirects) { + // Skip internal redirects + // https://github.com/vercel/next.js/blob/8ff3d7ff57836c24088474175d595b4d50b3f857/packages/next/src/lib/load-custom-routes.ts#L704-L710 + if (!('internal' in redirect)) { + addExtraRoute(redirect.source) + } + } + } + + const fallback = !edgeRoutes.length && !nodeRoutes.length ? 'string' : '' + const routes = [...edgeRoutes, ...nodeRoutes, ...extraRoutes] + + // By exposing the static route types separately as string literals, + // editors can provide autocompletion for them. However it's currently not + // possible to provide the same experience for dynamic routes. + let staticRouteTypes = '' + let dynamicRouteTypes = '' + + function addRouteToRouteTypes(route: string) { + const isDynamic = isDynamicRoute(route) + if (isDynamic) { + route = route + .split('/') + .map((part) => { + if (part.startsWith('[') && part.endsWith(']')) { + if (part.startsWith('[...')) { + // /[...slug] + return `\${CatchAllSlug}` + } else if (part.startsWith('[[...') && part.endsWith(']]')) { + // /[[...slug]] + return `\${OptionalCatchAllSlug}` + } + // /[slug] + return `\${SafeSlug}` + } + return part + }) + .join('/') + } + + if (isDynamic) { + dynamicRouteTypes += `\n | \`${route}\`` + } else { + staticRouteTypes += `\n | \`${route}\`` + } + } + + for (const route of routes) { + addRouteToRouteTypes(route) + } -export const pageFiles = new Set() + return `// Type definitions for Next.js routes -function createRouteDefinitions() { - const fallback = - !edgeRouteTypes.length && !nodeRouteTypes.length ? 'string' : '' +/** + * Internal types used by the Next.js router and Link component. + * These types are not meant to be used directly. + * @internal + */ +declare namespace __next_route_internal_types__ { + type SearchOrHash = \`?\${string}\` | \`#\${string}\` - return ` -type SearchOrHash = \`?\${string}\` | \`#\${string}\` -type Suffix = '' | SearchOrHash + type Suffix = '' | SearchOrHash -type SafeSlug = - S extends \`\${string}/\${string}\` + type SafeSlug = S extends \`\${string}/\${string}\` ? never : S extends \`\${string}\${SearchOrHash}\` ? never @@ -140,65 +258,63 @@ type SafeSlug = ? never : S -type CatchAllSlug = - S extends \`\${string}\${SearchOrHash}\` + type CatchAllSlug = S extends \`\${string}\${SearchOrHash}\` ? never : S extends '' ? never : S -type OptionalCatchAllSlug = - S extends \`\${string}\${SearchOrHash}\` - ? never - : S + type OptionalCatchAllSlug = + S extends \`\${string}\${SearchOrHash}\` ? never : S -type Route = ${fallback} -${ - edgeRouteTypes.map((route) => ` | ${route}`).join('\n') + - nodeRouteTypes.map((route) => ` | ${route}`).join('\n') + type StaticRoutes = ${staticRouteTypes} + type DynamicRoutes = ${dynamicRouteTypes} + + type RouteImpl = ${fallback} + | StaticRoutes + | \`\${StaticRoutes}\${Suffix}\` + | (T extends \`\${DynamicRoutes}\${Suffix}\` ? T : never) } -declare module 'next/link' { - import React from 'react' - import { UrlObject } from 'url' - import { LinkProps as OriginalLinkProps } from 'next/dist/client/link' +declare module 'next' { + export { default } from 'next/types' + export * from 'next/types' + + export type Route = __next_route_internal_types__.RouteImpl +} - type LinkRestProps = Omit, keyof OriginalLinkProps> & OriginalLinkProps, 'href'>; +declare module 'next/link' { + import type { LinkProps as OriginalLinkProps } from 'next/dist/client/link' + import type { AnchorHTMLAttributes } from 'react' + import type { UrlObject } from 'url' + + type LinkRestProps = Omit, keyof OriginalLinkProps> & OriginalLinkProps, 'href'>; // If the href prop can be a Route type with an infer-able S, it's valid. - type HrefProp = T extends (Route | UrlObject) ? { - /** - * The path or URL to navigate to. This is the only required prop. It can also be an object. - * - * https://nextjs.org/docs/api-reference/next/link - */ - href: T - } : { + type HrefProp = { /** * The path or URL to navigate to. This is the only required prop. It can also be an object. - * - * https://nextjs.org/docs/api-reference/next/link + * @see https://nextjs.org/docs/api-reference/next/link */ - href: never + href: __next_route_internal_types__.RouteImpl | UrlObject } export type LinkProps = LinkRestProps & HrefProp export default function Link(props: LinkProps): JSX.Element -} - -declare module 'next' { - export { Route } }` } -export class FlightTypesPlugin { +export class NextTypesPlugin { dir: string distDir: string appDir: string - pagesDir: string dev: boolean isEdgeServer: boolean + pageExtensions: string[] + pagesDir: string typedRoutes: boolean + originalRewrites: Rewrites | undefined + originalRedirects: Redirect[] | undefined constructor(options: Options) { this.dir = options.dir @@ -206,8 +322,11 @@ export class FlightTypesPlugin { this.appDir = options.appDir this.dev = options.dev this.isEdgeServer = options.isEdgeServer + this.pageExtensions = options.pageExtensions this.pagesDir = path.join(this.appDir, '..', 'pages') this.typedRoutes = options.typedRoutes + this.originalRewrites = options.originalRewrites + this.originalRedirects = options.originalRedirects } collectPage(filePath: string) { @@ -220,39 +339,24 @@ export class FlightTypesPlugin { return } - const page = isApp - ? normalizeAppPath(path.relative(this.appDir, filePath)) - : '/' + path.relative(this.pagesDir, filePath) - - let route = - (isApp - ? page.replace(/\/page\.[^./]+$/, '') - : page.replace(/\.[^./]+$/, '') - ).replace(/\/index$/, '') || '/' - - if (isDynamicRoute(route)) { - route = route - .split('/') - .map((part) => { - if (part.startsWith('[') && part.endsWith(']')) { - if (part.startsWith('[...')) { - // /[...slug] - return `\${CatchAllSlug}` - } else if (part.startsWith('[[...') && part.endsWith(']]')) { - // /[[...slug]] - return `\${OptionalCatchAllSlug}` - } - // /[slug] - return `\${SafeSlug}` - } - return part - }) - .join('/') + // Filter out non-page files in pages dir + if ( + !isApp && + /[/\\](?:_app|_document|_error|404|500)\.[^.]+$/.test(filePath) + ) { + return } - ;(this.isEdgeServer ? edgeRouteTypes : nodeRouteTypes).push( - `\`${route}\${Suffix}\`` + let route = (isApp ? normalizeAppPath : denormalizePagePath)( + ensureLeadingSlash( + getPageFromPath( + path.relative(isApp ? this.appDir : this.pagesDir, filePath), + this.pageExtensions + ) + ) ) + + ;(this.isEdgeServer ? edgeRoutes : nodeRoutes).push(route) } apply(compiler: webpack.Compiler) { @@ -337,9 +441,9 @@ export class FlightTypesPlugin { // Clear routes if (this.isEdgeServer) { - edgeRouteTypes.length = 0 + edgeRoutes.length = 0 } else { - nodeRouteTypes.length = 0 + nodeRoutes.length = 0 } compilation.chunkGroups.forEach((chunkGroup: any) => { @@ -375,15 +479,20 @@ export class FlightTypesPlugin { await Promise.all(promises) if (this.typedRoutes) { - pageFiles.forEach((file) => { - this.collectPage(file) - }) + if (this.dev && !this.isEdgeServer) { + devPageFiles.forEach((file) => { + this.collectPage(file) + }) + } const linkTypePath = path.join('types', 'link.d.ts') const assetPath = assetDirRelative + '/' + linkTypePath.replace(/\\/g, '/') assets[assetPath] = new sources.RawSource( - createRouteDefinitions() + createRouteDefinitions( + this.originalRewrites, + this.originalRedirects + ) ) as unknown as webpack.sources.RawSource } diff --git a/packages/next/src/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts b/packages/next/src/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts index 1cd9b47d1df0f..a4f2d1e919d6f 100644 --- a/packages/next/src/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts +++ b/packages/next/src/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts @@ -11,7 +11,7 @@ const originModules = [ require.resolve('../../../server/require'), require.resolve('../../../server/load-components'), require.resolve('../../../server/next-server'), - require.resolve('../../../compiled/react-server-dom-webpack/client'), + require.resolve('../../../compiled/react-server-dom-webpack/client.edge'), ] const RUNTIME_NAMES = ['webpack-runtime', 'webpack-api-runtime'] @@ -85,7 +85,7 @@ export class NextJsRequireCacheHotReloader implements WebpackPluginInstance { // ensure we reset the cache for sc_server components // loaded via react-server-dom-webpack const reactServerDomModId = require.resolve( - 'next/dist/compiled/react-server-dom-webpack/client' + 'next/dist/compiled/react-server-dom-webpack/client.edge' ) const reactServerDomMod = require.cache[reactServerDomModId] diff --git a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextFontError.ts b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextFontError.ts index e86ce98bba1ff..217cbe9c0faa0 100644 --- a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextFontError.ts +++ b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextFontError.ts @@ -8,7 +8,7 @@ export function getNextFontError( const resourceResolveData = module.resourceResolveData if ( !module.loaders.find((loader: any) => - loader.loader.includes('next-font-loader/index.js') + /next-font-loader[/\\]index.js/.test(loader.loader) ) ) { return false diff --git a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextInvalidImportError.ts b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextInvalidImportError.ts index 276461b5d02a5..b8d55d6a7e5b3 100644 --- a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextInvalidImportError.ts +++ b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNextInvalidImportError.ts @@ -35,14 +35,21 @@ export function getNextInvalidImportError( let invalidImportMessage = '' if (firstExternalModule) { - let formattedExternalFile = - firstExternalModule.resource.split('node_modules') - formattedExternalFile = - formattedExternalFile[formattedExternalFile.length - 1] - - invalidImportMessage += `\n\nThe error was caused by importing '${formattedExternalFile.slice( - 1 - )}' in '${importTrace[0]}'.` + const firstExternalPackageName = + firstExternalModule.resourceResolveData?.descriptionFileData?.name + + if (firstExternalPackageName === 'styled-jsx') { + invalidImportMessage += `\n\nThe error was caused by using 'styled-jsx' in '${importTrace[0]}'. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.` + } else { + let formattedExternalFile = + firstExternalModule.resource.split('node_modules') + formattedExternalFile = + formattedExternalFile[formattedExternalFile.length - 1] + + invalidImportMessage += `\n\nThe error was caused by importing '${formattedExternalFile.slice( + 1 + )}' in '${importTrace[0]}'.` + } } return new SimpleWebpackError( diff --git a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts index beb6f35ff5f09..111ad984b6906 100644 --- a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts +++ b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts @@ -75,10 +75,37 @@ async function getSourceFrame( } } +function getFormattedFileName( + fileName: string, + module: any, + lineNumber?: string, + column?: string +): string { + if ( + module.loaders?.find((loader: any) => + /next-font-loader[/\\]index.js/.test(loader.loader) + ) + ) { + // Parse the query and get the path of the file where the font function was called. + // provided by next-swc next_font_loaders + return JSON.parse(module.resourceResolveData.query.slice(1)).path + } else { + let formattedFileName: string = chalk.cyan(fileName) + if (lineNumber && column) { + formattedFileName += `:${chalk.yellow(lineNumber)}:${chalk.yellow( + column + )}` + } + + return formattedFileName + } +} + export async function getNotFoundError( compilation: webpack.Compilation, input: any, - fileName: string + fileName: string, + module: any ) { if ( input.name !== 'ModuleNotFoundError' && @@ -128,12 +155,12 @@ export async function getNotFoundError( '\nhttps://nextjs.org/docs/messages/module-not-found\n' + importTrace() - let formattedFileName: string = chalk.cyan(fileName) - if (lineNumber && column) { - formattedFileName += `:${chalk.yellow(lineNumber)}:${chalk.yellow( - column - )}` - } + const formattedFileName = getFormattedFileName( + fileName, + module, + lineNumber, + column + ) return new SimpleWebpackError(formattedFileName, message) } catch (err) { diff --git a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseRSC.ts b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseRSC.ts index 00ae6c2945bb4..c322023d4a373 100644 --- a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseRSC.ts +++ b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseRSC.ts @@ -16,6 +16,10 @@ function formatRSCErrorMessage( const NEXT_RSC_ERR_REACT_API = /.+NEXT_RSC_ERR_REACT_API: (.*?)\n/s const NEXT_RSC_ERR_SERVER_IMPORT = /.+NEXT_RSC_ERR_SERVER_IMPORT: (.*?)\n/s const NEXT_RSC_ERR_CLIENT_IMPORT = /.+NEXT_RSC_ERR_CLIENT_IMPORT: (.*?)\n/s + const NEXT_RSC_ERR_CLIENT_METADATA_EXPORT = + /.+NEXT_RSC_ERR_CLIENT_METADATA_EXPORT: (.*?)\n/s + const NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT = + /NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT/s const NEXT_RSC_ERR_CLIENT_DIRECTIVE = /.+NEXT_RSC_ERR_CLIENT_DIRECTIVE\n/s const NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN = /.+NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN\n/s @@ -70,33 +74,17 @@ function formatRSCErrorMessage( '\n\nOne of these is marked as a client entry with "use client":\n' } } else if (NEXT_RSC_ERR_CLIENT_DIRECTIVE.test(message)) { - if (isPagesDir) { - formattedMessage = message.replace( - NEXT_RSC_ERR_CLIENT_DIRECTIVE, - `\n\nYou have tried to use the "use client" directive which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components\n\n` - ) - formattedVerboseMessage = '\n\nImport trace for requested module:\n' - } else { - formattedMessage = message.replace( - NEXT_RSC_ERR_CLIENT_DIRECTIVE, - `\n\nThe "use client" directive must be placed before other expressions. Move it to the top of the file to resolve this issue.\n\n` - ) - formattedVerboseMessage = '\n\nImport path:\n' - } + formattedMessage = message.replace( + NEXT_RSC_ERR_CLIENT_DIRECTIVE, + `\n\nThe "use client" directive must be placed before other expressions. Move it to the top of the file to resolve this issue.\n\n` + ) + formattedVerboseMessage = '\n\nImport path:\n' } else if (NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN.test(message)) { - if (isPagesDir) { - formattedMessage = message.replace( - NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN, - `\n\nYou have tried to use the "use client" directive which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components\n\n` - ) - formattedVerboseMessage = '\n\nImport trace for requested module:\n' - } else { - formattedMessage = message.replace( - NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN, - `\n\n"use client" must be a directive, and placed before other expressions. Remove the parentheses and move it to the top of the file to resolve this issue.\n\n` - ) - formattedVerboseMessage = '\n\nImport path:\n' - } + formattedMessage = message.replace( + NEXT_RSC_ERR_CLIENT_DIRECTIVE_PAREN, + `\n\n"use client" must be a directive, and placed before other expressions. Remove the parentheses and move it to the top of the file to resolve this issue.\n\n` + ) + formattedVerboseMessage = '\n\nImport path:\n' } else if (NEXT_RSC_ERR_INVALID_API.test(message)) { formattedMessage = message.replace( NEXT_RSC_ERR_INVALID_API, @@ -109,6 +97,20 @@ function formatRSCErrorMessage( `\n\n${fileName} must be a Client Component. Add the "use client" directive the top of the file to resolve this issue.\n\n` ) formattedVerboseMessage = '\n\nImport path:\n' + } else if (NEXT_RSC_ERR_CLIENT_METADATA_EXPORT.test(message)) { + formattedMessage = message.replace( + NEXT_RSC_ERR_CLIENT_METADATA_EXPORT, + `\n\nYou are attempting to export "$1" from a component marked with "use client", which is disallowed. Either remove the export, or the "use client" directive. Read more: https://beta.nextjs.org/docs/api-reference/metadata\n\n` + ) + + formattedVerboseMessage = '\n\nFile path:\n' + } else if (NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT.test(message)) { + formattedMessage = message.replace( + NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT, + `\n\n"metadata" and "generateMetadata" cannot be exported at the same time, please keep one of them. Read more: https://beta.nextjs.org/docs/api-reference/metadata\n\n` + ) + + formattedVerboseMessage = '\n\nFile path:\n' } return [formattedMessage, formattedVerboseMessage] diff --git a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts index f78db1e562707..6862511ea0de6 100644 --- a/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts +++ b/packages/next/src/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts @@ -68,7 +68,8 @@ export async function getModuleBuildError( const notFoundError = await getNotFoundError( compilation, input, - sourceFilename + sourceFilename, + input.module ) if (notFoundError !== false) { return notFoundError diff --git a/packages/next/src/bundles/cssnano-simple/cssnano-preset-simple.js b/packages/next/src/bundles/cssnano-simple/cssnano-preset-simple.js new file mode 100644 index 0000000000000..cd973ff509b0f --- /dev/null +++ b/packages/next/src/bundles/cssnano-simple/cssnano-preset-simple.js @@ -0,0 +1,16 @@ +// Originated from https://github.com/Timer/cssnano-preset-simple/blob/master/src/index.js + +/** + * We will not try to override "postcss-svgo" here. Instead we will alias "postcss-svgo" to a stub + * plugin (located at "next/dist/compiled/postcss-plugin-stub-for-cssnano-simple") during pre-compilation + */ + +module.exports = function (opts = {}) { + const options = Object.assign( + {}, + { cssDeclarationSorter: { exclude: true }, calc: { exclude: true } }, + opts + ) + // eslint-disable-next-line import/no-extraneous-dependencies + return require('cssnano-preset-default')(options) +} diff --git a/packages/next/src/bundles/cssnano-simple/index.js b/packages/next/src/bundles/cssnano-simple/index.js new file mode 100644 index 0000000000000..0eae137e7169b --- /dev/null +++ b/packages/next/src/bundles/cssnano-simple/index.js @@ -0,0 +1,68 @@ +// Originated from https://github.com/Timer/cssnano-simple/blob/master/src/index.js + +/** + * This file is the actual "cssnano-simple" implementation, which will eventually be used + * by "next/src/build/cssnano-simple" + */ + +const createSimplePreset = require('./cssnano-preset-simple') + +module.exports = (opts = {}, postcss = require('postcss')) => { + const excludeAll = Boolean(opts && opts.excludeAll) + + const userOpts = Object.assign({}, opts) + + if (excludeAll) { + for (const userOption in userOpts) { + if (!userOpts.hasOwnProperty(userOption)) continue + const val = userOpts[userOption] + if (!Boolean(val)) { + continue + } + + if (Object.prototype.toString.call(val) === '[object Object]') { + userOpts[userOption] = Object.assign({}, { exclude: false }, val) + } + } + } + + const options = Object.assign( + {}, + excludeAll ? { rawCache: true } : undefined, + userOpts + ) + + const plugins = [] + createSimplePreset(options).plugins.forEach((plugin) => { + if (Array.isArray(plugin)) { + let [processor, pluginOpts] = plugin + processor = processor.default || processor + + const isEnabled = + // No options: + (!excludeAll && typeof pluginOpts === 'undefined') || + // Short-hand enabled: + (typeof pluginOpts === 'boolean' && pluginOpts) || + // Include all plugins: + (!excludeAll && + pluginOpts && + typeof pluginOpts === 'object' && + !pluginOpts.exclude) || + // Exclude all plugins: + (excludeAll && + pluginOpts && + typeof pluginOpts === 'object' && + pluginOpts.exclude === false) + + if (isEnabled) { + plugins.push(processor(pluginOpts)) + } + } else { + plugins.push(plugin) + } + }) + + return postcss(plugins) +} + +module.exports.postcss = true diff --git a/packages/next/src/bundles/postcss-plugin-stub/index.js b/packages/next/src/bundles/postcss-plugin-stub/index.js new file mode 100644 index 0000000000000..59778240348cc --- /dev/null +++ b/packages/next/src/bundles/postcss-plugin-stub/index.js @@ -0,0 +1,25 @@ +// Originated from https://github.com/Timer/cssnano-preset-simple/blob/master/postcss-plugin-stub/index.js + +/** + * This file creates a stub postcss plugin + * + * It will be pre-compiled into "src/compiled/postcss-plugin-stub-for-cssnano-simple", + * which "postcss-svgo" will be aliased to when creating "cssnano-preset-simple" + */ + +function pluginCreator() { + return { + postcssPlugin: 'postcss-plugin-stub', + prepare() { + return {} + }, + } +} +pluginCreator.postcss = true + +Object.defineProperty(exports, '__esModule', { + value: true, +}) + +module.exports = pluginCreator +module.exports.default = pluginCreator diff --git a/packages/next/src/cli/next-dev.ts b/packages/next/src/cli/next-dev.ts index b09ff810197b5..37cf40fe76e56 100644 --- a/packages/next/src/cli/next-dev.ts +++ b/packages/next/src/cli/next-dev.ts @@ -21,6 +21,8 @@ import { fileExists } from '../lib/file-exists' import Watchpack from 'next/dist/compiled/watchpack' import stripAnsi from 'next/dist/compiled/strip-ansi' import { warn } from '../build/output/log' +import { getPossibleInstrumentationHookFilenames } from '../build/utils' +import { getNpxCommand } from '../lib/helpers/get-npx-command' let isTurboSession = false let sessionStopHandled = false @@ -170,9 +172,10 @@ const nextDev: CliCommand = async (argv) => { } async function preflight() { - const { getPackageVersion } = await Promise.resolve( + const { getPackageVersion, getDependencies } = (await Promise.resolve( require('../lib/get-package-version') - ) + )) as typeof import('../lib/get-package-version') + const [sassVersion, nodeSassVersion] = await Promise.all([ getPackageVersion({ cwd: dir, name: 'sass' }), getPackageVersion({ cwd: dir, name: 'node-sass' }), @@ -184,6 +187,24 @@ const nextDev: CliCommand = async (argv) => { ' Read more: https://nextjs.org/docs/messages/duplicate-sass' ) } + + const { dependencies, devDependencies } = await getDependencies({ + cwd: dir, + }) + + // Warn if @next/font is installed as a dependency. Ignore `workspace:*` to not warn in the Next.js monorepo. + if ( + dependencies['@next/font'] || + (devDependencies['@next/font'] && + devDependencies['@next/font'] !== 'workspace:*') + ) { + const command = getNpxCommand(dir) + Log.warn( + 'Your project has `@next/font` installed as a dependency, please use the built-in `next/font` instead. ' + + 'The `@next/font` package will be removed in Next.js 14. ' + + `You can migrate by running \`${command} @next/codemod@latest built-in-next-font .\`. Read more: https://nextjs.org/docs/messages/built-in-next-font` + ) + } } const port = getPort(args) @@ -249,7 +270,7 @@ const nextDev: CliCommand = async (argv) => { let babelrc = await getBabelConfigFile(dir) if (babelrc) babelrc = path.basename(babelrc) - let hasNonDefaultConfig + let nonSupportedConfig: string[] = [] let rawNextConfig: NextConfig = {} try { @@ -296,14 +317,14 @@ const nextDev: CliCommand = async (argv) => { } } - hasNonDefaultConfig = Object.keys(rawNextConfig).some((key) => + nonSupportedConfig = Object.keys(rawNextConfig).filter((key) => checkUnsupportedCustomConfig(key, rawNextConfig, defaultConfig) ) } catch (e) { console.error('Unexpected error occurred while checking config', e) } - const hasWarningOrError = babelrc || hasNonDefaultConfig + const hasWarningOrError = babelrc || nonSupportedConfig.length if (!hasWarningOrError) { thankYouMsg = chalk.dim(thankYouMsg) } @@ -328,13 +349,17 @@ const nextDev: CliCommand = async (argv) => { `Babel is not yet supported. To use Turbopack at the moment,\n you'll need to remove your usage of Babel.` )}` } - if (hasNonDefaultConfig) { + if (nonSupportedConfig.length) { unsupportedParts += `\n\n- Unsupported Next.js configuration option(s) (${chalk.cyan( 'next.config.js' )})\n ${chalk.dim( `The only configurations options supported are:\n${supportedTurbopackNextConfigOptions .map((name) => ` - ${chalk.cyan(name)}\n`) - .join('')} To use Turbopack, remove other configuration options.` + .join( + '' + )} To use Turbopack, remove the following configuration options:\n${nonSupportedConfig.map( + (name) => ` - ${chalk.red(name)}\n` + )}` )} ` } @@ -440,7 +465,9 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit // Start preflight after server is listening and ignore errors: preflight().catch(() => {}) - await telemetry.flush() + if (!isCustomTurbopack) { + await telemetry.flush() + } return server } else { // we're using a sub worker to avoid memory leaks. When memory usage exceeds 90%, we kill the worker and restart it. @@ -495,8 +522,12 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit return execArgv } + let childProcessExitUnsub: (() => void) | null = null const setupFork = (env?: NodeJS.ProcessEnv, newDir?: string) => { + childProcessExitUnsub?.() + childProcess?.kill() + const startDir = dir const [, script, ...nodeArgs] = process.argv let shouldFilter = false @@ -562,10 +593,11 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit } } childProcess?.addListener('exit', callback) - return () => childProcess?.removeListener('exit', callback) + childProcessExitUnsub = () => + childProcess?.removeListener('exit', callback) } - let childProcessExitUnsub = setupFork() + setupFork() config = await loadConfig( PHASE_DEVELOPMENT_SERVER, @@ -576,10 +608,8 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit ) const handleProjectDirRename = (newDir: string) => { - childProcessExitUnsub() - childProcess?.kill() process.chdir(newDir) - childProcessExitUnsub = setupFork( + setupFork( { ...Object.keys(process.env).reduce((newEnv, key) => { newEnv[key] = process.env[key]?.replace(dir, newDir) @@ -592,19 +622,83 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit } const parentDir = path.join('/', dir, '..') const watchedEntryLength = parentDir.split('/').length + 1 - const previousItems = new Set() + const previousItems = new Set() + + const instrumentationFilePaths = !!config.experimental + ?.instrumentationHook + ? getPossibleInstrumentationHookFilenames(dir, config.pageExtensions!) + : [] + + const instrumentationFileWatcher = new Watchpack({}) + + instrumentationFileWatcher.watch({ + files: instrumentationFilePaths, + startTime: 0, + }) + + let instrumentationFileLastHash: string | undefined = undefined + const previousInstrumentationFiles = new Set() + instrumentationFileWatcher.on('aggregated', async () => { + const knownFiles = instrumentationFileWatcher.getTimeInfoEntries() + const instrumentationFile = [...knownFiles.entries()].find( + ([key, value]) => instrumentationFilePaths.includes(key) && value + )?.[0] + + if (instrumentationFile) { + const fs = require('fs') as typeof import('fs') + const instrumentationFileHash = ( + require('crypto') as typeof import('crypto') + ) + .createHash('sha256') + .update(await fs.promises.readFile(instrumentationFile, 'utf8')) + .digest('hex') + + if ( + instrumentationFileLastHash && + instrumentationFileHash !== instrumentationFileLastHash + ) { + warn( + `The instrumentation file has changed, restarting the server to apply changes.` + ) + return setupFork() + } else { + if ( + !instrumentationFileLastHash && + previousInstrumentationFiles.size !== 0 + ) { + warn( + 'The instrumentation file was added, restarting the server to apply changes.' + ) + return setupFork() + } + instrumentationFileLastHash = instrumentationFileHash + } + } else if ( + [...previousInstrumentationFiles.keys()].find((key) => + instrumentationFilePaths.includes(key) + ) + ) { + warn( + `The instrumentation file has been removed, restarting the server to apply changes.` + ) + instrumentationFileLastHash = undefined + return setupFork() + } + + previousInstrumentationFiles.clear() + knownFiles.forEach((_, key) => previousInstrumentationFiles.add(key)) + }) - const wp = new Watchpack({ + const projectFolderWatcher = new Watchpack({ ignored: (entry: string) => { - // watch only one level return !(entry.split('/').length <= watchedEntryLength) }, }) - wp.watch({ directories: [parentDir], startTime: 0 }) + projectFolderWatcher.watch({ directories: [parentDir], startTime: 0 }) - wp.on('aggregated', () => { - const knownFiles = wp.getTimeInfoEntries() + projectFolderWatcher.on('aggregated', async () => { + const knownFiles = projectFolderWatcher.getTimeInfoEntries() const newFiles: string[] = [] let hasPagesApp = false diff --git a/packages/next/src/cli/next-lint.ts b/packages/next/src/cli/next-lint.ts index e99ba6fead0a8..e9e66ef8fef3d 100755 --- a/packages/next/src/cli/next-lint.ts +++ b/packages/next/src/cli/next-lint.ts @@ -18,6 +18,8 @@ import { eventLintCheckCompleted } from '../telemetry/events' import { CompileError } from '../lib/compile-error' import isError from '../lib/is-error' import { getProjectDir } from '../lib/get-project-dir' +import { findPagesDir } from '../lib/find-pages-dir' +import { verifyTypeScriptSetup } from '../lib/verifyTypeScriptSetup' const eslintOptions = (args: arg.Spec, defaultCacheLocation: string) => ({ overrideConfigFile: args['--config'] || null, @@ -196,6 +198,21 @@ const nextLint: CliCommand = async (argv) => { const distDir = join(baseDir, nextConfig.distDir) const defaultCacheLocation = join(distDir, 'cache', 'eslint/') const hasAppDir = !!nextConfig.experimental.appDir + const { pagesDir, appDir } = findPagesDir( + baseDir, + !!nextConfig.experimental.appDir + ) + + await verifyTypeScriptSetup({ + dir: baseDir, + distDir, + intentDirs: [pagesDir, appDir].filter(Boolean) as string[], + typeCheckPreflight: false, + tsconfigPath: nextConfig.typescript.tsconfigPath, + disableStaticImages: nextConfig.images.disableStaticImages, + isAppDirEnabled: !!appDir, + hasPagesDir: !!pagesDir, + }) runLintCheck(baseDir, pathsToLint, hasAppDir, { lintDuringBuild: false, diff --git a/packages/next/src/client/components/navigation.ts b/packages/next/src/client/components/navigation.ts index 0733f797165b6..d249c29f4a793 100644 --- a/packages/next/src/client/components/navigation.ts +++ b/packages/next/src/client/components/navigation.ts @@ -35,7 +35,6 @@ export class ReadonlyURLSearchParams { toString: URLSearchParams['toString'] constructor(urlSearchParams: URLSearchParams) { - // Since `new Headers` uses `this.append()` to fill the headers object ReadonlyHeaders can't extend from Headers directly as it would throw. this[INTERNAL_URLSEARCHPARAMS_INSTANCE] = urlSearchParams this.entries = urlSearchParams.entries.bind(urlSearchParams) @@ -68,13 +67,14 @@ export class ReadonlyURLSearchParams { /** * Get a read-only URLSearchParams object. For example searchParams.get('foo') would return 'bar' when ?foo=bar * Learn more about URLSearchParams here: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams - * - * @internal - re-exported in `next-env.d.ts`. */ -export function useSearchParams(): ReadonlyURLSearchParams | null { +export function useSearchParams(): ReadonlyURLSearchParams { clientHookInServerComponentError('useSearchParams') const searchParams = useContext(SearchParamsContext) + // In the case where this is `null`, the compat types added in + // `next-env.d.ts` will add a new overload that changes the return type to + // include `null`. const readonlySearchParams = useMemo(() => { if (!searchParams) { // When the router is not ready in pages, we won't have the search params @@ -83,7 +83,7 @@ export function useSearchParams(): ReadonlyURLSearchParams | null { } return new ReadonlyURLSearchParams(searchParams) - }, [searchParams]) + }, [searchParams]) as ReadonlyURLSearchParams if (typeof window === 'undefined') { // AsyncLocalStorage should not be included in the client bundle. @@ -100,12 +100,12 @@ export function useSearchParams(): ReadonlyURLSearchParams | null { /** * Get the current pathname. For example usePathname() on /dashboard?foo=bar would return "/dashboard" - * - * @internal - re-exported in `next-env.d.ts`. */ -export function usePathname(): string | null { +export function usePathname(): string { clientHookInServerComponentError('usePathname') - return useContext(PathnameContext) + // In the case where this is `null`, the compat types added in `next-env.d.ts` + // will add a new overload that changes the return type to include `null`. + return useContext(PathnameContext) as string } // TODO-APP: getting all params when client-side navigating is non-trivial as it does not have route matchers so this might have to be a server context instead. diff --git a/packages/next/src/client/components/react-dev-overlay/hot-reloader-client.tsx b/packages/next/src/client/components/react-dev-overlay/hot-reloader-client.tsx index a57464902bdc0..893c56f5c6e2d 100644 --- a/packages/next/src/client/components/react-dev-overlay/hot-reloader-client.tsx +++ b/packages/next/src/client/components/react-dev-overlay/hot-reloader-client.tsx @@ -10,7 +10,10 @@ import React, { import stripAnsi from 'next/dist/compiled/strip-ansi' import formatWebpackMessages from '../../dev/error-overlay/format-webpack-messages' import { useRouter } from '../navigation' -import { errorOverlayReducer } from './internal/error-overlay-reducer' +import { + ACTION_VERSION_INFO, + errorOverlayReducer, +} from './internal/error-overlay-reducer' import { ACTION_BUILD_OK, ACTION_BUILD_ERROR, @@ -31,10 +34,12 @@ import { useWebsocketPing, } from './internal/helpers/use-websocket' import { parseComponentStack } from './internal/helpers/parse-component-stack' +import type { VersionInfo } from '../../../server/dev/parse-version-info' interface Dispatcher { onBuildOk(): void onBuildError(message: string): void + onVersionInfo(versionInfo: VersionInfo): void onBeforeRefresh(): void onRefresh(): void } @@ -218,7 +223,12 @@ function processMessage( handleAvailableHash(obj.hash) } - const { errors, warnings } = obj + const { errors, warnings, versionInfo } = obj + + // Is undefined when it's a 'built' event + if (versionInfo) { + dispatcher.onVersionInfo(versionInfo) + } const hasErrors = Boolean(errors && errors.length) // Compilation with errors (e.g. syntax error or missing modules). if (hasErrors) { @@ -403,21 +413,25 @@ export default function HotReload({ buildError: null, errors: [], refreshState: { type: 'idle' }, + versionInfo: { installed: '0.0.0', staleness: 'unknown' }, }) const dispatcher = useMemo((): Dispatcher => { return { - onBuildOk(): void { + onBuildOk() { dispatch({ type: ACTION_BUILD_OK }) }, - onBuildError(message: string): void { + onBuildError(message) { dispatch({ type: ACTION_BUILD_ERROR, message }) }, - onBeforeRefresh(): void { + onBeforeRefresh() { dispatch({ type: ACTION_BEFORE_REFRESH }) }, - onRefresh(): void { + onRefresh() { dispatch({ type: ACTION_REFRESH }) }, + onVersionInfo(versionInfo) { + dispatch({ type: ACTION_VERSION_INFO, versionInfo }) + }, } }, [dispatch]) diff --git a/packages/next/src/client/components/react-dev-overlay/internal/ReactDevOverlay.tsx b/packages/next/src/client/components/react-dev-overlay/internal/ReactDevOverlay.tsx index 9d9eee98ea12e..715e3fd1b9571 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/ReactDevOverlay.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/ReactDevOverlay.tsx @@ -8,11 +8,11 @@ import { import { ShadowPortal } from './components/ShadowPortal' import { BuildError } from './container/BuildError' import { Errors, SupportedErrorEvent } from './container/Errors' +import { RootLayoutError } from './container/RootLayoutError' +import { parseStack } from './helpers/parseStack' import { Base } from './styles/Base' import { ComponentStyles } from './styles/ComponentStyles' import { CssReset } from './styles/CssReset' -import { parseStack } from './helpers/parseStack' -import { RootLayoutError } from './container/RootLayoutError' interface ReactDevOverlayState { reactError: SupportedErrorEvent | null @@ -79,11 +79,22 @@ class ReactDevOverlay extends React.PureComponent< missingTags={rootLayoutMissingTagsError.missingTags} /> ) : hasBuildError ? ( - + ) : reactError ? ( - + ) : hasRuntimeErrors ? ( - + ) : undefined} ) : undefined} diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.ts b/packages/next/src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.ts index f7368bb31d1ee..047ec16a20732 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.ts +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.ts @@ -8,6 +8,12 @@ const styles = css` align-items: center; justify-content: space-between; } + [data-nextjs-dialog-left-right] > nav { + flex: 1; + display: flex; + align-items: center; + margin-right: var(--size-gap); + } [data-nextjs-dialog-left-right] > nav > button { display: inline-flex; align-items: center; diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/Terminal.tsx b/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/Terminal.tsx index ed61d5fd13e3a..e563d69b26c6c 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/Terminal.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/Terminal.tsx @@ -1,5 +1,6 @@ import Anser from 'next/dist/compiled/anser' import * as React from 'react' +import { HotlinkedText } from '../hot-linked-text' import { EditorLink } from './EditorLink' export type TerminalProps = { content: string } @@ -59,7 +60,7 @@ export const Terminal: React.FC = function Terminal({ : undefined), }} > - {entry.content} + ))} {editorLinks.map((file) => ( diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/styles.tsx b/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/styles.tsx index f9bee2f8c5763..bf96e64248fa6 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/styles.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/Terminal/styles.tsx @@ -40,6 +40,9 @@ const styles = css` [data-with-open-in-editor-link] { margin-left: var(--size-gap-double); } + [data-nextjs-terminal] a { + color: inherit; + } ` export { styles } diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.tsx b/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.tsx new file mode 100644 index 0000000000000..46e219b1aac67 --- /dev/null +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.tsx @@ -0,0 +1,63 @@ +import React from 'react' +import type { VersionInfo } from '../../../../../../server/dev/parse-version-info' + +export function VersionStalenessInfo(props: VersionInfo) { + if (!props) return null + const { staleness, installed, expected } = props + let text = '' + let title = '' + let indicatorClass = '' + switch (staleness) { + case 'fresh': + text = 'Next.js is up to date' + title = `Latest available version is detected (${installed}).` + indicatorClass = 'fresh' + break + case 'stale-patch': + case 'stale-minor': + text = `Next.js (${installed}) out of date` + title = `There is a newer version (${expected}) available, upgrade recommended! ` + indicatorClass = 'stale' + break + case 'stale-major': { + text = `Next.js (${installed}) is outdated` + title = `An outdated version detected (latest is ${expected}), upgrade is highly recommended!` + indicatorClass = 'outdated' + break + } + case 'stale-prerelease': { + text = `Next.js (${installed}) is outdated` + title = `There is a newer canary version (${expected}) available, please upgrade! ` + indicatorClass = 'stale' + break + } + case 'newer-than-npm': + case 'unknown': + break + default: + break + } + + if (!text) return null + + return ( + + + + {text} + {' '} + {staleness === 'fresh' || staleness === 'unknown' ? null : ( + + (learn more) + + )} + + ) +} diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.tsx b/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.tsx new file mode 100644 index 0000000000000..51b4b085355b7 --- /dev/null +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.tsx @@ -0,0 +1,2 @@ +export { styles } from './styles' +export { VersionStalenessInfo } from './VersionStalenessInfo' diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.ts b/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.ts new file mode 100644 index 0000000000000..61f32b5c40b73 --- /dev/null +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.ts @@ -0,0 +1,33 @@ +import { noop as css } from '../../helpers/noop-template' + +const styles = css` + .nextjs-container-build-error-version-status { + flex: 1; + text-align: right; + } + .nextjs-container-build-error-version-status small { + margin-left: var(--size-gap); + font-size: var(--size-font-small); + } + .nextjs-container-build-error-version-status a { + font-size: var(--size-font-small); + } + .nextjs-container-build-error-version-status span { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 5px; + background: var(--color-ansi-bright-black); + } + .nextjs-container-build-error-version-status span.fresh { + background: var(--color-ansi-green); + } + .nextjs-container-build-error-version-status span.stale { + background: var(--color-ansi-yellow); + } + .nextjs-container-build-error-version-status span.outdated { + background: var(--color-ansi-red); + } +` + +export { styles } diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.test.ts b/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.test.ts new file mode 100644 index 0000000000000..9105ff91c8fc8 --- /dev/null +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.test.ts @@ -0,0 +1,17 @@ +import { getWordsAndWhitespaces } from './get-words-and-whitespaces' + +describe('getWordsAndWhitespaces', () => { + it('should return sequences of words and whitespaces', () => { + const text = ' \n\nhello world https://nextjs.org/\nhttps://nextjs.org/' + expect(getWordsAndWhitespaces(text)).toEqual([ + ' \n\n', + 'hello', + ' ', + 'world', + ' ', + 'https://nextjs.org/', + '\n', + 'https://nextjs.org/', + ]) + }) +}) diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.ts b/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.ts new file mode 100644 index 0000000000000..a1632bdb12dbe --- /dev/null +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.ts @@ -0,0 +1,37 @@ +function isWhitespace(char: string) { + return char === ' ' || char === '\n' +} + +/** + * Get sequences of words and whitespaces from a string. + * + * e.g. "Hello world \n\n" -> ["Hello", " ", "world", " \n\n"] + */ +export function getWordsAndWhitespaces(text: string) { + const wordsAndWhitespaces: string[] = [] + + let current = '' + let currentIsWhitespace = false + for (const char of text) { + if (current.length === 0) { + current += char + currentIsWhitespace = isWhitespace(char) + continue + } + + const nextIsWhitespace = isWhitespace(char) + if (currentIsWhitespace === nextIsWhitespace) { + current += char + } else { + wordsAndWhitespaces.push(current) + current = char + currentIsWhitespace = nextIsWhitespace + } + } + + if (current.length > 0) { + wordsAndWhitespaces.push(current) + } + + return wordsAndWhitespaces +} diff --git a/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/index.tsx b/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/index.tsx new file mode 100644 index 0000000000000..2dde5aba96952 --- /dev/null +++ b/packages/next/src/client/components/react-dev-overlay/internal/components/hot-linked-text/index.tsx @@ -0,0 +1,29 @@ +import React from 'react' +import { getWordsAndWhitespaces } from './get-words-and-whitespaces' + +const linkRegex = /https?:\/\/[^\s/$.?#].[^\s"]*/i + +export const HotlinkedText: React.FC<{ + text: string +}> = function HotlinkedText(props) { + const { text } = props + + const wordsAndWhitespaces = getWordsAndWhitespaces(text) + + return ( + <> + {linkRegex.test(text) + ? wordsAndWhitespaces.map((word, index) => { + if (linkRegex.test(word)) { + return ( + + {word} + + ) + } + return {word} + }) + : text} + + ) +} diff --git a/packages/next/src/client/components/react-dev-overlay/internal/container/BuildError.tsx b/packages/next/src/client/components/react-dev-overlay/internal/container/BuildError.tsx index 854082a64fe40..e2a46578d1c79 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/container/BuildError.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/container/BuildError.tsx @@ -1,4 +1,5 @@ import * as React from 'react' +import type { VersionInfo } from '../../../../../server/dev/parse-version-info' import { Dialog, DialogBody, @@ -7,12 +8,14 @@ import { } from '../components/Dialog' import { Overlay } from '../components/Overlay' import { Terminal } from '../components/Terminal' +import { VersionStalenessInfo } from '../components/VersionStalenessInfo' import { noop as css } from '../helpers/noop-template' -export type BuildErrorProps = { message: string } +export type BuildErrorProps = { message: string; versionInfo?: VersionInfo } export const BuildError: React.FC = function BuildError({ message, + versionInfo, }) { const noop = React.useCallback(() => {}, []) return ( @@ -26,6 +29,7 @@ export const BuildError: React.FC = function BuildError({

Failed to compile

+ {versionInfo ? : null}
@@ -45,6 +49,10 @@ export const BuildError: React.FC = function BuildError({ } export const styles = css` + .nextjs-container-build-error-header { + display: flex; + align-items: center; + } .nextjs-container-build-error-header > h4 { line-height: 1.5; margin: 0; diff --git a/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx b/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx index 22d0c90777f40..0714bdd55b5ba 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx @@ -19,6 +19,9 @@ import { getErrorSource } from '../helpers/nodeStackFrames' import { noop as css } from '../helpers/noop-template' import { CloseIcon } from '../icons/CloseIcon' import { RuntimeError } from './RuntimeError' +import { VersionStalenessInfo } from '../components/VersionStalenessInfo' +import type { VersionInfo } from '../../../../../server/dev/parse-version-info' +import { HotlinkedText } from '../components/hot-linked-text' export type SupportedErrorEvent = { id: number @@ -27,6 +30,7 @@ export type SupportedErrorEvent = { export type ErrorsProps = { errors: SupportedErrorEvent[] initialDisplayState: DisplayState + versionInfo?: VersionInfo } type ReadyErrorEvent = ReadyRuntimeError @@ -49,38 +53,10 @@ function getErrorSignature(ev: SupportedErrorEvent): string { return '' } -const HotlinkedText: React.FC<{ - text: string -}> = function HotlinkedText(props) { - const { text } = props - - const linkRegex = /https?:\/\/[^\s/$.?#].[^\s"]*/i - return ( - <> - {linkRegex.test(text) - ? text.split(' ').map((word, index, array) => { - if (linkRegex.test(word)) { - return ( - - {word} - {index === array.length - 1 ? '' : ' '} - - ) - } - return index === array.length - 1 ? ( - {word} - ) : ( - {word} - ) - }) - : text} - - ) -} - export const Errors: React.FC = function Errors({ errors, initialDisplayState, + versionInfo, }) { const [lookups, setLookups] = React.useState( {} as { [eventId: string]: ReadyErrorEvent } @@ -271,6 +247,7 @@ export const Errors: React.FC = function Errors({ {readyErrors.length} unhandled error {readyErrors.length < 2 ? '' : 's'} + {versionInfo ? : null}

{isServerError ? 'Server Error' : 'Unhandled Runtime Error'} diff --git a/packages/next/src/client/components/react-dev-overlay/internal/error-overlay-reducer.ts b/packages/next/src/client/components/react-dev-overlay/internal/error-overlay-reducer.ts index 2bc46a794ff7d..3eed9936b60ac 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/error-overlay-reducer.ts +++ b/packages/next/src/client/components/react-dev-overlay/internal/error-overlay-reducer.ts @@ -1,5 +1,6 @@ import type { StackFrame } from 'next/dist/compiled/stacktrace-parser' -import { SupportedErrorEvent } from './container/Errors' +import type { VersionInfo } from '../../../../server/dev/parse-version-info' +import type { SupportedErrorEvent } from './container/Errors' import { ComponentStackFrame } from './helpers/parse-component-stack' export const ACTION_BUILD_OK = 'build-ok' @@ -8,6 +9,7 @@ export const ACTION_BEFORE_REFRESH = 'before-fast-refresh' export const ACTION_REFRESH = 'fast-refresh' export const ACTION_UNHANDLED_ERROR = 'unhandled-error' export const ACTION_UNHANDLED_REJECTION = 'unhandled-rejection' +export const ACTION_VERSION_INFO = 'version-info' interface BuildOkAction { type: typeof ACTION_BUILD_OK @@ -34,6 +36,11 @@ export interface UnhandledRejectionAction { frames: StackFrame[] } +interface VersionInfoAction { + type: typeof ACTION_VERSION_INFO + versionInfo: VersionInfo +} + export type FastRefreshState = | { type: 'idle' @@ -51,6 +58,7 @@ export interface OverlayState { missingTags: string[] } refreshState: FastRefreshState + versionInfo: VersionInfo } function pushErrorFilterDuplicates( @@ -66,17 +74,18 @@ function pushErrorFilterDuplicates( ] } -export function errorOverlayReducer( - state: Readonly, - action: Readonly< +export const errorOverlayReducer: React.Reducer< + Readonly, + Readonly< | BuildOkAction | BuildErrorAction | BeforeFastRefreshAction | FastRefreshAction | UnhandledErrorAction | UnhandledRejectionAction + | VersionInfoAction > -): OverlayState { +> = (state, action) => { switch (action.type) { case ACTION_BUILD_OK: { return { ...state, buildError: null } @@ -136,6 +145,9 @@ export function errorOverlayReducer( return state } } + case ACTION_VERSION_INFO: { + return { ...state, versionInfo: action.versionInfo } + } default: { return state } diff --git a/packages/next/src/client/components/react-dev-overlay/internal/styles/ComponentStyles.tsx b/packages/next/src/client/components/react-dev-overlay/internal/styles/ComponentStyles.tsx index e0d1707681983..e2f73de501eac 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/styles/ComponentStyles.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/styles/ComponentStyles.tsx @@ -6,6 +6,7 @@ import { styles as leftRightDialogHeader } from '../components/LeftRightDialogHe import { styles as overlay } from '../components/Overlay/styles' import { styles as terminal } from '../components/Terminal/styles' import { styles as toast } from '../components/Toast' +import { styles as versionStaleness } from '../components/VersionStalenessInfo' import { styles as buildErrorStyles } from '../container/BuildError' import { styles as rootLayoutErrorStyles } from '../container/RootLayoutError' import { styles as containerErrorStyles } from '../container/Errors' @@ -27,6 +28,7 @@ export function ComponentStyles() { ${rootLayoutErrorStyles} ${containerErrorStyles} ${containerRuntimeErrorStyles} + ${versionStaleness} `} ) diff --git a/packages/next/src/client/components/router-reducer/fetch-server-response.ts b/packages/next/src/client/components/router-reducer/fetch-server-response.ts index 1e7317a701957..e500aa6bcf40b 100644 --- a/packages/next/src/client/components/router-reducer/fetch-server-response.ts +++ b/packages/next/src/client/components/router-reducer/fetch-server-response.ts @@ -1,4 +1,5 @@ 'use client' + import { createFromFetch } from 'next/dist/compiled/react-server-dom-webpack/client' import { FlightRouterState, FlightData } from '../../../server/app-render' import { diff --git a/packages/next/src/client/components/static-generation-async-storage.ts b/packages/next/src/client/components/static-generation-async-storage.ts index 1e868aa01c124..9977c0e07040d 100644 --- a/packages/next/src/client/components/static-generation-async-storage.ts +++ b/packages/next/src/client/components/static-generation-async-storage.ts @@ -8,8 +8,9 @@ export interface StaticGenerationStore { readonly isRevalidate?: boolean forceDynamic?: boolean - revalidate?: boolean | number + revalidate?: false | number forceStatic?: boolean + dynamicShouldError?: boolean pendingRevalidates?: Promise[] dynamicUsageDescription?: string diff --git a/packages/next/src/client/components/static-generation-bailout.ts b/packages/next/src/client/components/static-generation-bailout.ts index 27c2dae71b8a2..bdd41053df31b 100644 --- a/packages/next/src/client/components/static-generation-bailout.ts +++ b/packages/next/src/client/components/static-generation-bailout.ts @@ -8,6 +8,12 @@ export function staticGenerationBailout(reason: string): boolean | never { return true } + if (staticGenerationStore?.dynamicShouldError) { + throw new Error( + `Page with \`dynamic = "error"\` couldn't be rendered statically because it used \`${reason}\`` + ) + } + if (staticGenerationStore?.isStaticGeneration) { staticGenerationStore.revalidate = 0 const err = new DynamicServerError(reason) diff --git a/packages/next/src/client/dev/error-overlay/format-webpack-messages.ts b/packages/next/src/client/dev/error-overlay/format-webpack-messages.ts index d6e2f7d185e05..82a025f32f794 100644 --- a/packages/next/src/client/dev/error-overlay/format-webpack-messages.ts +++ b/packages/next/src/client/dev/error-overlay/format-webpack-messages.ts @@ -193,25 +193,18 @@ export default function formatWebpackMessages(json: any, verbose?: boolean) { }) // Reorder errors to put the most relevant ones first. - let reactServerComponentsBundleError = -1 let reactServerComponentsError = -1 for (let i = 0; i < formattedErrors.length; i++) { const error = formattedErrors[i] if (error.includes('ReactServerComponentsError')) { reactServerComponentsError = i - } - if (/Failed to bundle .+ in Server Components/.test(error)) { - reactServerComponentsBundleError = i + break } } - // Move the reactServerComponentsBundleError to the top, if it exists - // Otherwise, move the reactServerComponentsError to the top if it exists - if (reactServerComponentsBundleError !== -1) { - const error = formattedErrors.splice(reactServerComponentsBundleError, 1) - formattedErrors.unshift(error[0]) - } else if (reactServerComponentsError !== -1) { + // Move the reactServerComponentsError to the top if it exists + if (reactServerComponentsError !== -1) { const error = formattedErrors.splice(reactServerComponentsError, 1) formattedErrors.unshift(error[0]) } diff --git a/packages/next/src/client/image.tsx b/packages/next/src/client/image.tsx index 63786db3d545d..2f71d1ac87aba 100644 --- a/packages/next/src/client/image.tsx +++ b/packages/next/src/client/image.tsx @@ -276,7 +276,7 @@ function handleLoading( img['data-loaded-src'] = src const p = 'decode' in img ? img.decode() : Promise.resolve() p.catch(() => {}).then(() => { - if (!img.parentNode) { + if (!img.parentElement || !img.isConnected) { // Exit early in case of race condition: // - onload() is called // - decode() is called but incomplete @@ -396,15 +396,18 @@ const ImageElement = forwardRef( <> { if (forwardedRef) { diff --git a/packages/next/src/client/legacy/image.tsx b/packages/next/src/client/legacy/image.tsx index 7267f2f78ee34..214a514049170 100644 --- a/packages/next/src/client/legacy/image.tsx +++ b/packages/next/src/client/legacy/image.tsx @@ -559,6 +559,15 @@ const ImageElement = ({ )} diff --git a/packages/next/src/client/link.tsx b/packages/next/src/client/link.tsx index 325d0509096b6..d9e102c57b4f3 100644 --- a/packages/next/src/client/link.tsx +++ b/packages/next/src/client/link.tsx @@ -10,6 +10,7 @@ import { UrlObject } from 'url' import { resolveHref } from '../shared/lib/router/utils/resolve-href' import { isLocalURL } from '../shared/lib/router/utils/is-local-url' import { formatUrl } from '../shared/lib/router/utils/format-url' +import { isAbsoluteUrl } from '../shared/lib/utils' import { addLocale } from './add-locale' import { RouterContext } from '../shared/lib/router-context' import { @@ -679,8 +680,11 @@ const Link = React.forwardRef( } // If child is an tag and doesn't have a href attribute, or if the 'passHref' property is - // defined, we specify the current 'href', so that repetition is not needed by the user - if ( + // defined, we specify the current 'href', so that repetition is not needed by the user. + // If the url is absolute, we can bypass the logic to prepend the domain and locale. + if (isAbsoluteUrl(as)) { + childProps.href = as + } else if ( !legacyBehavior || passHref || (child.type === 'a' && !('href' in child.props)) diff --git a/packages/next/src/compiled/@edge-runtime/cookies/index.d.ts b/packages/next/src/compiled/@edge-runtime/cookies/index.d.ts new file mode 100644 index 0000000000000..83d789616bbf0 --- /dev/null +++ b/packages/next/src/compiled/@edge-runtime/cookies/index.d.ts @@ -0,0 +1,187 @@ +// Type definitions for cookie 0.5 +// Project: https://github.com/jshttp/cookie +// Definitions by: Pine Mizune +// Piotr Błażejewicz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Basic HTTP cookie parser and serializer for HTTP servers. + */ + +/** + * Additional serialization options + */ +interface CookieSerializeOptions { + /** + * Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.3|Domain Set-Cookie attribute}. By default, no + * domain is set, and most clients will consider the cookie to apply to only + * the current domain. + */ + domain?: string | undefined; + + /** + * Specifies a function that will be used to encode a cookie's value. Since + * value of a cookie has a limited character set (and must be a simple + * string), this function can be used to encode a value into a string suited + * for a cookie's value. + * + * The default function is the global `encodeURIComponent`, which will + * encode a JavaScript string into UTF-8 byte sequences and then URL-encode + * any that fall outside of the cookie range. + */ + encode?(value: string): string; + + /** + * Specifies the `Date` object to be the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.1|`Expires` `Set-Cookie` attribute}. By default, + * no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete + * it on a condition like exiting a web browser application. + * + * *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification} + * states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is + * possible not all clients by obey this, so if both are set, they should + * point to the same date and time. + */ + expires?: Date | undefined; + /** + * Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.6|`HttpOnly` `Set-Cookie` attribute}. + * When truthy, the `HttpOnly` attribute is set, otherwise it is not. By + * default, the `HttpOnly` attribute is not set. + * + * *Note* be careful when setting this to true, as compliant clients will + * not allow client-side JavaScript to see the cookie in `document.cookie`. + */ + httpOnly?: boolean | undefined; + /** + * Specifies the number (in seconds) to be the value for the `Max-Age` + * `Set-Cookie` attribute. The given number will be converted to an integer + * by rounding down. By default, no maximum age is set. + * + * *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification} + * states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is + * possible not all clients by obey this, so if both are set, they should + * point to the same date and time. + */ + maxAge?: number | undefined; + /** + * Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}. + * By default, the path is considered the "default path". + */ + path?: string | undefined; + /** + * Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1]. + * + * - `'low'` will set the `Priority` attribute to `Low`. + * - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set. + * - `'high'` will set the `Priority` attribute to `High`. + * + * More information about the different priority levels can be found in + * [the specification][rfc-west-cookie-priority-00-4.1]. + * + * **note** This is an attribute that has not yet been fully standardized, and may change in the future. + * This also means many clients may ignore this attribute until they understand it. + */ + priority?: 'low' | 'medium' | 'high' | undefined; + /** + * Specifies the boolean or string to be the value for the {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|`SameSite` `Set-Cookie` attribute}. + * + * - `true` will set the `SameSite` attribute to `Strict` for strict same + * site enforcement. + * - `false` will not set the `SameSite` attribute. + * - `'lax'` will set the `SameSite` attribute to Lax for lax same site + * enforcement. + * - `'strict'` will set the `SameSite` attribute to Strict for strict same + * site enforcement. + * - `'none'` will set the SameSite attribute to None for an explicit + * cross-site cookie. + * + * More information about the different enforcement levels can be found in {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|the specification}. + * + * *note* This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it. + */ + sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined; + /** + * Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.5|`Secure` `Set-Cookie` attribute}. When truthy, the + * `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. + * + * *Note* be careful when setting this to `true`, as compliant clients will + * not send the cookie back to the server in the future if the browser does + * not have an HTTPS connection. + */ + secure?: boolean | undefined; +} + +/** + * {@link https://wicg.github.io/cookie-store/#dictdef-cookielistitem CookieListItem} + * as specified by W3C. + */ +interface CookieListItem extends Pick { + /** A string with the name of a cookie. */ + name: string; + /** A string containing the value of the cookie. */ + value: string; +} +/** + * Superset of {@link CookieListItem} extending it with + * the `httpOnly`, `maxAge` and `priority` properties. + */ +type ResponseCookie = CookieListItem & Pick; +/** + * Subset of {@link CookieListItem}, only containing `name` and `value` + * since other cookie attributes aren't be available on a `Request`. + */ +type RequestCookie = Pick; + +/** + * A class for manipulating {@link Request} cookies (`Cookie` header). + */ +declare class RequestCookies { + constructor(requestHeaders: Headers); + [Symbol.iterator](): IterableIterator<[string, RequestCookie]>; + /** + * The amount of cookies received from the client + */ + get size(): number; + get(...args: [name: string] | [RequestCookie]): RequestCookie | undefined; + getAll(...args: [name: string] | [RequestCookie] | []): RequestCookie[]; + has(name: string): boolean; + set(...args: [key: string, value: string] | [options: RequestCookie]): this; + /** + * Delete the cookies matching the passed name or names in the request. + */ + delete( + /** Name or names of the cookies to be deleted */ + names: string | string[]): boolean | boolean[]; + /** + * Delete all the cookies in the cookies in the request. + */ + clear(): this; + toString(): string; +} + +/** + * A class for manipulating {@link Response} cookies (`Set-Cookie` header). + * Loose implementation of the experimental [Cookie Store API](https://wicg.github.io/cookie-store/#dictdef-cookie) + * The main difference is `ResponseCookies` methods do not return a Promise. + */ +declare class ResponseCookies { + constructor(responseHeaders: Headers); + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. + */ + get(...args: [key: string] | [options: ResponseCookie]): ResponseCookie | undefined; + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. + */ + getAll(...args: [key: string] | [options: ResponseCookie] | []): ResponseCookie[]; + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. + */ + set(...args: [key: string, value: string, cookie?: Partial] | [options: ResponseCookie]): this; + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. + */ + delete(...args: [key: string] | [options: ResponseCookie]): this; + toString(): string; +} + +export { CookieListItem, RequestCookie, RequestCookies, ResponseCookie, ResponseCookies }; diff --git a/packages/next/src/compiled/@edge-runtime/cookies/index.js b/packages/next/src/compiled/@edge-runtime/cookies/index.js new file mode 100644 index 0000000000000..8e4c19c8e605c --- /dev/null +++ b/packages/next/src/compiled/@edge-runtime/cookies/index.js @@ -0,0 +1,273 @@ +"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); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + RequestCookies: () => RequestCookies, + ResponseCookies: () => ResponseCookies +}); +module.exports = __toCommonJS(src_exports); + +// src/serialize.ts +function serialize(c) { + const attrs = [ + "path" in c && c.path && `Path=${c.path}`, + "expires" in c && c.expires && `Expires=${c.expires.toUTCString()}`, + "maxAge" in c && c.maxAge && `Max-Age=${c.maxAge}`, + "domain" in c && c.domain && `Domain=${c.domain}`, + "secure" in c && c.secure && "Secure", + "httpOnly" in c && c.httpOnly && "HttpOnly", + "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}` + ].filter(Boolean); + return `${c.name}=${encodeURIComponent(c.value ?? "")}; ${attrs.join("; ")}`; +} +function parseCookieString(cookie) { + const map = /* @__PURE__ */ new Map(); + for (const pair of cookie.split(/; */)) { + if (!pair) + continue; + const splitAt = pair.indexOf("="); + const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)]; + try { + map.set(key, decodeURIComponent(value ?? "true")); + } catch { + } + } + return map; +} +function parseSetCookieString(setCookie) { + if (!setCookie) { + return void 0; + } + const [[name, value], ...attributes] = parseCookieString(setCookie); + const { domain, expires, httponly, maxage, path, samesite, secure } = Object.fromEntries( + attributes.map(([key, value2]) => [key.toLowerCase(), value2]) + ); + const cookie = { + name, + value: decodeURIComponent(value), + domain, + ...expires && { expires: new Date(expires) }, + ...httponly && { httpOnly: true }, + ...typeof maxage === "string" && { maxAge: Number(maxage) }, + path, + ...samesite && { sameSite: parseSameSite(samesite) }, + ...secure && { secure: true } + }; + return compact(cookie); +} +function compact(t) { + const newT = {}; + for (const key in t) { + if (t[key]) { + newT[key] = t[key]; + } + } + return newT; +} +var SAME_SITE = ["strict", "lax", "none"]; +function parseSameSite(string) { + string = string.toLowerCase(); + return SAME_SITE.includes(string) ? string : void 0; +} + +// src/request-cookies.ts +var RequestCookies = class { + constructor(requestHeaders) { + this._parsed = /* @__PURE__ */ new Map(); + this._headers = requestHeaders; + const header = requestHeaders.get("cookie"); + if (header) { + const parsed = parseCookieString(header); + for (const [name, value] of parsed) { + this._parsed.set(name, { name, value }); + } + } + } + [Symbol.iterator]() { + return this._parsed[Symbol.iterator](); + } + get size() { + return this._parsed.size; + } + get(...args) { + const name = typeof args[0] === "string" ? args[0] : args[0].name; + return this._parsed.get(name); + } + getAll(...args) { + var _a; + const all = Array.from(this._parsed); + if (!args.length) { + return all.map(([_, value]) => value); + } + const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; + return all.filter(([n]) => n === name).map(([_, value]) => value); + } + has(name) { + return this._parsed.has(name); + } + set(...args) { + const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args; + const map = this._parsed; + map.set(name, { name, value }); + this._headers.set( + "cookie", + Array.from(map).map(([_, value2]) => serialize(value2)).join("; ") + ); + return this; + } + delete(names) { + const map = this._parsed; + const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name)); + this._headers.set( + "cookie", + Array.from(map).map(([_, value]) => serialize(value)).join("; ") + ); + return result; + } + clear() { + this.delete(Array.from(this._parsed.keys())); + return this; + } + [Symbol.for("edge-runtime.inspect.custom")]() { + return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; + } + toString() { + return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; "); + } +}; + +// src/response-cookies.ts +var ResponseCookies = class { + constructor(responseHeaders) { + this._parsed = /* @__PURE__ */ new Map(); + var _a; + this._headers = responseHeaders; + const setCookie = ((_a = responseHeaders.getAll) == null ? void 0 : _a.call(responseHeaders, "set-cookie")) ?? responseHeaders.get("set-cookie") ?? []; + const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); + for (const cookieString of cookieStrings) { + const parsed = parseSetCookieString(cookieString); + if (parsed) + this._parsed.set(parsed.name, parsed); + } + } + get(...args) { + const key = typeof args[0] === "string" ? args[0] : args[0].name; + return this._parsed.get(key); + } + getAll(...args) { + var _a; + const all = Array.from(this._parsed.values()); + if (!args.length) { + return all; + } + const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; + return all.filter((c) => c.name === key); + } + set(...args) { + const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args; + const map = this._parsed; + map.set(name, normalizeCookie({ name, value, ...cookie })); + replace(map, this._headers); + return this; + } + delete(...args) { + const name = typeof args[0] === "string" ? args[0] : args[0].name; + return this.set({ name, value: "", expires: new Date(0) }); + } + [Symbol.for("edge-runtime.inspect.custom")]() { + return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; + } + toString() { + return [...this._parsed.values()].map(serialize).join("; "); + } +}; +function replace(bag, headers) { + headers.delete("set-cookie"); + for (const [, value] of bag) { + const serialized = serialize(value); + headers.append("set-cookie", serialized); + } +} +function normalizeCookie(cookie = { name: "", value: "" }) { + if (cookie.maxAge) { + cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); + } + if (cookie.path === null || cookie.path === void 0) { + cookie.path = "/"; + } + return cookie; +} +function splitCookiesString(cookiesString) { + if (!cookiesString) + return []; + var cookiesStrings = []; + var pos = 0; + var start; + var ch; + var lastComma; + var nextStart; + var cookiesSeparatorFound; + function skipWhitespace() { + while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { + pos += 1; + } + return pos < cookiesString.length; + } + function notSpecialChar() { + ch = cookiesString.charAt(pos); + return ch !== "=" && ch !== ";" && ch !== ","; + } + while (pos < cookiesString.length) { + start = pos; + cookiesSeparatorFound = false; + while (skipWhitespace()) { + ch = cookiesString.charAt(pos); + if (ch === ",") { + lastComma = pos; + pos += 1; + skipWhitespace(); + nextStart = pos; + while (pos < cookiesString.length && notSpecialChar()) { + pos += 1; + } + if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { + cookiesSeparatorFound = true; + pos = nextStart; + cookiesStrings.push(cookiesString.substring(start, lastComma)); + start = pos; + } else { + pos = lastComma + 1; + } + } else { + pos += 1; + } + } + if (!cookiesSeparatorFound || pos >= cookiesString.length) { + cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); + } + } + return cookiesStrings; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + RequestCookies, + ResponseCookies +}); diff --git a/packages/next/src/compiled/@edge-runtime/cookies/package.json b/packages/next/src/compiled/@edge-runtime/cookies/package.json new file mode 100644 index 0000000000000..25e4aa546028f --- /dev/null +++ b/packages/next/src/compiled/@edge-runtime/cookies/package.json @@ -0,0 +1 @@ +{"name":"@edge-runtime/cookies","version":"3.0.4","main":"./index.js","license":"MPLv2"} diff --git a/packages/next/src/compiled/@edge-runtime/primitives/console.js b/packages/next/src/compiled/@edge-runtime/primitives/console.js index 7d3b69419a9c4..3779408687ab0 100644 --- a/packages/next/src/compiled/@edge-runtime/primitives/console.js +++ b/packages/next/src/compiled/@edge-runtime/primitives/console.js @@ -138,7 +138,7 @@ var require_dist = __commonJS({ const [firstArg] = args; if (!kind(firstArg, "string")) { if (hasCustomSymbol(firstArg, customInspectSymbol)) { - return format2(firstArg[customInspectSymbol]()); + return format2(firstArg[customInspectSymbol]({ format: format2 })); } else { return args.map((item) => inspect(item, { customInspectSymbol })).join(" "); } @@ -153,7 +153,7 @@ var require_dist = __commonJS({ case "%s": { const arg = args[index++]; if (hasCustomSymbol(arg, customInspectSymbol)) { - return format2(arg[customInspectSymbol]()); + return format2(arg[customInspectSymbol]({ format: format2 })); } else if (isDate(arg) || isError(arg) || kind(arg, "bigint")) { return format2(arg); } else { @@ -204,7 +204,7 @@ var require_dist = __commonJS({ __name(format2, "format"); function formatValue(ctx, value, recurseTimes) { if (hasCustomSymbol(value, customInspectSymbol)) { - return format2(value[customInspectSymbol]()); + return format2(value[customInspectSymbol]({ format: format2 })); } const formattedPrimitive = formatPrimitive(value); if (formattedPrimitive !== void 0) { @@ -310,7 +310,7 @@ var require_dist = __commonJS({ } base = " " + base; } else if (hasCustomSymbol(value, ctx.customInspectSymbol)) { - base = format2(value[ctx.customInspectSymbol]()); + base = format2(value[ctx.customInspectSymbol]({ format: format2 })); if (keys.length === 0) { return base; } diff --git a/packages/next/src/compiled/@edge-runtime/primitives/crypto.js b/packages/next/src/compiled/@edge-runtime/primitives/crypto.js index f69bddd9080ad..ffb92631a6a9e 100644 --- a/packages/next/src/compiled/@edge-runtime/primitives/crypto.js +++ b/packages/next/src/compiled/@edge-runtime/primitives/crypto.js @@ -36,9 +36,9 @@ var init_define_process = __esm({ } }); -// ../../node_modules/.pnpm/tslib@2.4.0/node_modules/tslib/tslib.js +// ../../node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.js var require_tslib = __commonJS({ - "../../node_modules/.pnpm/tslib@2.4.0/node_modules/tslib/tslib.js"(exports, module2) { + "../../node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.js"(exports, module2) { init_define_process(); var __extends2; var __assign2; @@ -196,7 +196,7 @@ var require_tslib = __commonJS({ function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) + 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; @@ -505,7 +505,7 @@ __export(crypto_exports, { module.exports = __toCommonJS(crypto_exports); init_define_process(); -// ../../node_modules/.pnpm/@peculiar+webcrypto@1.4.0/node_modules/@peculiar/webcrypto/build/webcrypto.es.js +// ../../node_modules/.pnpm/@peculiar+webcrypto@1.4.1/node_modules/@peculiar/webcrypto/build/webcrypto.es.js init_define_process(); // ../../node_modules/.pnpm/webcrypto-core@1.7.5/node_modules/webcrypto-core/build/webcrypto-core.es.js @@ -4783,7 +4783,7 @@ var AsnConvert = class { }; __name(AsnConvert, "AsnConvert"); -// ../../node_modules/.pnpm/tslib@2.4.0/node_modules/tslib/modules/index.js +// ../../node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/modules/index.js init_define_process(); var import_tslib = __toESM(require_tslib(), 1); var { @@ -6697,7 +6697,7 @@ var SubtleCrypto = class { }; __name(SubtleCrypto, "SubtleCrypto"); -// ../../node_modules/.pnpm/@peculiar+webcrypto@1.4.0/node_modules/@peculiar/webcrypto/build/webcrypto.es.js +// ../../node_modules/.pnpm/@peculiar+webcrypto@1.4.1/node_modules/@peculiar/webcrypto/build/webcrypto.es.js var crypto = __toESM(require("crypto")); var import_crypto = __toESM(require("crypto")); var process = __toESM(require("process")); @@ -8298,6 +8298,9 @@ ${key.data.toString("base64")} ecdh.setPrivateKey(Buffer.from(asnEcPrivateKey.privateKey)); const asnPublicKey = AsnParser.parse(algorithm.public.data, index$1.PublicKeyInfo); const bits = ecdh.computeSecret(Buffer.from(asnPublicKey.publicKey)); + if (length === null) { + return bits; + } return new Uint8Array(bits).buffer.slice(0, length >> 3); } static async exportKey(format, key) { diff --git a/packages/next/src/compiled/@edge-runtime/primitives/events.d.ts b/packages/next/src/compiled/@edge-runtime/primitives/events.d.ts index 8f1ae70a22cce..0007fe9b4697e 100644 --- a/packages/next/src/compiled/@edge-runtime/primitives/events.d.ts +++ b/packages/next/src/compiled/@edge-runtime/primitives/events.d.ts @@ -315,8 +315,12 @@ declare const EventConstructor: typeof Event declare class FetchEvent { + request: Request + response: Response | null awaiting: Set> constructor(request: Request) + respondWith(response: Response | Promise): void + waitUntil(promise: Promise): void } export { EventConstructor as Event, EventTargetConstructor as EventTarget, FetchEvent, EventTarget as PromiseRejectionEvent }; diff --git a/packages/next/src/compiled/@edge-runtime/primitives/fetch.d.ts b/packages/next/src/compiled/@edge-runtime/primitives/fetch.d.ts index 36f11f031d1c2..20446deef6316 100644 --- a/packages/next/src/compiled/@edge-runtime/primitives/fetch.d.ts +++ b/packages/next/src/compiled/@edge-runtime/primitives/fetch.d.ts @@ -1,5 +1,5 @@ declare class Headers extends globalThis.Headers { - getAll(key: 'set-cookie'): string[] + getAll?(key: 'set-cookie'): string[] } declare class Request extends globalThis.Request { @@ -8,10 +8,17 @@ declare class Request extends globalThis.Request { declare class Response extends globalThis.Response { readonly headers: Headers + static json(data: any, init?: ResponseInit): Response } -declare const fetchImplementation: typeof fetch +type RequestInfo = Parameters[0] +type RequestInit = Parameters[1] +declare const fetchImplementation: ( + info: RequestInfo, + init?: RequestInit +) => Promise + declare const FileConstructor: typeof File declare const FormDataConstructor: typeof FormData -export { FileConstructor as File, FormDataConstructor as FormData, Headers, Request, Response, fetchImplementation as fetch }; +export { FileConstructor as File, FormDataConstructor as FormData, Headers, Request, RequestInfo, RequestInit, Response, fetchImplementation as fetch }; diff --git a/packages/next/src/compiled/@edge-runtime/primitives/package.json b/packages/next/src/compiled/@edge-runtime/primitives/package.json index c3cc587458828..38fff34e5e11b 100644 --- a/packages/next/src/compiled/@edge-runtime/primitives/package.json +++ b/packages/next/src/compiled/@edge-runtime/primitives/package.json @@ -1 +1 @@ -{"name":"@edge-runtime/primitives","version":"2.0.0","main":"./index.js","license":"MPLv2"} +{"name":"@edge-runtime/primitives","version":"2.0.5","main":"./index.js","license":"MPLv2"} diff --git a/packages/next/src/compiled/@edge-runtime/primitives/url.js b/packages/next/src/compiled/@edge-runtime/primitives/url.js index 19c6102fc3f01..5cebb80928b70 100644 --- a/packages/next/src/compiled/@edge-runtime/primitives/url.js +++ b/packages/next/src/compiled/@edge-runtime/primitives/url.js @@ -395,9 +395,9 @@ var require_lib = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/utils.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/utils.js var require_utils = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/utils.js"(exports, module2) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/utils.js"(exports, module2) { "use strict"; init_define_process(); function isObject(value) { @@ -888,9 +888,9 @@ var require_tr46 = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/infra.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/infra.js var require_infra = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/infra.js"(exports, module2) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/infra.js"(exports, module2) { "use strict"; init_define_process(); function isASCIIDigit(c) { @@ -918,9 +918,9 @@ var require_infra = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/encoding.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/encoding.js var require_encoding = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/encoding.js"(exports, module2) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/encoding.js"(exports, module2) { "use strict"; init_define_process(); var utf8Encoder = new TextEncoder(); @@ -940,9 +940,9 @@ var require_encoding = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/percent-encoding.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/percent-encoding.js var require_percent_encoding = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/percent-encoding.js"(exports, module2) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/percent-encoding.js"(exports, module2) { "use strict"; init_define_process(); var { isASCIIHex } = require_infra(); @@ -1065,9 +1065,9 @@ var require_percent_encoding = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/url-state-machine.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/url-state-machine.js var require_url_state_machine = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/url-state-machine.js"(exports, module2) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/url-state-machine.js"(exports, module2) { "use strict"; init_define_process(); var tr46 = require_tr46(); @@ -1128,13 +1128,13 @@ var require_url_state_machine = __commonJS({ } __name(isNormalizedWindowsDriveLetterString, "isNormalizedWindowsDriveLetterString"); function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u) !== -1; + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u) !== -1; } __name(containsForbiddenHostCodePoint, "containsForbiddenHostCodePoint"); - function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u) !== -1; + function containsForbiddenDomainCodePoint(string) { + return containsForbiddenHostCodePoint(string) || string.search(/[\u0000-\u001F]|%|\u007F/u) !== -1; } - __name(containsForbiddenHostCodePointExcludingPercent, "containsForbiddenHostCodePointExcludingPercent"); + __name(containsForbiddenDomainCodePoint, "containsForbiddenDomainCodePoint"); function isSpecialScheme2(scheme) { return specialSchemes[scheme] !== void 0; } @@ -1372,7 +1372,7 @@ var require_url_state_machine = __commonJS({ if (asciiDomain === failure) { return failure; } - if (containsForbiddenHostCodePoint(asciiDomain)) { + if (containsForbiddenDomainCodePoint(asciiDomain)) { return failure; } if (endsInANumber(asciiDomain)) { @@ -1400,7 +1400,7 @@ var require_url_state_machine = __commonJS({ } __name(endsInANumber, "endsInANumber"); function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { + if (containsForbiddenHostCodePoint(input)) { return failure; } return utf8PercentEncodeString(input, isC0ControlPercentEncode); @@ -1480,7 +1480,7 @@ var require_url_state_machine = __commonJS({ } __name(includesCredentials, "includesCredentials"); function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || hasAnOpaquePath(url) || url.scheme === "file"; + return url.host === null || url.host === "" || url.scheme === "file"; } __name(cannotHaveAUsernamePasswordPort, "cannotHaveAUsernamePasswordPort"); function hasAnOpaquePath(url) { @@ -2124,9 +2124,9 @@ var require_url_state_machine = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/urlencoded.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/urlencoded.js var require_urlencoded = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/urlencoded.js"(exports, module2) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/urlencoded.js"(exports, module2) { "use strict"; init_define_process(); var { utf8Encode, utf8DecodeWithoutBOM } = require_encoding(); @@ -2220,9 +2220,9 @@ var require_urlencoded = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/Function.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/Function.js var require_Function = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/Function.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/Function.js"(exports) { "use strict"; init_define_process(); var conversions = require_lib(); @@ -2257,9 +2257,9 @@ var require_Function = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URLSearchParams-impl.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URLSearchParams-impl.js var require_URLSearchParams_impl = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URLSearchParams-impl.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URLSearchParams-impl.js"(exports) { "use strict"; init_define_process(); var urlencoded = require_urlencoded(); @@ -2289,11 +2289,14 @@ var require_URLSearchParams_impl = __commonJS({ } _updateSteps() { if (this._url !== null) { - let query = urlencoded.serializeUrlencoded(this._list); - if (query === "") { - query = null; + let serializedQuery = urlencoded.serializeUrlencoded(this._list); + if (serializedQuery === "") { + serializedQuery = null; + } + this._url._url.query = serializedQuery; + if (serializedQuery === null) { + this._url._potentiallyStripTrailingSpacesFromAnOpaquePath(); } - this._url._url.query = query; } } append(name, value) { @@ -2379,9 +2382,9 @@ var require_URLSearchParams_impl = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URLSearchParams.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URLSearchParams.js var require_URLSearchParams = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URLSearchParams.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URLSearchParams.js"(exports) { "use strict"; init_define_process(); var conversions = require_lib(); @@ -2803,9 +2806,9 @@ var require_URLSearchParams = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URL-impl.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URL-impl.js var require_URL_impl = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URL-impl.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URL-impl.js"(exports) { "use strict"; init_define_process(); var usm = require_url_state_machine(); @@ -2938,6 +2941,7 @@ var require_URL_impl = __commonJS({ if (v === "") { url.query = null; this._query._list = []; + this._potentiallyStripTrailingSpacesFromAnOpaquePath(); return; } const input = v[0] === "?" ? v.substring(1) : v; @@ -2957,6 +2961,7 @@ var require_URL_impl = __commonJS({ set hash(v) { if (v === "") { this._url.fragment = null; + this._potentiallyStripTrailingSpacesFromAnOpaquePath(); return; } const input = v[0] === "#" ? v.substring(1) : v; @@ -2966,13 +2971,25 @@ var require_URL_impl = __commonJS({ toJSON() { return this.href; } + _potentiallyStripTrailingSpacesFromAnOpaquePath() { + if (!usm.hasAnOpaquePath(this._url)) { + return; + } + if (this._url.fragment !== null) { + return; + } + if (this._url.query !== null) { + return; + } + this._url.path = this._url.path.replace(/\u0020+$/u, ""); + } }, "URLImpl"); } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URL.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URL.js var require_URL = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/lib/URL.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/lib/URL.js"(exports) { "use strict"; init_define_process(); var conversions = require_lib(); @@ -3320,9 +3337,9 @@ var require_URL = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/webidl2js-wrapper.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/webidl2js-wrapper.js var require_webidl2js_wrapper = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/webidl2js-wrapper.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/webidl2js-wrapper.js"(exports) { "use strict"; init_define_process(); var URL3 = require_URL(); @@ -3332,9 +3349,9 @@ var require_webidl2js_wrapper = __commonJS({ } }); -// ../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/index.js +// ../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/index.js var require_whatwg_url = __commonJS({ - "../../node_modules/.pnpm/whatwg-url@11.0.0/node_modules/whatwg-url/index.js"(exports) { + "../../node_modules/.pnpm/whatwg-url@12.0.0/node_modules/whatwg-url/index.js"(exports) { "use strict"; init_define_process(); var { URL: URL3, URLSearchParams: URLSearchParams2 } = require_webidl2js_wrapper(); @@ -3372,10 +3389,10 @@ module.exports = __toCommonJS(url_exports); init_define_process(); var import_whatwg_url = __toESM(require_whatwg_url()); -// ../../node_modules/.pnpm/urlpattern-polyfill@6.0.1/node_modules/urlpattern-polyfill/index.js +// ../../node_modules/.pnpm/urlpattern-polyfill@6.0.2/node_modules/urlpattern-polyfill/index.js init_define_process(); -// ../../node_modules/.pnpm/urlpattern-polyfill@6.0.1/node_modules/urlpattern-polyfill/dist/urlpattern.js +// ../../node_modules/.pnpm/urlpattern-polyfill@6.0.2/node_modules/urlpattern-polyfill/dist/urlpattern.js init_define_process(); var regexIdentifierStart = /[$_\p{ID_Start}]/u; var regexIdentifierPart = /[$_\u200C\u200D\p{ID_Continue}]/u; @@ -3844,7 +3861,10 @@ function canonicalizePathname(pathname, protocol, isPattern) { return url.pathname; } const leadingSlash = pathname[0] == "/"; - pathname = new URL(!leadingSlash ? "/-" + pathname : pathname, "https://example.com").pathname; + pathname = new URL( + !leadingSlash ? "/-" + pathname : pathname, + "https://example.com" + ).pathname; if (!leadingSlash) { pathname = pathname.substring(2, pathname.length); } @@ -4272,19 +4292,26 @@ function extractValues(url, baseURL) { }; } __name(extractValues, "extractValues"); +function processBaseURLString(input, isPattern) { + if (!isPattern) { + return input; + } + return escapePatternString(input); +} +__name(processBaseURLString, "processBaseURLString"); function applyInit(o, init, isPattern) { let baseURL; if (typeof init.baseURL === "string") { try { baseURL = new URL(init.baseURL); - o.protocol = baseURL.protocol ? baseURL.protocol.substring(0, baseURL.protocol.length - 1) : ""; - o.username = baseURL.username; - o.password = baseURL.password; - o.hostname = baseURL.hostname; - o.port = baseURL.port; - o.pathname = baseURL.pathname; - o.search = baseURL.search ? baseURL.search.substring(1, baseURL.search.length) : ""; - o.hash = baseURL.hash ? baseURL.hash.substring(1, baseURL.hash.length) : ""; + o.protocol = processBaseURLString(baseURL.protocol.substring(0, baseURL.protocol.length - 1), isPattern); + o.username = processBaseURLString(baseURL.username, isPattern); + o.password = processBaseURLString(baseURL.password, isPattern); + o.hostname = processBaseURLString(baseURL.hostname, isPattern); + o.port = processBaseURLString(baseURL.port, isPattern); + o.pathname = processBaseURLString(baseURL.pathname, isPattern); + o.search = processBaseURLString(baseURL.search.substring(1, baseURL.search.length), isPattern); + o.hash = processBaseURLString(baseURL.hash.substring(1, baseURL.hash.length), isPattern); } catch { throw new TypeError(`invalid baseURL '${init.baseURL}'.`); } @@ -4309,7 +4336,7 @@ function applyInit(o, init, isPattern) { if (baseURL && !isAbsolutePathname(o.pathname, isPattern)) { const slashIndex = baseURL.pathname.lastIndexOf("/"); if (slashIndex >= 0) { - o.pathname = baseURL.pathname.substring(0, slashIndex + 1) + o.pathname; + o.pathname = processBaseURLString(baseURL.pathname.substring(0, slashIndex + 1), isPattern) + o.pathname; } } o.pathname = canonicalizePathname(o.pathname, o.protocol, isPattern); @@ -4621,7 +4648,7 @@ var URLPattern = /* @__PURE__ */ __name(class { } }, "URLPattern"); -// ../../node_modules/.pnpm/urlpattern-polyfill@6.0.1/node_modules/urlpattern-polyfill/index.js +// ../../node_modules/.pnpm/urlpattern-polyfill@6.0.2/node_modules/urlpattern-polyfill/index.js if (!globalThis.URLPattern) { globalThis.URLPattern = URLPattern; } diff --git a/packages/next/src/compiled/@opentelemetry/api/LICENSE b/packages/next/src/compiled/@opentelemetry/api/LICENSE new file mode 100644 index 0000000000000..261eeb9e9f8b2 --- /dev/null +++ b/packages/next/src/compiled/@opentelemetry/api/LICENSE @@ -0,0 +1,201 @@ + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/next/src/compiled/@opentelemetry/api/index.js b/packages/next/src/compiled/@opentelemetry/api/index.js new file mode 100644 index 0000000000000..ad40c24a1ec83 --- /dev/null +++ b/packages/next/src/compiled/@opentelemetry/api/index.js @@ -0,0 +1 @@ +(()=>{"use strict";var e={959:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const n=r(190);const a=r(83);const o=r(669);const i="context";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},669:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const n=r(908);const a=r(802);const o=r(963);const i=r(83);const c="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const u=(0,i.getGlobal)("diag");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:"";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},680:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const n=r(429);const a=r(83);const o=r(669);const i="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},425:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const n=r(83);const a=r(528);const o=r(675);const i=r(409);const c=r(957);const s=r(669);const u="propagation";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},463:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const n=r(83);const a=r(743);const o=r(566);const i=r(54);const c=r(669);const s="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},409:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(959);const a=r(12);const o=(0,a.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},37:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},714:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},957:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(669);const a=r(37);const o=r(714);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},493:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const n=r(959);t.context=n.ContextAPI.getInstance()},190:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const n=r(12);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},12:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},305:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const n=r(669);t.diag=n.DiagAPI.instance()},908:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const n=r(83);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)("diag");if(!a){return}r.unshift(t);return a[e](...r)}},479:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(963);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a==="function"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc("error",n.DiagLogLevel.ERROR),warn:_filterFunc("warn",n.DiagLogLevel.WARN),info:_filterFunc("info",n.DiagLogLevel.INFO),debug:_filterFunc("debug",n.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},963:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},83:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(287);const a=r(236);const o=r(381);const i=a.VERSION.split(".")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const e=new Error("@opentelemetry/api: All API registration versions must match");r.error(e.stack||e.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},381:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(236);const a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},39:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const n=r(680);t.metrics=n.MetricsAPI.getInstance()},770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},745:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},429:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(745);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},287:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(951),t)},542:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},951:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});a(r(542),t)},282:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const n=r(425);t.propagation=n.PropagationAPI.getInstance()},528:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},675:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},873:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const n=r(463);t.trace=n.TraceAPI.getInstance()},115:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const n=r(212);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},796:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const n=r(959);const a=r(54);const o=r(115);const i=r(566);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},69:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const n=r(796);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},889:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const n=r(796);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},743:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const n=r(889);const a=r(69);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},54:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(12);const a=r(115);const o=r(959);const i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},79:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const n=r(825);const a=32;const o=512;const i=",";const c="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},825:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},339:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const n=r(79);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},212:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(785);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},155:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},566:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(212);const a=r(115);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},645:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},785:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},236:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.4.0"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(957);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(12);Object.defineProperty(e,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(479);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(963);Object.defineProperty(e,"DiagLogLevel",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(745);Object.defineProperty(e,"createNoopMeter",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(770);Object.defineProperty(e,"ValueType",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(675);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,"defaultTextMapSetter",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(889);Object.defineProperty(e,"ProxyTracer",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(743);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(847);Object.defineProperty(e,"SamplingDecision",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(155);Object.defineProperty(e,"SpanKind",{enumerable:true,get:function(){return p.SpanKind}});var _=__nccwpck_require__(645);Object.defineProperty(e,"SpanStatusCode",{enumerable:true,get:function(){return _.SpanStatusCode}});var d=__nccwpck_require__(785);Object.defineProperty(e,"TraceFlags",{enumerable:true,get:function(){return d.TraceFlags}});var f=__nccwpck_require__(339);Object.defineProperty(e,"createTraceState",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(566);Object.defineProperty(e,"isSpanContextValid",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,"isValidTraceId",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,"isValidSpanId",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(212);Object.defineProperty(e,"INVALID_SPANID",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,"INVALID_TRACEID",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(493);Object.defineProperty(e,"context",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(305);Object.defineProperty(e,"diag",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(39);Object.defineProperty(e,"metrics",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(282);Object.defineProperty(e,"propagation",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(873);Object.defineProperty(e,"trace",{enumerable:true,get:function(){return C.trace}});e["default"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})(); \ No newline at end of file diff --git a/packages/next/src/compiled/@opentelemetry/api/package.json b/packages/next/src/compiled/@opentelemetry/api/package.json new file mode 100644 index 0000000000000..8d1e180d1a87a --- /dev/null +++ b/packages/next/src/compiled/@opentelemetry/api/package.json @@ -0,0 +1 @@ +{"name":"@opentelemetry/api","main":"index.js","author":"OpenTelemetry Authors","license":"Apache-2.0"} diff --git a/packages/next/src/compiled/@vercel/nft/index.js b/packages/next/src/compiled/@vercel/nft/index.js index 05c2b6daa9687..c95185aa3d22a 100644 --- a/packages/next/src/compiled/@vercel/nft/index.js +++ b/packages/next/src/compiled/@vercel/nft/index.js @@ -1,6 +1,6 @@ -(()=>{var __webpack_modules__={5841:(e,t,r)=>{"use strict";e.exports=t;t.mockS3Http=r(9361).get_mockS3Http();t.mockS3Http("on");const s=t.mockS3Http("get");const a=r(7147);const o=r(1017);const u=r(1758);const c=r(9544);c.disableProgress();const f=r(5977);const d=r(2361).EventEmitter;const p=r(3837).inherits;const h=["clean","install","reinstall","build","rebuild","package","testpackage","publish","unpublish","info","testbinary","reveal","configure"];const v={};c.heading="node-pre-gyp";if(s){c.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`)}Object.defineProperty(t,"find",{get:function(){return r(5921).find},enumerable:true});function Run({package_json_path:e="./package.json",argv:t}){this.package_json_path=e;this.commands={};const r=this;h.forEach((e=>{r.commands[e]=function(t,s){c.verbose("command",e,t);return require("./"+e)(r,t,s)}}));this.parseArgv(t);this.binaryHostSet=false}p(Run,d);t.Run=Run;const D=Run.prototype;D.package=r(7399);D.configDefs={help:Boolean,arch:String,debug:Boolean,directory:String,proxy:String,loglevel:String};D.shorthands={release:"--no-debug",C:"--directory",debug:"--debug",j:"--jobs",silent:"--loglevel=silent",silly:"--loglevel=silly",verbose:"--loglevel=verbose"};D.aliases=v;D.parseArgv=function parseOpts(e){this.opts=u(this.configDefs,this.shorthands,e);this.argv=this.opts.argv.remain.slice();const t=this.todo=[];e=this.argv.map((e=>{if(e in this.aliases){e=this.aliases[e]}return e}));e.slice().forEach((r=>{if(r in this.commands){const s=e.splice(0,e.indexOf(r));e.shift();if(t.length>0){t[t.length-1].args=s}t.push({name:r,args:[]})}}));if(t.length>0){t[t.length-1].args=e.splice(0)}let r=this.package_json_path;if(this.opts.directory){r=o.join(this.opts.directory,r)}this.package_json=JSON.parse(a.readFileSync(r));this.todo=f.expand_commands(this.package_json,this.opts,t);const s="npm_config_";Object.keys(process.env).forEach((e=>{if(e.indexOf(s)!==0)return;const t=process.env[e];if(e===s+"loglevel"){c.level=t}else{e=e.substring(s.length);if(e==="argv"){if(this.opts.argv&&this.opts.argv.remain&&this.opts.argv.remain.length){}else{this.opts[e]=t}}else{this.opts[e]=t}}}));if(this.opts.loglevel){c.level=this.opts.loglevel}c.resume()};D.setBinaryHostProperty=function(e){if(this.binaryHostSet){return this.package_json.binary.host}const t=this.package_json;if(!t||!t.binary||t.binary.host){return""}if(!t.binary.staging_host||!t.binary.production_host){return""}let r="production_host";if(e==="publish"){r="staging_host"}const s=process.env.node_pre_gyp_s3_host;if(s==="staging"||s==="production"){r=`${s}_host`}else if(this.opts["s3_host"]==="staging"||this.opts["s3_host"]==="production"){r=`${this.opts["s3_host"]}_host`}else if(this.opts["s3_host"]||s){throw new Error(`invalid s3_host ${this.opts["s3_host"]||s}`)}t.binary.host=t.binary[r];this.binaryHostSet=true;return t.binary.host};D.usage=function usage(){const e=[""," Usage: node-pre-gyp [options]",""," where is one of:",h.map((e=>" - "+e+" - "+require("./"+e).usage)).join("\n"),"","node-pre-gyp@"+this.version+" "+o.resolve(__dirname,".."),"node@"+process.versions.node].join("\n");return e};Object.defineProperty(D,"version",{get:function(){return this.package.version},enumerable:true})},5921:(e,t,r)=>{"use strict";const s=r(5841);const a=r(2821);const o=r(5977);const u=r(7147).existsSync||r(1017).existsSync;const c=r(1017);e.exports=t;t.usage="Finds the require path for the node-pre-gyp installed module";t.validate=function(e,t){a.validate_config(e,t)};t.find=function(e,t){if(!u(e)){throw new Error(e+"does not exist")}const r=new s.Run({package_json_path:e,argv:process.argv});r.setBinaryHostProperty();const f=r.package_json;a.validate_config(f,t);let d;if(o.get_napi_build_versions(f,t)){d=o.get_best_napi_build_version(f,t)}t=t||{};if(!t.module_root)t.module_root=c.dirname(e);const p=a.evaluate(f,t,d);return p.module}},5977:(e,t,r)=>{"use strict";const s=r(7147);e.exports=t;const a=process.version.substr(1).replace(/-.*$/,"").split(".").map((e=>+e));const o=["build","clean","configure","package","publish","reveal","testbinary","testpackage","unpublish"];const u="napi_build_version=";e.exports.get_napi_version=function(){let e=process.versions.napi;if(!e){if(a[0]===9&&a[1]>=3)e=2;else if(a[0]===8)e=1}return e};e.exports.get_napi_version_as_string=function(t){const r=e.exports.get_napi_version(t);return r?""+r:""};e.exports.validate_package_json=function(t,r){const s=t.binary;const a=pathOK(s.module_path);const o=pathOK(s.remote_path);const u=pathOK(s.package_name);const c=e.exports.get_napi_build_versions(t,r,true);const f=e.exports.get_napi_build_versions_raw(t);if(c){c.forEach((e=>{if(!(parseInt(e,10)===e&&e>0)){throw new Error("All values specified in napi_versions must be positive integers.")}}))}if(c&&(!a||!o&&!u)){throw new Error("When napi_versions is specified; module_path and either remote_path or "+"package_name must contain the substitution string '{napi_build_version}`.")}if((a||o||u)&&!f){throw new Error("When the substitution string '{napi_build_version}` is specified in "+"module_path, remote_path, or package_name; napi_versions must also be specified.")}if(c&&!e.exports.get_best_napi_build_version(t,r)&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}if(f&&!c&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}};function pathOK(e){return e&&(e.indexOf("{napi_build_version}")!==-1||e.indexOf("{node_napi_label}")!==-1)}e.exports.expand_commands=function(t,r,s){const a=[];const c=e.exports.get_napi_build_versions(t,r);s.forEach((s=>{if(c&&s.name==="install"){const o=e.exports.get_best_napi_build_version(t,r);const c=o?[u+o]:[];a.push({name:s.name,args:c})}else if(c&&o.indexOf(s.name)!==-1){c.forEach((e=>{const t=s.args.slice();t.push(u+e);a.push({name:s.name,args:t})}))}else{a.push(s)}}));return a};e.exports.get_napi_build_versions=function(t,s,a){const o=r(9544);let u=[];const c=e.exports.get_napi_version(s?s.target:undefined);if(t.binary&&t.binary.napi_versions){t.binary.napi_versions.forEach((e=>{const t=u.indexOf(e)!==-1;if(!t&&c&&e<=c){u.push(e)}else if(a&&!t&&c){o.info("This Node instance does not support builds for Node-API version",e)}}))}if(s&&s["build-latest-napi-version-only"]){let e=0;u.forEach((t=>{if(t>e)e=t}));u=e?[e]:[]}return u.length?u:undefined};e.exports.get_napi_build_versions_raw=function(e){const t=[];if(e.binary&&e.binary.napi_versions){e.binary.napi_versions.forEach((e=>{if(t.indexOf(e)===-1){t.push(e)}}))}return t.length?t:undefined};e.exports.get_command_arg=function(e){return u+e};e.exports.get_napi_build_version_from_command_args=function(e){for(let t=0;t{if(e>s&&e<=t){s=e}}))}return s===0?undefined:s};e.exports.build_napi_only=function(e){return e.binary&&e.binary.package_name&&e.binary.package_name.indexOf("{node_napi_label}")===-1}},9361:(e,t,r)=>{"use strict";e.exports=t;const s=r(7310);const a=r(7147);const o=r(1017);e.exports.detect=function(e,t){const r=e.hosted_path;const a=s.parse(r);t.prefix=!a.pathname||a.pathname==="/"?"":a.pathname.replace("/","");if(e.bucket&&e.region){t.bucket=e.bucket;t.region=e.region;t.endpoint=e.host;t.s3ForcePathStyle=e.s3ForcePathStyle}else{const e=a.hostname.split(".s3");const r=e[0];if(!r){return}if(!t.bucket){t.bucket=r}if(!t.region){const r=e[1].slice(1).split(".")[0];if(r==="amazonaws"){t.region="us-east-1"}else{t.region=r}}}};e.exports.get_s3=function(e){if(process.env.node_pre_gyp_mock_s3){const e=r(3930);const t=r(2037);e.config.basePath=`${t.tmpdir()}/mock`;const s=e.S3();const wcb=e=>(t,...r)=>{if(t&&t.code==="ENOENT"){t.code="NotFound"}return e(t,...r)};return{listObjects(e,t){return s.listObjects(e,wcb(t))},headObject(e,t){return s.headObject(e,wcb(t))},deleteObject(e,t){return s.deleteObject(e,wcb(t))},putObject(e,t){return s.putObject(e,wcb(t))}}}const t=r(2355);t.config.update(e);const s=new t.S3;return{listObjects(e,t){return s.listObjects(e,t)},headObject(e,t){return s.headObject(e,t)},deleteObject(e,t){return s.deleteObject(e,t)},putObject(e,t){return s.putObject(e,t)}}};e.exports.get_mockS3Http=function(){let e=false;if(!process.env.node_pre_gyp_mock_s3){return()=>e}const t=r(4997);const s="https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com";const u=process.env.node_pre_gyp_mock_s3+"/mapbox-node-pre-gyp-public-testing-bucket";const mock_http=()=>{function get(e,t){const r=o.join(u,e.replace("%2B","+"));try{a.accessSync(r,a.constants.R_OK)}catch(e){return[404,"not found\n"]}return[200,a.createReadStream(r)]}return t(s).persist().get((()=>e)).reply(get)};mock_http(t,s,u);const mockS3Http=t=>{const r=e;if(t==="off"){e=false}else if(t==="on"){e=true}else if(t!=="get"){throw new Error(`illegal action for setMockHttp ${t}`)}return r};return mockS3Http}},2821:(e,t,r)=>{"use strict";e.exports=t;const s=r(1017);const a=r(7849);const o=r(7310);const u=r(5104);const c=r(5977);let f;if(process.env.NODE_PRE_GYP_ABI_CROSSWALK){f=require(process.env.NODE_PRE_GYP_ABI_CROSSWALK)}else{f=r(9448)}const d={};Object.keys(f).forEach((e=>{const t=e.split(".")[0];if(!d[t]){d[t]=e}}));function get_electron_abi(e,t){if(!e){throw new Error("get_electron_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if electron is the target.")}const r=a.parse(t);return e+"-v"+r.major+"."+r.minor}e.exports.get_electron_abi=get_electron_abi;function get_node_webkit_abi(e,t){if(!e){throw new Error("get_node_webkit_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if node-webkit is the target.")}return e+"-v"+t}e.exports.get_node_webkit_abi=get_node_webkit_abi;function get_node_abi(e,t){if(!e){throw new Error("get_node_abi requires valid runtime arg")}if(!t){throw new Error("get_node_abi requires valid process.versions object")}const r=a.parse(t.node);if(r.major===0&&r.minor%2){return e+"-v"+t.node}else{return t.modules?e+"-v"+ +t.modules:"v8-"+t.v8.split(".").slice(0,2).join(".")}}e.exports.get_node_abi=get_node_abi;function get_runtime_abi(e,t){if(!e){throw new Error("get_runtime_abi requires valid runtime arg")}if(e==="node-webkit"){return get_node_webkit_abi(e,t||process.versions["node-webkit"])}else if(e==="electron"){return get_electron_abi(e,t||process.versions.electron)}else{if(e!=="node"){throw new Error("Unknown Runtime: '"+e+"'")}if(!t){return get_node_abi(e,process.versions)}else{let r;if(f[t]){r=f[t]}else{const e=t.split(".").map((e=>+e));if(e.length!==3){throw new Error("Unknown target version: "+t)}const s=e[0];let a=e[1];let o=e[2];if(s===1){while(true){if(a>0)--a;if(o>0)--o;const e=""+s+"."+a+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}if(a===0&&o===0){break}}}else if(s>=2){if(d[s]){r=f[d[s]];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+d[s]+" as ABI compatible target")}}else if(s===0){if(e[1]%2===0){while(--o>0){const e=""+s+"."+a+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}}}}}if(!r){throw new Error("Unsupported target version: "+t)}const s={node:t,v8:r.v8+".0",modules:r.node_abi>1?r.node_abi:undefined};return get_node_abi(e,s)}}}e.exports.get_runtime_abi=get_runtime_abi;const p=["module_name","module_path","host"];function validate_config(e,t){const r=e.name+" package.json is not node-pre-gyp ready:\n";const s=[];if(!e.main){s.push("main")}if(!e.version){s.push("version")}if(!e.name){s.push("name")}if(!e.binary){s.push("binary")}const a=e.binary;if(a){p.forEach((e=>{if(!a[e]||typeof a[e]!=="string"){s.push("binary."+e)}}))}if(s.length>=1){throw new Error(r+"package.json must declare these properties: \n"+s.join("\n"))}if(a){const e=o.parse(a.host).protocol;if(e==="http:"){throw new Error("'host' protocol ("+e+") is invalid - only 'https:' is accepted")}}c.validate_package_json(e,t)}e.exports.validate_config=validate_config;function eval_template(e,t){Object.keys(t).forEach((r=>{const s="{"+r+"}";while(e.indexOf(s)>-1){e=e.replace(s,t[r])}}));return e}function fix_slashes(e){if(e.slice(-1)!=="/"){return e+"/"}return e}function drop_double_slashes(e){return e.replace(/\/\//g,"/")}function get_process_runtime(e){let t="node";if(e["node-webkit"]){t="node-webkit"}else if(e.electron){t="electron"}return t}e.exports.get_process_runtime=get_process_runtime;const h="{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz";const v="";e.exports.evaluate=function(e,t,r){t=t||{};validate_config(e,t);const f=e.version;const d=a.parse(f);const p=t.runtime||get_process_runtime(process.versions);const D={name:e.name,configuration:t.debug?"Debug":"Release",debug:t.debug,module_name:e.binary.module_name,version:d.version,prerelease:d.prerelease.length?d.prerelease.join("."):"",build:d.build.length?d.build.join("."):"",major:d.major,minor:d.minor,patch:d.patch,runtime:p,node_abi:get_runtime_abi(p,t.target),node_abi_napi:c.get_napi_version(t.target)?"napi":get_runtime_abi(p,t.target),napi_version:c.get_napi_version(t.target),napi_build_version:r||"",node_napi_label:r?"napi-v"+r:get_runtime_abi(p,t.target),target:t.target||"",platform:t.target_platform||process.platform,target_platform:t.target_platform||process.platform,arch:t.target_arch||process.arch,target_arch:t.target_arch||process.arch,libc:t.target_libc||u.family||"unknown",module_main:e.main,toolset:t.toolset||"",bucket:e.binary.bucket,region:e.binary.region,s3ForcePathStyle:e.binary.s3ForcePathStyle||false};const g=D.module_name.replace("-","_");const y=process.env["npm_config_"+g+"_binary_host_mirror"]||e.binary.host;D.host=fix_slashes(eval_template(y,D));D.module_path=eval_template(e.binary.module_path,D);if(t.module_root){D.module_path=s.join(t.module_root,D.module_path)}else{D.module_path=s.resolve(D.module_path)}D.module=s.join(D.module_path,D.module_name+".node");D.remote_path=e.binary.remote_path?drop_double_slashes(fix_slashes(eval_template(e.binary.remote_path,D))):v;const m=e.binary.package_name?e.binary.package_name:h;D.package_name=eval_template(m,D);D.staged_tarball=s.join("build/stage",D.remote_path,D.package_name);D.hosted_path=o.resolve(D.host,D.remote_path);D.hosted_tarball=o.resolve(D.hosted_path,D.package_name);return D}},7498:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(1017));const o=r(3982);const u=r(9663);const c=r(4370);const f=r(1988);const d=s(r(3331));const p=r(9336);const h=s(r(3535));const v=r(1226);const D=r(2100);const g=r(7393);const y=s(r(1415));const m=s(r(1));const _=s(r(7663));const E=s(r(5841));const w=r(7310);const x=f.Parser.extend();const F=s(r(2037));const C=r(3791);const S=s(r(2382));const k={cwd:()=>K,env:{NODE_ENV:c.UNKNOWN,[c.UNKNOWN]:true},[c.UNKNOWN]:true};const A=Symbol();const R=Symbol();const O=Symbol();const T=Symbol();const j=Symbol();const B=Symbol();const L=Symbol();const N=Symbol();const I=Symbol();const P={access:B,accessSync:B,createReadStream:B,exists:B,existsSync:B,fstat:B,fstatSync:B,lstat:B,lstatSync:B,open:B,readdir:L,readdirSync:L,readFile:B,readFileSync:B,stat:B,statSync:B};const W={...P,pathExists:B,pathExistsSync:B,readJson:B,readJSON:B,readJsonSync:B,readJSONSync:B};const M=Object.assign(Object.create(null),{bindings:{default:N},express:{default:function(){return{[c.UNKNOWN]:true,set:A,engine:R}}},fs:{default:P,...P},"fs-extra":{default:W,...W},"graceful-fs":{default:P,...P},process:{default:k,...k},path:{default:{}},os:{default:F.default,...F.default},"@mapbox/node-pre-gyp":{default:E.default,...E.default},"node-pre-gyp":D.pregyp,"node-pre-gyp/lib/pre-binding":D.pregyp,"node-pre-gyp/lib/pre-binding.js":D.pregyp,"node-gyp-build":{default:I},nbind:{init:O,default:{init:O}},"resolve-from":{default:S.default},"strong-globalize":{default:{SetRootDir:T},SetRootDir:T},pkginfo:{default:j}});const $={_interopRequireDefault:g.normalizeDefaultRequire,_interopRequireWildcard:g.normalizeWildcardRequire,__importDefault:g.normalizeDefaultRequire,__importStar:g.normalizeWildcardRequire,MONGOOSE_DRIVER_PATH:undefined,URL:w.URL,Object:{assign:Object.assign}};$.global=$.GLOBAL=$.globalThis=$;const q=Symbol();D.pregyp.find[q]=true;const U=M.path;Object.keys(a.default).forEach((e=>{const t=a.default[e];if(typeof t==="function"){const r=function mockPath(){return t.apply(mockPath,arguments)};r[q]=true;U[e]=U.default[e]=r}else{U[e]=U.default[e]=t}}));U.resolve=U.default.resolve=function(...e){return a.default.resolve.apply(this,[K,...e])};U.resolve[q]=true;const G=new Set([".h",".cmake",".c",".cpp"]);const H=new Set(["CHANGELOG.md","README.md","readme.md","changelog.md"]);let K;const z=/^\/[^\/]+|^[a-z]:[\\/][^\\/]+/i;function isAbsolutePathOrUrl(e){if(e instanceof w.URL)return e.protocol==="file:";if(typeof e==="string"){if(e.startsWith("file:")){try{new w.URL(e);return true}catch{return false}}return z.test(e)}return false}const V=Symbol();const Y=/([\/\\]\*\*[\/\\]\*)+/g;async function analyze(e,t,r){const s=new Set;const f=new Set;const g=new Set;const E=a.default.dirname(e);K=r.cwd;const F=(0,v.getPackageBase)(e);const emitAssetDirectory=e=>{if(!r.analysis.emitGlobs)return;const t=e.indexOf(c.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const u=e.substring(0,o);const f=e.slice(o);const d=f.replace(c.wildcardRegEx,((e,t)=>f[t-1]===a.default.sep?"**/*":"*")).replace(Y,"/**/*")||"/**/*";if(r.ignoreFn(a.default.relative(r.base,u+d)))return;P=P.then((async()=>{if(r.log)console.log("Globbing "+u+d);const e=await new Promise(((e,t)=>(0,h.default)(u+d,{mark:true,ignore:u+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));e.filter((e=>!G.has(a.default.extname(e))&&!H.has(a.default.basename(e))&&!e.endsWith("/"))).forEach((e=>s.add(e)))}))};let P=Promise.resolve();t=t.replace(/^#![^\n\r]*[\r\n]/,"");let W;let U=false;try{W=x.parse(t,{ecmaVersion:"latest",allowReturnOutsideFunction:true});U=false}catch(t){const s=t&&t.message&&t.message.includes("sourceType: module");if(!s){r.warnings.add(new Error(`Failed to parse ${e} as script:\n${t&&t.message}`))}}if(!W){try{W=x.parse(t,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:true});U=true}catch(t){r.warnings.add(new Error(`Failed to parse ${e} as module:\n${t&&t.message}`));return{assets:s,deps:f,imports:g,isESM:false}}}const Q=(0,w.pathToFileURL)(e).href;const J=Object.assign(Object.create(null),{__dirname:{shadowDepth:0,value:{value:a.default.resolve(e,"..")}},__filename:{shadowDepth:0,value:{value:e}},process:{shadowDepth:0,value:{value:k}}});if(!U||r.mixedModules){J.require={shadowDepth:0,value:{value:{[c.FUNCTION](e){f.add(e);const t=M[e.startsWith("node:")?e.slice(5):e];return t.default},resolve(t){return(0,m.default)(t,e,r)}}}};J.require.value.value.resolve[q]=true}function setKnownBinding(e,t){if(e==="require")return;J[e]={shadowDepth:0,value:t}}function getKnownBinding(e){const t=J[e];if(t){if(t.shadowDepth===0){return t.value}}return undefined}function hasKnownBindingValue(e){const t=J[e];return t&&t.shadowDepth===0}if((U||r.mixedModules)&&isAst(W)){for(const e of W.body){if(e.type==="ImportDeclaration"){const t=String(e.source.value);f.add(t);const r=M[t.startsWith("node:")?t.slice(5):t];if(r){for(const t of e.specifiers){if(t.type==="ImportNamespaceSpecifier")setKnownBinding(t.local.name,{value:r});else if(t.type==="ImportDefaultSpecifier"&&"default"in r)setKnownBinding(t.local.name,{value:r.default});else if(t.type==="ImportSpecifier"&&t.imported.name in r)setKnownBinding(t.local.name,{value:r[t.imported.name]})}}}else if(e.type==="ExportNamedDeclaration"||e.type==="ExportAllDeclaration"){if(e.source)f.add(String(e.source.value))}}}async function computePureStaticValue(e,t=true){const r=Object.create(null);Object.keys($).forEach((e=>{r[e]={value:$[e]}}));Object.keys(J).forEach((e=>{r[e]=getKnownBinding(e)}));r["import.meta"]={url:Q};const s=await(0,c.evaluate)(e,r,t);return s}let X;let Z;let ee=false;function emitWildcardRequire(e){if(!r.analysis.emitGlobs||!e.startsWith("./")&&!e.startsWith("../"))return;e=a.default.resolve(E,e);const t=e.indexOf(c.WILDCARD);const s=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const o=e.substring(0,s);const u=e.slice(s);let d=u.replace(c.wildcardRegEx,((e,t)=>u[t-1]===a.default.sep?"**/*":"*"))||"/**/*";if(!d.endsWith("*"))d+="?("+(r.ts?".ts|.tsx|":"")+".js|.json|.node)";if(r.ignoreFn(a.default.relative(r.base,o+d)))return;P=P.then((async()=>{if(r.log)console.log("Globbing "+o+d);const e=await new Promise(((e,t)=>(0,h.default)(o+d,{mark:true,ignore:o+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));e.filter((e=>!G.has(a.default.extname(e))&&!H.has(a.default.basename(e))&&!e.endsWith("/"))).forEach((e=>f.add(e)))}))}async function processRequireArg(e,t=false){if(e.type==="ConditionalExpression"){await processRequireArg(e.consequent,t);await processRequireArg(e.alternate,t);return}if(e.type==="LogicalExpression"){await processRequireArg(e.left,t);await processRequireArg(e.right,t);return}let r=await computePureStaticValue(e,true);if(!r)return;if("value"in r&&typeof r.value==="string"){if(!r.wildcards)(t?g:f).add(r.value);else if(r.wildcards.length>=1)emitWildcardRequire(r.value)}else{if("then"in r&&typeof r.then==="string")(t?g:f).add(r.then);if("else"in r&&typeof r.else==="string")(t?g:f).add(r.else)}}let te=(0,u.attachScopes)(W,"scope");if(isAst(W)){(0,C.handleWrappers)(W);await(0,y.default)({id:e,ast:W,emitDependency:e=>f.add(e),emitAsset:e=>s.add(e),emitAssetDirectory:emitAssetDirectory,job:r})}async function backtrack(e,t){if(!X)throw new Error("Internal error: No staticChildNode for backtrack.");const r=await computePureStaticValue(e,true);if(r){if("value"in r&&typeof r.value!=="symbol"||"then"in r&&typeof r.then!=="symbol"&&typeof r.else!=="symbol"){Z=r;X=e;if(t)t.skip();return}}await emitStaticChildAsset()}await(0,o.asyncWalk)(W,{async enter(t,o){const u=t;const c=o;if(u.scope){te=u.scope;for(const e in u.scope.declarations){if(e in J)J[e].shadowDepth++}}if(X)return;if(!c)return;if(u.type==="Identifier"){if((0,p.isIdentifierRead)(u,c)&&r.analysis.computeFileReferences){let e;if(typeof(e=getKnownBinding(u.name)?.value)==="string"&&e.match(z)||e&&(typeof e==="function"||typeof e==="object")&&e[q]){Z={value:typeof e==="string"?e:undefined};X=u;await backtrack(c,this)}}}else if(r.analysis.computeFileReferences&&u.type==="MemberExpression"&&u.object.type==="MetaProperty"&&u.object.meta.name==="import"&&u.object.property.name==="meta"&&(u.property.computed?u.property.value:u.property.name)==="url"){Z={value:Q};X=u;await backtrack(c,this)}else if(u.type==="ImportExpression"){await processRequireArg(u.source,true);return}else if(u.type==="CallExpression"){if((!U||r.mixedModules)&&u.callee.type==="Identifier"&&u.arguments.length){if(u.callee.name==="require"&&J.require.shadowDepth===0){await processRequireArg(u.arguments[0]);return}}else if((!U||r.mixedModules)&&u.callee.type==="MemberExpression"&&u.callee.object.type==="Identifier"&&u.callee.object.name==="module"&&"module"in J===false&&u.callee.property.type==="Identifier"&&!u.callee.computed&&u.callee.property.name==="require"&&u.arguments.length){await processRequireArg(u.arguments[0]);return}else if((!U||r.mixedModules)&&u.callee.type==="MemberExpression"&&u.callee.object.type==="Identifier"&&u.callee.object.name==="require"&&J.require.shadowDepth===0&&u.callee.property.type==="Identifier"&&!u.callee.computed&&u.callee.property.name==="resolve"&&u.arguments.length){await processRequireArg(u.arguments[0]);return}const t=r.analysis.evaluatePureExpressions&&await computePureStaticValue(u.callee,false);if(t&&"value"in t&&typeof t.value==="function"&&t.value[q]&&r.analysis.computeFileReferences){Z=await computePureStaticValue(u,true);if(Z&&c){X=u;await backtrack(c,this)}}else if(t&&"value"in t&&typeof t.value==="symbol"){switch(t.value){case V:if(u.arguments.length===1&&u.arguments[0].type==="Literal"&&u.callee.type==="Identifier"&&J.require.shadowDepth===0){await processRequireArg(u.arguments[0])}break;case N:if(u.arguments.length){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&e.value){let t;if(typeof e.value==="object")t=e.value;else if(typeof e.value==="string")t={bindings:e.value};if(!t.path){t.path=true}t.module_root=F;let r;try{r=(0,d.default)(t)}catch(e){}if(r){Z={value:r};X=u;await emitStaticChildAsset()}}}break;case I:if(u.arguments.length===1&&u.arguments[0].type==="Identifier"&&u.arguments[0].name==="__dirname"&&J.__dirname.shadowDepth===0){let e;try{const t=(0,S.default)(E,"node-gyp-build");e=require(t).path(E)}catch(t){try{e=_.default.path(E)}catch(e){}}if(e){Z={value:e};X=u;await emitStaticChildAsset()}}break;case O:if(u.arguments.length){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&(typeof e.value==="string"||typeof e.value==="undefined")){const t=(0,D.nbind)(e.value);if(t&&t.path){f.add(a.default.relative(E,t.path).replace(/\\/g,"/"));return this.skip()}}}break;case A:if(u.arguments.length===2&&u.arguments[0].type==="Literal"&&u.arguments[0].value==="view engine"&&!ee){await processRequireArg(u.arguments[1]);return this.skip()}break;case R:ee=true;break;case B:case L:if(u.arguments[0]&&r.analysis.computeFileReferences){Z=await computePureStaticValue(u.arguments[0],true);if(Z){X=u.arguments[0];if(t.value===L&&u.arguments[0].type==="Identifier"&&u.arguments[0].name==="__dirname"){emitAssetDirectory(E)}else{await backtrack(c,this)}return this.skip()}}break;case T:if(u.arguments[0]){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&e.value)emitAssetDirectory(e.value+"/intl");return this.skip()}break;case j:let o=a.default.resolve(e,"../package.json");const p=a.default.resolve("/package.json");while(o!==p&&await r.stat(o)===null)o=a.default.resolve(o,"../../package.json");if(o!==p)s.add(o);break}}}else if(u.type==="VariableDeclaration"&&c&&!(0,p.isVarLoop)(c)&&r.analysis.evaluatePureExpressions){for(const e of u.declarations){if(!e.init)continue;const t=await computePureStaticValue(e.init,true);if(t){if(e.id.type==="Identifier"){setKnownBinding(e.id.name,t)}else if(e.id.type==="ObjectPattern"&&"value"in t){for(const r of e.id.properties){if(r.type!=="Property"||r.key.type!=="Identifier"||r.value.type!=="Identifier"||typeof t.value!=="object"||t.value===null||!(r.key.name in t.value))continue;setKnownBinding(r.value.name,{value:t.value[r.key.name]})}}if(!("value"in t)&&isAbsolutePathOrUrl(t.then)&&isAbsolutePathOrUrl(t.else)){Z=t;X=e.init;await emitStaticChildAsset()}}}}else if(u.type==="AssignmentExpression"&&c&&!(0,p.isLoop)(c)&&r.analysis.evaluatePureExpressions){if(!hasKnownBindingValue(u.left.name)){const e=await computePureStaticValue(u.right,false);if(e&&"value"in e){if(u.left.type==="Identifier"){setKnownBinding(u.left.name,e)}else if(u.left.type==="ObjectPattern"){for(const t of u.left.properties){if(t.type!=="Property"||t.key.type!=="Identifier"||t.value.type!=="Identifier"||typeof e.value!=="object"||e.value===null||!(t.key.name in e.value))continue;setKnownBinding(t.value.name,{value:e.value[t.key.name]})}}if(isAbsolutePathOrUrl(e.value)){Z=e;X=u.right;await emitStaticChildAsset()}}}}else if((!U||r.mixedModules)&&(u.type==="FunctionDeclaration"||u.type==="FunctionExpression"||u.type==="ArrowFunctionExpression")&&(u.arguments||u.params)[0]&&(u.arguments||u.params)[0].type==="Identifier"){let e;let t;if((u.type==="ArrowFunctionExpression"||u.type==="FunctionExpression")&&c&&c.type==="VariableDeclarator"&&c.id.type==="Identifier"){e=c.id;t=u.arguments||u.params}else if(u.id){e=u.id;t=u.arguments||u.params}if(e&&u.body.body){let r,s=false;for(let e=0;ee&&e.id&&e.id.type==="Identifier"&&e.init&&e.init.type==="CallExpression"&&e.init.callee.type==="Identifier"&&e.init.callee.name==="require"&&J.require.shadowDepth===0&&e.init.arguments[0]&&e.init.arguments[0].type==="Identifier"&&e.init.arguments[0].name===t[0].name))}if(r&&u.body.body[e].type==="ReturnStatement"&&u.body.body[e].argument&&u.body.body[e].argument.type==="Identifier"&&u.body.body[e].argument.name===r.id.name){s=true;break}}if(s)setKnownBinding(e.name,{value:V})}}},async leave(e,t){const r=e;const s=t;if(r.scope){if(te.parent){te=te.parent}for(const e in r.scope.declarations){if(e in J){if(J[e].shadowDepth>0)J[e].shadowDepth--;else delete J[e]}}}if(X&&s)await backtrack(s,this)}});await P;return{assets:s,deps:f,imports:g,isESM:U};async function emitAssetPath(e){const t=e.indexOf(c.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const u=e.substring(0,o);try{var f=await r.stat(u);if(f===null){throw new Error("file not found")}}catch(e){return}if(t!==-1&&f.isFile())return;if(f.isFile()){s.add(e)}else if(f.isDirectory()){if(validWildcard(e))emitAssetDirectory(e)}}function validWildcard(t){let s="";if(t.endsWith(a.default.sep))s=a.default.sep;else if(t.endsWith(a.default.sep+c.WILDCARD))s=a.default.sep+c.WILDCARD;else if(t.endsWith(c.WILDCARD))s=c.WILDCARD;if(t===E+s)return false;if(t===K+s)return false;if(t.endsWith(a.default.sep+"node_modules"+s))return false;if(E.startsWith(t.slice(0,t.length-s.length)+a.default.sep))return false;if(F){const s=e.substring(0,e.indexOf(a.default.sep+"node_modules"))+a.default.sep+"node_modules"+a.default.sep;if(!t.startsWith(s)){if(r.log)console.log("Skipping asset emission of "+t.replace(c.wildcardRegEx,"*")+" for "+e+" as it is outside the package base "+F);return false}}return true}function resolveAbsolutePathOrUrl(e){return e instanceof w.URL?(0,w.fileURLToPath)(e):e.startsWith("file:")?(0,w.fileURLToPath)(new w.URL(e)):a.default.resolve(e)}async function emitStaticChildAsset(){if(!Z){return}if("value"in Z&&isAbsolutePathOrUrl(Z.value)){try{const e=resolveAbsolutePathOrUrl(Z.value);await emitAssetPath(e)}catch(e){}}else if("then"in Z&&"else"in Z&&isAbsolutePathOrUrl(Z.then)&&isAbsolutePathOrUrl(Z.else)){let e;try{e=resolveAbsolutePathOrUrl(Z.then)}catch(e){}let t;try{t=resolveAbsolutePathOrUrl(Z.else)}catch(e){}if(e)await emitAssetPath(e);if(t)await emitAssetPath(t)}else if(X&&X.type==="ArrayExpression"&&"value"in Z&&Z.value instanceof Array){for(const e of Z.value){try{const t=resolveAbsolutePathOrUrl(e);await emitAssetPath(t)}catch(e){}}}X=Z=undefined}}t["default"]=analyze;function isAst(e){return"body"in e}},529:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.CachedFileSystem=void 0;const a=r(1017);const o=s(r(9165));const u=r(5749);const c=o.default.promises.readFile;const f=o.default.promises.readlink;const d=o.default.promises.stat;class CachedFileSystem{constructor({cache:e,fileIOConcurrency:t}){this.fileIOQueue=new u.Sema(t);this.fileCache=e?.fileCache??new Map;this.statCache=e?.statCache??new Map;this.symlinkCache=e?.symlinkCache??new Map;if(e){e.fileCache=this.fileCache;e.statCache=this.statCache;e.symlinkCache=this.symlinkCache}}async readlink(e){const t=this.symlinkCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalReadlink);this.symlinkCache.set(e,r);return r}async readFile(e){const t=this.fileCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalReadFile);this.fileCache.set(e,r);return r}async stat(e){const t=this.statCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalStat);this.statCache.set(e,r);return r}async _internalReadlink(e){try{const t=await f(e);const r=this.statCache.get(e);if(r)this.statCache.set((0,a.resolve)(e,t),r);return t}catch(e){if(e.code!=="EINVAL"&&e.code!=="ENOENT"&&e.code!=="UNKNOWN")throw e;return null}}async _internalReadFile(e){try{return(await c(e)).toString()}catch(e){if(e.code==="ENOENT"||e.code==="EISDIR"){return null}throw e}}async _internalStat(e){try{return await d(e)}catch(e){if(e.code==="ENOENT"){return null}throw e}}async executeFileIO(e,t){await this.fileIOQueue.acquire();try{return t.call(this,e)}finally{this.fileIOQueue.release()}}}t.CachedFileSystem=CachedFileSystem},6223:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;var a=Object.getOwnPropertyDescriptor(t,r);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,s,a)}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))s(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});t.nodeFileTrace=void 0;a(r(8470),t);var o=r(2411);Object.defineProperty(t,"nodeFileTrace",{enumerable:true,get:function(){return o.nodeFileTrace}})},2411:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;var a=Object.getOwnPropertyDescriptor(t,r);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,s,a)}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))s(t,e,r);a(t,e);return t};var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Job=t.nodeFileTrace=void 0;const c=r(1017);const f=u(r(7498));const d=o(r(1));const p=r(2540);const h=r(8908);const v=r(1017);const D=r(529);function inPath(e,t){const r=(0,v.join)(t,c.sep);return e.startsWith(r)&&e!==r}async function nodeFileTrace(e,t={}){const r=new Job(t);if(t.readFile)r.readFile=t.readFile;if(t.stat)r.stat=t.stat;if(t.readlink)r.readlink=t.readlink;if(t.resolve)r.resolve=t.resolve;r.ts=true;await Promise.all(e.map((async e=>{const t=(0,c.resolve)(e);await r.emitFile(t,"initial");return r.emitDependency(t)})));const s={fileList:r.fileList,esmFileList:r.esmFileList,reasons:r.reasons,warnings:r.warnings};return s}t.nodeFileTrace=nodeFileTrace;class Job{constructor({base:e=process.cwd(),processCwd:t,exports:r,conditions:s=r||["node"],exportsOnly:a=false,paths:o={},ignore:u,log:f=false,mixedModules:h=false,ts:v=true,analysis:g={},cache:y,fileIOConcurrency:m=1024}){this.reasons=new Map;this.maybeEmitDep=async(e,t,r)=>{let s="";let a;try{s=await this.resolve(e,t,this,r)}catch(o){a=o;try{if(this.ts&&e.endsWith(".js")&&o instanceof d.NotFoundError){const o=e.slice(0,-3)+".ts";s=await this.resolve(o,t,this,r);a=undefined}}catch(e){a=e}}if(a){this.warnings.add(new Error(`Failed to resolve dependency "${e}":\n${a?.message}`));return}if(Array.isArray(s)){for(const e of s){if(e.startsWith("node:"))return;await this.emitDependency(e,t)}}else{if(s.startsWith("node:"))return;await this.emitDependency(s,t)}};this.ts=v;e=(0,c.resolve)(e);this.ignoreFn=e=>{if(e.startsWith(".."+c.sep))return true;return false};if(typeof u==="string")u=[u];if(typeof u==="function"){const e=u;this.ignoreFn=t=>{if(t.startsWith(".."+c.sep))return true;if(e(t))return true;return false}}else if(Array.isArray(u)){const t=u.map((t=>(0,c.relative)(e,(0,c.resolve)(e||process.cwd(),t))));this.ignoreFn=e=>{if(e.startsWith(".."+c.sep))return true;if((0,p.isMatch)(e,t))return true;return false}}this.base=e;this.cwd=(0,c.resolve)(t||e);this.conditions=s;this.exportsOnly=a;const _={};for(const t of Object.keys(o)){const r=o[t].endsWith("/");const s=(0,c.resolve)(e,o[t]);_[t]=s+(r?"/":"")}this.paths=_;this.log=f;this.mixedModules=h;this.cachedFileSystem=new D.CachedFileSystem({cache:y,fileIOConcurrency:m});this.analysis={};if(g!==false){Object.assign(this.analysis,{emitGlobs:true,computeFileReferences:true,evaluatePureExpressions:true},g===true?{}:g)}this.analysisCache=y&&y.analysisCache||new Map;if(y){y.analysisCache=this.analysisCache}this.fileList=new Set;this.esmFileList=new Set;this.processed=new Set;this.warnings=new Set}async readlink(e){return this.cachedFileSystem.readlink(e)}async isFile(e){const t=await this.stat(e);if(t)return t.isFile();return false}async isDir(e){const t=await this.stat(e);if(t)return t.isDirectory();return false}async stat(e){return this.cachedFileSystem.stat(e)}async resolve(e,t,r,s){return(0,d.default)(e,t,r,s)}async readFile(e){return this.cachedFileSystem.readFile(e)}async realpath(e,t,r=new Set){if(r.has(e))throw new Error("Recursive symlink detected resolving "+e);r.add(e);const s=await this.readlink(e);if(s){const a=(0,c.dirname)(e);const o=(0,c.resolve)(a,s);const u=await this.realpath(a,t);if(inPath(e,u))await this.emitFile(e,"resolve",t,true);return this.realpath(o,t,r)}if(!inPath(e,this.base))return e;return(0,v.join)(await this.realpath((0,c.dirname)(e),t,r),(0,c.basename)(e))}async emitFile(e,t,r,s=false){if(!s){e=await this.realpath(e,r)}e=(0,c.relative)(this.base,e);if(r){r=(0,c.relative)(this.base,r)}let a=this.reasons.get(e);if(!a){a={type:[t],ignored:false,parents:new Set};this.reasons.set(e,a)}else if(!a.type.includes(t)){a.type.push(t)}if(r&&this.ignoreFn(e,r)){if(!this.fileList.has(e)&&a){a.ignored=true}return false}if(r){a.parents.add(r)}this.fileList.add(e);return true}async getPjsonBoundary(e){const t=e.indexOf(c.sep);let r;while((r=e.lastIndexOf(c.sep))>t){e=e.slice(0,r);if(await this.isFile(e+c.sep+"package.json"))return e}return undefined}async emitDependency(e,t){if(this.processed.has(e)){if(t){await this.emitFile(e,"dependency",t)}return}this.processed.add(e);const r=await this.emitFile(e,"dependency",t);if(!r)return;if(e.endsWith(".json"))return;if(e.endsWith(".node"))return await(0,h.sharedLibEmit)(e,this);if(e.endsWith(".js")||e.endsWith(".ts")){const t=await this.getPjsonBoundary(e);if(t)await this.emitFile(t+c.sep+"package.json","resolve",e)}let s;const a=this.analysisCache.get(e);if(a){s=a}else{const t=await this.readFile(e);if(t===null)throw new Error("File "+e+" does not exist.");s=await(0,f.default)(e,t.toString(),this);this.analysisCache.set(e,s)}const{deps:o,imports:u,assets:d,isESM:p}=s;if(p){this.esmFileList.add((0,c.relative)(this.base,e))}await Promise.all([...[...d].map((async t=>{const r=(0,c.extname)(t);if(r===".js"||r===".mjs"||r===".node"||r===""||this.ts&&(r===".ts"||r===".tsx")&&t.startsWith(this.base)&&t.slice(this.base.length).indexOf(c.sep+"node_modules"+c.sep)===-1)await this.emitDependency(t,e);else await this.emitFile(t,"asset",e)})),...[...o].map((async t=>this.maybeEmitDep(t,e,!p))),...[...u].map((async t=>this.maybeEmitDep(t,e,false)))])}}t.Job=Job},1:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NotFoundError=void 0;const s=r(1017);async function resolveDependency(e,t,r,a=true){let o;if((0,s.isAbsolute)(e)||e==="."||e===".."||e.startsWith("./")||e.startsWith("../")){const a=e.endsWith("/");o=await resolvePath((0,s.resolve)(t,"..",e)+(a?"/":""),t,r)}else if(e[0]==="#"){o=await packageImportsResolve(e,t,r,a)}else{o=await resolvePackage(e,t,r,a)}if(Array.isArray(o)){return Promise.all(o.map((e=>r.realpath(e,t))))}else if(o.startsWith("node:")){return o}else{return r.realpath(o,t)}}t["default"]=resolveDependency;async function resolvePath(e,t,r){const s=await resolveFile(e,t,r)||await resolveDir(e,t,r);if(!s){throw new NotFoundError(e,t)}return s}async function resolveFile(e,t,r){if(e.endsWith("/"))return undefined;e=await r.realpath(e,t);if(await r.isFile(e))return e;if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1&&await r.isFile(e+".ts"))return e+".ts";if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1&&await r.isFile(e+".tsx"))return e+".tsx";if(await r.isFile(e+".js"))return e+".js";if(await r.isFile(e+".json"))return e+".json";if(await r.isFile(e+".node"))return e+".node";return undefined}async function resolveDir(e,t,r){if(e.endsWith("/"))e=e.slice(0,-1);if(!await r.isDir(e))return;const a=await getPkgCfg(e,r);if(a&&typeof a.main==="string"){const o=await resolveFile((0,s.resolve)(e,a.main),t,r)||await resolveFile((0,s.resolve)(e,a.main,"index"),t,r);if(o){await r.emitFile(e+s.sep+"package.json","resolve",t);return o}}return resolveFile((0,s.resolve)(e,"index"),t,r)}class NotFoundError extends Error{constructor(e,t){super("Cannot find module '"+e+"' loaded from "+t);this.code="MODULE_NOT_FOUND"}}t.NotFoundError=NotFoundError;const a=new Set([...r(8102)._builtinLibs,"constants","module","timers","console","_stream_writable","_stream_readable","_stream_duplex","process","sys"]);function getPkgName(e){const t=e.split("/");if(e[0]==="@"&&t.length>1)return t.length>1?t.slice(0,2).join("/"):null;return t.length?t[0]:null}async function getPkgCfg(e,t){const r=await t.readFile(e+s.sep+"package.json");if(r){try{return JSON.parse(r.toString())}catch(e){}}return undefined}function getExportsTarget(e,t,r){if(typeof e==="string"){return e}else if(e===null){return e}else if(Array.isArray(e)){for(const s of e){const e=getExportsTarget(s,t,r);if(e===null||typeof e==="string"&&e.startsWith("./"))return e}}else if(typeof e==="object"){for(const s of Object.keys(e)){if(s==="default"||s==="require"&&r||s==="import"&&!r||t.includes(s)){const a=getExportsTarget(e[s],t,r);if(a!==undefined)return a}}}return undefined}function resolveExportsImports(e,t,r,s,a,o){let u;if(a){if(!(typeof t==="object"&&!Array.isArray(t)&&t!==null))return undefined;u=t}else if(typeof t==="string"||Array.isArray(t)||t===null||typeof t==="object"&&Object.keys(t).length&&Object.keys(t)[0][0]!=="."){u={".":t}}else{u=t}if(r in u){const t=getExportsTarget(u[r],s.conditions,o);if(typeof t==="string"&&t.startsWith("./"))return e+t.slice(1)}for(const t of Object.keys(u).sort(((e,t)=>t.length-e.length))){if(t.endsWith("*")&&r.startsWith(t.slice(0,-1))){const a=getExportsTarget(u[t],s.conditions,o);if(typeof a==="string"&&a.startsWith("./"))return e+a.slice(1).replace(/\*/g,r.slice(t.length-1))}if(!t.endsWith("/"))continue;if(r.startsWith(t)){const a=getExportsTarget(u[t],s.conditions,o);if(typeof a==="string"&&a.endsWith("/")&&a.startsWith("./"))return e+a.slice(1)+r.slice(t.length)}}return undefined}async function packageImportsResolve(e,t,r,a){if(e!=="#"&&!e.startsWith("#/")&&r.conditions){const o=await r.getPjsonBoundary(t);if(o){const u=await getPkgCfg(o,r);const{imports:c}=u||{};if(u&&c!==null&&c!==undefined){let u=resolveExportsImports(o,c,e,r,true,a);if(u){if(a)u=await resolveFile(u,t,r)||await resolveDir(u,t,r);else if(!await r.isFile(u))throw new NotFoundError(u,t);if(u){await r.emitFile(o+s.sep+"package.json","resolve",t);return u}}}}}throw new NotFoundError(e,t)}async function resolvePackage(e,t,r,o){let u=t;if(a.has(e))return"node:"+e;if(e.startsWith("node:"))return e;const c=getPkgName(e)||"";let f;if(r.conditions){const a=await r.getPjsonBoundary(t);if(a){const u=await getPkgCfg(a,r);const{exports:d}=u||{};if(u&&u.name&&u.name===c&&d!==null&&d!==undefined){f=resolveExportsImports(a,d,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f)await r.emitFile(a+s.sep+"package.json","resolve",t)}}}let d;const p=u.indexOf(s.sep);while((d=u.lastIndexOf(s.sep))>p){u=u.slice(0,d);const a=u+s.sep+"node_modules";const p=await r.stat(a);if(!p||!p.isDirectory())continue;const h=await getPkgCfg(a+s.sep+c,r);const{exports:v}=h||{};if(r.conditions&&v!==undefined&&v!==null&&!f){let u;if(!r.exportsOnly)u=await resolveFile(a+s.sep+e,t,r)||await resolveDir(a+s.sep+e,t,r);let f=resolveExportsImports(a+s.sep+c,v,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f){await r.emitFile(a+s.sep+c+s.sep+"package.json","resolve",t);if(u&&u!==f)return[f,u];return f}if(u)return u}else{const o=await resolveFile(a+s.sep+e,t,r)||await resolveDir(a+s.sep+e,t,r);if(o){if(f&&f!==o)return[o,f];return o}}}if(f)return f;if(Object.hasOwnProperty.call(r.paths,e)){return r.paths[e]}for(const s of Object.keys(r.paths)){if(s.endsWith("/")&&e.startsWith(s)){const a=r.paths[s]+e.slice(s.length);const o=await resolveFile(a,t,r)||await resolveDir(a,t,r);if(!o){throw new NotFoundError(e,t)}return o}}throw new NotFoundError(e,t)}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},9336:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isLoop=t.isVarLoop=t.isIdentifierRead=void 0;function isIdentifierRead(e,t){switch(t.type){case"ObjectPattern":case"ArrayPattern":return false;case"AssignmentExpression":return t.right===e;case"MemberExpression":return t.computed||e===t.object;case"Property":return e===t.value;case"MethodDefinition":return false;case"VariableDeclarator":return t.id!==e;case"ExportSpecifier":return false;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return false;default:return true}}t.isIdentifierRead=isIdentifierRead;function isVarLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"}t.isVarLoop=isVarLoop;function isLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="WhileStatement"||e.type==="DoWhileStatement"}t.isLoop=isLoop},2100:function(__unused_webpack_module,exports,__nccwpck_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:true});exports.nbind=exports.pregyp=void 0;const path_1=__importDefault(__nccwpck_require__(1017));const graceful_fs_1=__importDefault(__nccwpck_require__(9165));const versioning=__nccwpck_require__(2821);const napi=__nccwpck_require__(5977);const pregypFind=(e,t)=>{const r=JSON.parse(graceful_fs_1.default.readFileSync(e).toString());versioning.validate_config(r,t);var s;if(napi.get_napi_build_versions(r,t)){s=napi.get_best_napi_build_version(r,t)}t=t||{};if(!t.module_root)t.module_root=path_1.default.dirname(e);var a=versioning.evaluate(r,t,s);return a.module};exports.pregyp={default:{find:pregypFind},find:pregypFind};function makeModulePathList(e,t){return[[e,t],[e,"build",t],[e,"build","Debug",t],[e,"build","Release",t],[e,"out","Debug",t],[e,"Debug",t],[e,"out","Release",t],[e,"Release",t],[e,"build","default",t],[e,process.env["NODE_BINDINGS_COMPILED_DIR"]||"compiled",process.versions.node,process.platform,process.arch,t]]}function findCompiledModule(basePath,specList){var resolvedList=[];var ext=path_1.default.extname(basePath);for(var _i=0,specList_1=specList;_i{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPackageName=t.getPackageBase=void 0;const r=/^(@[^\\\/]+[\\\/])?[^\\\/]+/;function getPackageBase(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const s=e.slice(t+13).match(r);if(s)return e.slice(0,t+13+s[0].length)}return undefined}t.getPackageBase=getPackageBase;function getPackageName(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const s=e.slice(t+13).match(r);if(s&&s.length>0){return s[0].replace(/\\/g,"/")}}return undefined}t.getPackageName=getPackageName},7393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeWildcardRequire=t.normalizeDefaultRequire=void 0;function normalizeDefaultRequire(e){if(e&&e.__esModule)return e;return{default:e}}t.normalizeDefaultRequire=normalizeDefaultRequire;const r=Object.prototype.hasOwnProperty;function normalizeWildcardRequire(e){if(e&&e.__esModule)return e;const t={};for(const s in e){if(!r.call(e,s))continue;t[s]=e[s]}t["default"]=e;return t}t.normalizeWildcardRequire=normalizeWildcardRequire},8908:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.sharedLibEmit=void 0;const a=s(r(2037));const o=s(r(3535));const u=r(1226);let c="";switch(a.default.platform()){case"darwin":c="/**/*.@(dylib|so?(.*))";break;case"win32":c="/**/*.dll";break;default:c="/**/*.so?(.*)"}async function sharedLibEmit(e,t){const r=(0,u.getPackageBase)(e);if(!r)return;const s=await new Promise(((e,t)=>(0,o.default)(r+c,{ignore:r+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));await Promise.all(s.map((r=>t.emitFile(r,"sharedlib",e))))}t.sharedLibEmit=sharedLibEmit},1415:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=r(1017);const o=s(r(1));const u=r(1226);const c=r(9165);const f={"@generated/photon"({id:e,emitAssetDirectory:t}){if(e.endsWith("@generated/photon/index.js")){t((0,a.resolve)((0,a.dirname)(e),"runtime/"))}},argon2({id:e,emitAssetDirectory:t}){if(e.endsWith("argon2/argon2.js")){t((0,a.resolve)((0,a.dirname)(e),"build","Release"));t((0,a.resolve)((0,a.dirname)(e),"prebuilds"));t((0,a.resolve)((0,a.dirname)(e),"lib","binding"))}},bull({id:e,emitAssetDirectory:t}){if(e.endsWith("bull/lib/commands/index.js")){t((0,a.resolve)((0,a.dirname)(e)))}},camaro({id:e,emitAsset:t}){if(e.endsWith("camaro/dist/camaro.js")){t((0,a.resolve)((0,a.dirname)(e),"camaro.wasm"))}},esbuild({id:e,emitAssetDirectory:t}){if(e.endsWith("esbuild/lib/main.js")){const r=(0,a.resolve)(e,"..","..","package.json");const s=JSON.parse((0,c.readFileSync)(r,"utf8"));for(const r of Object.keys(s.optionalDependencies||{})){const s=(0,a.resolve)(e,"..","..","..",r);t(s)}}},"google-gax"({id:e,ast:t,emitAssetDirectory:r}){if(e.endsWith("google-gax/build/src/grpc.js")){for(const s of t.body){if(s.type==="VariableDeclaration"&&s.declarations[0].id.type==="Identifier"&&s.declarations[0].id.name==="googleProtoFilesDir"){r((0,a.resolve)((0,a.dirname)(e),"../../../google-proto-files"))}}}},oracledb({id:e,ast:t,emitAsset:r}){if(e.endsWith("oracledb/lib/oracledb.js")){for(const s of t.body){if(s.type==="ForStatement"&&"body"in s.body&&s.body.body&&Array.isArray(s.body.body)&&s.body.body[0]&&s.body.body[0].type==="TryStatement"&&s.body.body[0].block.body[0]&&s.body.body[0].block.body[0].type==="ExpressionStatement"&&s.body.body[0].block.body[0].expression.type==="AssignmentExpression"&&s.body.body[0].block.body[0].expression.operator==="="&&s.body.body[0].block.body[0].expression.left.type==="Identifier"&&s.body.body[0].block.body[0].expression.left.name==="oracledbCLib"&&s.body.body[0].block.body[0].expression.right.type==="CallExpression"&&s.body.body[0].block.body[0].expression.right.callee.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.callee.name==="require"&&s.body.body[0].block.body[0].expression.right.arguments.length===1&&s.body.body[0].block.body[0].expression.right.arguments[0].type==="MemberExpression"&&s.body.body[0].block.body[0].expression.right.arguments[0].computed===true&&s.body.body[0].block.body[0].expression.right.arguments[0].object.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.arguments[0].object.name==="binaryLocations"&&s.body.body[0].block.body[0].expression.right.arguments[0].property.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.arguments[0].property.name==="i"){s.body.body[0].block.body[0].expression.right.arguments=[{type:"Literal",value:"_"}];const t=global._unit?"3.0.0":JSON.parse((0,c.readFileSync)(e.slice(0,-15)+"package.json","utf8")).version;const o=Number(t.slice(0,t.indexOf(".")))>=4;const u="oracledb-"+(o?t:"abi"+process.versions.modules)+"-"+process.platform+"-"+process.arch+".node";r((0,a.resolve)(e,"../../build/Release/"+u))}}}},"phantomjs-prebuilt"({id:e,emitAssetDirectory:t}){if(e.endsWith("phantomjs-prebuilt/lib/phantomjs.js")){t((0,a.resolve)((0,a.dirname)(e),"..","bin"))}},"remark-prism"({id:e,emitAssetDirectory:t}){const r="remark-prism/src/highlight.js";if(e.endsWith(r)){try{const s=e.slice(0,-r.length);t((0,a.resolve)(s,"prismjs","components"))}catch(e){}}},semver({id:e,emitAsset:t}){if(e.endsWith("semver/index.js")){t((0,a.resolve)(e.replace("index.js","preload.js")))}},"socket.io":async function({id:e,ast:t,job:r}){if(e.endsWith("socket.io/lib/index.js")){async function replaceResolvePathStatement(t){if(t.type==="ExpressionStatement"&&t.expression.type==="AssignmentExpression"&&t.expression.operator==="="&&t.expression.right.type==="CallExpression"&&t.expression.right.callee.type==="Identifier"&&t.expression.right.callee.name==="read"&&t.expression.right.arguments.length>=1&&t.expression.right.arguments[0].type==="CallExpression"&&t.expression.right.arguments[0].callee.type==="Identifier"&&t.expression.right.arguments[0].callee.name==="resolvePath"&&t.expression.right.arguments[0].arguments.length===1&&t.expression.right.arguments[0].arguments[0].type==="Literal"){const s=t.expression.right.arguments[0].arguments[0].value;let u;try{const t=await(0,o.default)(String(s),e,r);if(typeof t==="string"){u=t}else{return undefined}}catch(e){return undefined}const c="/"+(0,a.relative)((0,a.dirname)(e),u);t.expression.right.arguments[0]={type:"BinaryExpression",start:t.expression.right.arguments[0].start,end:t.expression.right.arguments[0].end,operator:"+",left:{type:"Identifier",name:"__dirname"},right:{type:"Literal",value:c,raw:JSON.stringify(c)}}}return undefined}for(const e of t.body){if(e.type==="ExpressionStatement"&&e.expression.type==="AssignmentExpression"&&e.expression.operator==="="&&e.expression.left.type==="MemberExpression"&&e.expression.left.object.type==="MemberExpression"&&e.expression.left.object.object.type==="Identifier"&&e.expression.left.object.object.name==="Server"&&e.expression.left.object.property.type==="Identifier"&&e.expression.left.object.property.name==="prototype"&&e.expression.left.property.type==="Identifier"&&e.expression.left.property.name==="serveClient"&&e.expression.right.type==="FunctionExpression"){for(const t of e.expression.right.body.body){if(t.type==="IfStatement"&&t.consequent&&"body"in t.consequent&&t.consequent.body){const e=t.consequent.body;let r=false;if(Array.isArray(e)&&e[0]&&e[0].type==="ExpressionStatement"){r=await replaceResolvePathStatement(e[0])}if(Array.isArray(e)&&e[1]&&e[1].type==="TryStatement"&&e[1].block.body&&e[1].block.body[0]){r=await replaceResolvePathStatement(e[1].block.body[0])||r}return}}}}}},typescript({id:e,emitAssetDirectory:t}){if(e.endsWith("typescript/lib/tsc.js")){t((0,a.resolve)(e,"../"))}},"uglify-es"({id:e,emitAsset:t}){if(e.endsWith("uglify-es/tools/node.js")){t((0,a.resolve)(e,"../../lib/utils.js"));t((0,a.resolve)(e,"../../lib/ast.js"));t((0,a.resolve)(e,"../../lib/parse.js"));t((0,a.resolve)(e,"../../lib/transform.js"));t((0,a.resolve)(e,"../../lib/scope.js"));t((0,a.resolve)(e,"../../lib/output.js"));t((0,a.resolve)(e,"../../lib/compress.js"));t((0,a.resolve)(e,"../../lib/sourcemap.js"));t((0,a.resolve)(e,"../../lib/mozilla-ast.js"));t((0,a.resolve)(e,"../../lib/propmangle.js"));t((0,a.resolve)(e,"../../lib/minify.js"));t((0,a.resolve)(e,"../exports.js"))}},"uglify-js"({id:e,emitAsset:t,emitAssetDirectory:r}){if(e.endsWith("uglify-js/tools/node.js")){r((0,a.resolve)(e,"../../lib"));t((0,a.resolve)(e,"../exports.js"))}},"playwright-core"({id:e,emitAsset:t}){if(e.endsWith("playwright-core/index.js")){t((0,a.resolve)((0,a.dirname)(e),"browsers.json"))}},"geo-tz"({id:e,emitAsset:t}){if(e.endsWith("geo-tz/dist/geo-tz.js")){t((0,a.resolve)((0,a.dirname)(e),"../data/geo.dat"))}},pixelmatch({id:e,emitDependency:t}){if(e.endsWith("pixelmatch/index.js")){t((0,a.resolve)((0,a.dirname)(e),"bin/pixelmatch"))}}};async function handleSpecialCases({id:e,ast:t,emitDependency:r,emitAsset:s,emitAssetDirectory:a,job:o}){const c=(0,u.getPackageName)(e);const d=f[c||""];e=e.replace(/\\/g,"/");if(d)await d({id:e,ast:t,emitDependency:r,emitAsset:s,emitAssetDirectory:a,job:o})}t["default"]=handleSpecialCases},4370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wildcardRegEx=t.WILDCARD=t.FUNCTION=t.UNKNOWN=t.evaluate=void 0;const s=r(7310);async function evaluate(e,t={},r=true){const s={computeBranches:r,vars:t};return walk(e);function walk(e){const t=a[e.type];if(t){return t.call(s,e,walk)}return undefined}}t.evaluate=evaluate;t.UNKNOWN=Symbol();t.FUNCTION=Symbol();t.WILDCARD="";t.wildcardRegEx=/\x1a/g;function countWildcards(e){t.wildcardRegEx.lastIndex=0;let r=0;while(t.wildcardRegEx.exec(e))r++;return r}const a={ArrayExpression:async function ArrayExpression(e,t){const r=[];for(let s=0,a=e.elements.length;ss.value}}}return undefined},BinaryExpression:async function BinaryExpression(e,r){const s=e.operator;let a=await r(e.left);if(!a&&s!=="+")return;let o=await r(e.right);if(!a&&!o)return;if(!a){if(this.computeBranches&&o&&"value"in o&&typeof o.value==="string")return{value:t.WILDCARD+o.value,wildcards:[e.left,...o.wildcards||[]]};return}if(!o){if(this.computeBranches&&s==="+"){if(a&&"value"in a&&typeof a.value==="string")return{value:a.value+t.WILDCARD,wildcards:[...a.wildcards||[],e.right]}}if(!("test"in a)&&s==="||"&&a.value)return a;return}if("test"in a&&"value"in o){const e=o.value;if(s==="==")return{test:a.test,then:a.then==e,else:a.else==e};if(s==="===")return{test:a.test,then:a.then===e,else:a.else===e};if(s==="!=")return{test:a.test,then:a.then!=e,else:a.else!=e};if(s==="!==")return{test:a.test,then:a.then!==e,else:a.else!==e};if(s==="+")return{test:a.test,then:a.then+e,else:a.else+e};if(s==="-")return{test:a.test,then:a.then-e,else:a.else-e};if(s==="*")return{test:a.test,then:a.then*e,else:a.else*e};if(s==="/")return{test:a.test,then:a.then/e,else:a.else/e};if(s==="%")return{test:a.test,then:a.then%e,else:a.else%e};if(s==="<")return{test:a.test,then:a.then")return{test:a.test,then:a.then>e,else:a.else>e};if(s===">=")return{test:a.test,then:a.then>=e,else:a.else>=e};if(s==="|")return{test:a.test,then:a.then|e,else:a.else|e};if(s==="&")return{test:a.test,then:a.then&e,else:a.else&e};if(s==="^")return{test:a.test,then:a.then^e,else:a.else^e};if(s==="&&")return{test:a.test,then:a.then&&e,else:a.else&&e};if(s==="||")return{test:a.test,then:a.then||e,else:a.else||e}}else if("test"in o&&"value"in a){const e=a.value;if(s==="==")return{test:o.test,then:e==o.then,else:e==o.else};if(s==="===")return{test:o.test,then:e===o.then,else:e===o.else};if(s==="!=")return{test:o.test,then:e!=o.then,else:e!=o.else};if(s==="!==")return{test:o.test,then:e!==o.then,else:e!==o.else};if(s==="+")return{test:o.test,then:e+o.then,else:e+o.else};if(s==="-")return{test:o.test,then:e-o.then,else:e-o.else};if(s==="*")return{test:o.test,then:e*o.then,else:e*o.else};if(s==="/")return{test:o.test,then:e/o.then,else:e/o.else};if(s==="%")return{test:o.test,then:e%o.then,else:e%o.else};if(s==="<")return{test:o.test,then:e")return{test:o.test,then:e>o.then,else:e>o.else};if(s===">=")return{test:o.test,then:e>=o.then,else:e>=o.else};if(s==="|")return{test:o.test,then:e|o.then,else:e|o.else};if(s==="&")return{test:o.test,then:e&o.then,else:e&o.else};if(s==="^")return{test:o.test,then:e^o.then,else:e^o.else};if(s==="&&")return{test:o.test,then:e&&o.then,else:a&&o.else};if(s==="||")return{test:o.test,then:e||o.then,else:a||o.else}}else if("value"in a&&"value"in o){if(s==="==")return{value:a.value==o.value};if(s==="===")return{value:a.value===o.value};if(s==="!=")return{value:a.value!=o.value};if(s==="!==")return{value:a.value!==o.value};if(s==="+"){const e={value:a.value+o.value};let t=[];if("wildcards"in a&&a.wildcards){t=t.concat(a.wildcards)}if("wildcards"in o&&o.wildcards){t=t.concat(o.wildcards)}if(t.length>0){e.wildcards=t}return e}if(s==="-")return{value:a.value-o.value};if(s==="*")return{value:a.value*o.value};if(s==="/")return{value:a.value/o.value};if(s==="%")return{value:a.value%o.value};if(s==="<")return{value:a.value")return{value:a.value>o.value};if(s===">=")return{value:a.value>=o.value};if(s==="|")return{value:a.value|o.value};if(s==="&")return{value:a.value&o.value};if(s==="^")return{value:a.value^o.value};if(s==="&&")return{value:a.value&&o.value};if(s==="||")return{value:a.value||o.value}}return},CallExpression:async function CallExpression(e,r){const s=await r(e.callee);if(!s||"test"in s)return;let a=s.value;if(typeof a==="object"&&a!==null)a=a[t.FUNCTION];if(typeof a!=="function")return;let o=null;if(e.callee.object){o=await r(e.callee.object);o=o&&"value"in o&&o.value?o.value:null}let u;let c=[];let f;let d=e.arguments.length>0&&e.callee.property?.name!=="concat";const p=[];for(let s=0,a=e.arguments.length;sp.push(e)))}else{if(!this.computeBranches)return;a={value:t.WILDCARD};p.push(e.arguments[s])}if("test"in a){if(p.length)return;if(u)return;u=a.test;f=c.concat([]);c.push(a.then);f.push(a.else)}else{c.push(a.value);if(f)f.push(a.value)}}if(d)return;try{const e=await a.apply(o,c);if(e===t.UNKNOWN)return;if(!u){if(p.length){if(typeof e!=="string"||countWildcards(e)!==p.length)return;return{value:e,wildcards:p}}return{value:e}}const r=await a.apply(o,f);if(e===t.UNKNOWN)return;return{test:u,then:e,else:r}}catch(e){return}},ConditionalExpression:async function ConditionalExpression(e,t){const r=await t(e.test);if(r&&"value"in r)return r.value?t(e.consequent):t(e.alternate);if(!this.computeBranches)return;const s=await t(e.consequent);if(!s||"wildcards"in s||"test"in s)return;const a=await t(e.alternate);if(!a||"wildcards"in a||"test"in a)return;return{test:e.test,then:s.value,else:a.value}},ExpressionStatement:async function ExpressionStatement(e,t){return t(e.expression)},Identifier:async function Identifier(e,t){if(Object.hasOwnProperty.call(this.vars,e.name))return this.vars[e.name];return undefined},Literal:async function Literal(e,t){return{value:e.value}},MemberExpression:async function MemberExpression(e,r){const s=await r(e.object);if(!s||"test"in s||typeof s.value==="function"){return undefined}if(e.property.type==="Identifier"){if(typeof s.value==="string"&&e.property.name==="concat"){return{value:{[t.FUNCTION]:(...e)=>s.value.concat(e)}}}if(typeof s.value==="object"&&s.value!==null){const a=s.value;if(e.computed){const o=await r(e.property);if(o&&"value"in o&&o.value){const e=a[o.value];if(e===t.UNKNOWN)return undefined;return{value:e}}if(!a[t.UNKNOWN]&&Object.keys(s).length===0){return{value:undefined}}}else if(e.property.name in a){const r=a[e.property.name];if(r===t.UNKNOWN)return undefined;return{value:r}}else if(a[t.UNKNOWN])return undefined}else{return{value:undefined}}}const a=await r(e.property);if(!a||"test"in a)return undefined;if(typeof s.value==="object"&&s.value!==null){if(a.value in s.value){const e=s.value[a.value];if(e===t.UNKNOWN)return undefined;return{value:e}}else if(s.value[t.UNKNOWN]){return undefined}}else{return{value:undefined}}return undefined},MetaProperty:async function MetaProperty(e){if(e.meta.name==="import"&&e.property.name==="meta")return{value:this.vars["import.meta"]};return undefined},NewExpression:async function NewExpression(e,t){const r=await t(e.callee);if(r&&"value"in r&&r.value===s.URL&&e.arguments.length){const r=await t(e.arguments[0]);if(!r)return undefined;let a=null;if(e.arguments[1]){a=await t(e.arguments[1]);if(!a||!("value"in a))return undefined}if("value"in r){if(a){try{return{value:new s.URL(r.value,a.value)}}catch{return undefined}}try{return{value:new s.URL(r.value)}}catch{return undefined}}else{const e=r.test;if(a){try{return{test:e,then:new s.URL(r.then,a.value),else:new s.URL(r.else,a.value)}}catch{return undefined}}try{return{test:e,then:new s.URL(r.then),else:new s.URL(r.else)}}catch{return undefined}}}return undefined},ObjectExpression:async function ObjectExpression(e,r){const s={};for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.handleWrappers=void 0;const s=r(3982);function isUndefinedOrVoid(e){return e.type==="Identifier"&&e.name==="undefined"||e.type==="UnaryExpression"&&e.operator==="void"&&e.argument.type==="Literal"&&e.argument.value===0}function handleWrappers(e){let t;if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="UnaryExpression"&&e.body[0].expression.operator==="!"&&e.body[0].expression.argument.type==="CallExpression"&&e.body[0].expression.argument.callee.type==="FunctionExpression"&&e.body[0].expression.argument.arguments.length===1)t=e.body[0].expression.argument;else if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="CallExpression"&&e.body[0].expression.callee.type==="FunctionExpression"&&(e.body[0].expression.arguments.length===1||e.body[0].expression.arguments.length===0))t=e.body[0].expression;else if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="AssignmentExpression"&&e.body[0].expression.left.type==="MemberExpression"&&e.body[0].expression.left.object.type==="Identifier"&&e.body[0].expression.left.object.name==="module"&&e.body[0].expression.left.property.type==="Identifier"&&e.body[0].expression.left.property.name==="exports"&&e.body[0].expression.right.type==="CallExpression"&&e.body[0].expression.right.callee.type==="FunctionExpression"&&e.body[0].expression.right.arguments.length===1)t=e.body[0].expression.right;if(t){let e;let r;if(t.arguments[0]&&t.arguments[0].type==="ConditionalExpression"&&t.arguments[0].test.type==="LogicalExpression"&&t.arguments[0].test.operator==="&&"&&t.arguments[0].test.left.type==="BinaryExpression"&&t.arguments[0].test.left.operator==="==="&&t.arguments[0].test.left.left.type==="UnaryExpression"&&t.arguments[0].test.left.left.operator==="typeof"&&"name"in t.arguments[0].test.left.left.argument&&t.arguments[0].test.left.left.argument.name==="define"&&t.arguments[0].test.left.right.type==="Literal"&&t.arguments[0].test.left.right.value==="function"&&t.arguments[0].test.right.type==="MemberExpression"&&t.arguments[0].test.right.object.type==="Identifier"&&t.arguments[0].test.right.property.type==="Identifier"&&t.arguments[0].test.right.property.name==="amd"&&t.arguments[0].test.right.computed===false&&t.arguments[0].alternate.type==="FunctionExpression"&&t.arguments[0].alternate.params.length===1&&t.arguments[0].alternate.params[0].type==="Identifier"&&t.arguments[0].alternate.body.body.length===1&&t.arguments[0].alternate.body.body[0].type==="ExpressionStatement"&&t.arguments[0].alternate.body.body[0].expression.type==="AssignmentExpression"&&t.arguments[0].alternate.body.body[0].expression.left.type==="MemberExpression"&&t.arguments[0].alternate.body.body[0].expression.left.object.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.left.object.name==="module"&&t.arguments[0].alternate.body.body[0].expression.left.property.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.left.property.name==="exports"&&t.arguments[0].alternate.body.body[0].expression.left.computed===false&&t.arguments[0].alternate.body.body[0].expression.right.type==="CallExpression"&&t.arguments[0].alternate.body.body[0].expression.right.callee.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.right.callee.name===t.arguments[0].alternate.params[0].name&&"body"in t.callee&&"body"in t.callee.body&&Array.isArray(t.callee.body.body)&&t.arguments[0].alternate.body.body[0].expression.right.arguments.length===1&&t.arguments[0].alternate.body.body[0].expression.right.arguments[0].type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.right.arguments[0].name==="require"){let e=t.callee.body.body;if(e[0].type==="ExpressionStatement"&&e[0].expression.type==="Literal"&&e[0].expression.value==="use strict"){e=e.slice(1)}if(e.length===1&&e[0].type==="ExpressionStatement"&&e[0].expression.type==="CallExpression"&&e[0].expression.callee.type==="Identifier"&&e[0].expression.callee.name===t.arguments[0].test.right.object.name&&e[0].expression.arguments.length===1&&e[0].expression.arguments[0].type==="FunctionExpression"&&e[0].expression.arguments[0].params.length===1&&e[0].expression.arguments[0].params[0].type==="Identifier"&&e[0].expression.arguments[0].params[0].name==="require"){const t=e[0].expression.arguments[0];t.params=[];try{delete t.scope.declarations.require}catch(e){}}}else if(t.arguments[0]&&t.arguments[0].type==="FunctionExpression"&&t.arguments[0].params.length===0&&(t.arguments[0].body.body.length===1||t.arguments[0].body.body.length===2&&t.arguments[0].body.body[0].type==="VariableDeclaration"&&t.arguments[0].body.body[0].declarations.length===3&&t.arguments[0].body.body[0].declarations.every((e=>e.init===null&&e.id.type==="Identifier")))&&t.arguments[0].body.body[t.arguments[0].body.body.length-1].type==="ReturnStatement"&&(e=t.arguments[0].body.body[t.arguments[0].body.body.length-1])&&e.argument?.type==="CallExpression"&&e.argument.arguments.length&&e.argument.arguments.every((e=>e&&e.type==="Literal"&&typeof e.value==="number"))&&e.argument.callee.type==="CallExpression"&&(e.argument.callee.callee.type==="FunctionExpression"||e.argument.callee.callee.type==="CallExpression"&&e.argument.callee.callee.callee.type==="FunctionExpression"&&e.argument.callee.callee.arguments.length===0)&&e.argument.callee.arguments.length===3&&e.argument.callee.arguments[0].type==="ObjectExpression"&&e.argument.callee.arguments[1].type==="ObjectExpression"&&e.argument.callee.arguments[2].type==="ArrayExpression"){const t=e.argument.callee.arguments[0].properties;const r={};if(t.every((e=>{if(e.type!=="Property"||e.computed!==false||e.key.type!=="Literal"||typeof e.key.value!=="number"||e.value.type!=="ArrayExpression"||e.value.elements.length!==2||!e.value.elements[0]||!e.value.elements[1]||e.value.elements[0].type!=="FunctionExpression"||e.value.elements[1].type!=="ObjectExpression"){return false}const t=e.value.elements[1].properties;for(const e of t){if(e.type!=="Property"||e.value.type!=="Identifier"&&e.value.type!=="Literal"&&!isUndefinedOrVoid(e.value)||!(e.key.type==="Literal"&&typeof e.key.value==="string"||e.key.type==="Identifier")||e.computed){return false}if(isUndefinedOrVoid(e.value)){if(e.key.type==="Identifier"){r[e.key.name]={type:"Literal",start:e.key.start,end:e.key.end,value:e.key.name,raw:JSON.stringify(e.key.name)}}else if(e.key.type==="Literal"){r[String(e.key.value)]=e.key}}}return true}))){const t=Object.keys(r);const s=e.argument.callee.arguments[1];s.properties=t.map((e=>({type:"Property",method:false,shorthand:false,computed:false,kind:"init",key:r[e],value:{type:"ObjectExpression",properties:[{type:"Property",kind:"init",method:false,shorthand:false,computed:false,key:{type:"Identifier",name:"exports"},value:{type:"CallExpression",optional:false,callee:{type:"Identifier",name:"require"},arguments:[r[e]]}}]}})))}}else if(t.arguments[0]&&t.arguments[0].type==="FunctionExpression"&&t.arguments[0].params.length===2&&t.arguments[0].params[0].type==="Identifier"&&t.arguments[0].params[1].type==="Identifier"&&"body"in t.callee&&"body"in t.callee.body&&Array.isArray(t.callee.body.body)&&t.callee.body.body.length===1){const e=t.callee.body.body[0];if(e.type==="IfStatement"&&e.test.type==="LogicalExpression"&&e.test.operator==="&&"&&e.test.left.type==="BinaryExpression"&&e.test.left.left.type==="UnaryExpression"&&e.test.left.left.operator==="typeof"&&e.test.left.left.argument.type==="Identifier"&&e.test.left.left.argument.name==="module"&&e.test.left.right.type==="Literal"&&e.test.left.right.value==="object"&&e.test.right.type==="BinaryExpression"&&e.test.right.left.type==="UnaryExpression"&&e.test.right.left.operator==="typeof"&&e.test.right.left.argument.type==="MemberExpression"&&e.test.right.left.argument.object.type==="Identifier"&&e.test.right.left.argument.object.name==="module"&&e.test.right.left.argument.property.type==="Identifier"&&e.test.right.left.argument.property.name==="exports"&&e.test.right.right.type==="Literal"&&e.test.right.right.value==="object"&&e.consequent.type==="BlockStatement"&&e.consequent.body.length>0){let r;if(e.consequent.body[0].type==="VariableDeclaration"&&e.consequent.body[0].declarations[0].init&&e.consequent.body[0].declarations[0].init.type==="CallExpression")r=e.consequent.body[0].declarations[0].init;else if(e.consequent.body[0].type==="ExpressionStatement"&&e.consequent.body[0].expression.type==="CallExpression")r=e.consequent.body[0].expression;else if(e.consequent.body[0].type==="ExpressionStatement"&&e.consequent.body[0].expression.type==="AssignmentExpression"&&e.consequent.body[0].expression.operator==="="&&e.consequent.body[0].expression.right.type==="CallExpression")r=e.consequent.body[0].expression.right;if(r&&r.callee.type==="Identifier"&&"params"in t.callee&&t.callee.params.length>0&&"name"in t.callee.params[0]&&r.callee.name===t.callee.params[0].name&&r.arguments.length===2&&r.arguments[0].type==="Identifier"&&r.arguments[0].name==="require"&&r.arguments[1].type==="Identifier"&&r.arguments[1].name==="exports"){const e=t.arguments[0];e.params=[];try{const t=e.scope;delete t.declarations.require;delete t.declarations.exports}catch(e){}}}}else if(t.callee.type==="FunctionExpression"&&t.callee.body.body.length>2&&t.callee.body.body[0].type==="VariableDeclaration"&&t.callee.body.body[0].declarations.length===1&&t.callee.body.body[0].declarations[0].type==="VariableDeclarator"&&t.callee.body.body[0].declarations[0].id.type==="Identifier"&&t.callee.body.body[0].declarations[0].init&&(t.callee.body.body[0].declarations[0].init.type==="ObjectExpression"&&t.callee.body.body[0].declarations[0].init.properties.length===0||t.callee.body.body[0].declarations[0].init.type==="CallExpression"&&t.callee.body.body[0].declarations[0].init.arguments.length===1)&&(t.callee.body.body[1]&&t.callee.body.body[1].type==="FunctionDeclaration"&&t.callee.body.body[1].params.length===1&&t.callee.body.body[1].body.body.length>=3||t.callee.body.body[2]&&t.callee.body.body[2].type==="FunctionDeclaration"&&t.callee.body.body[2].params.length===1&&t.callee.body.body[2].body.body.length>=3)&&(t.arguments[0]&&(t.arguments[0].type==="ArrayExpression"&&(r=t.arguments[0])&&t.arguments[0].elements.length>0&&t.arguments[0].elements.every((e=>e&&e.type==="FunctionExpression"))||t.arguments[0].type==="ObjectExpression"&&(r=t.arguments[0])&&t.arguments[0].properties&&t.arguments[0].properties.length>0&&t.arguments[0].properties.every((e=>e&&e.type==="Property"&&!e.computed&&e.key&&e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number")&&e.value&&e.value.type==="FunctionExpression"))))||t.arguments.length===0&&t.callee.type==="FunctionExpression"&&t.callee.params.length===0&&t.callee.body.type==="BlockStatement"&&t.callee.body.body.length>5&&t.callee.body.body[0].type==="VariableDeclaration"&&t.callee.body.body[0].declarations.length===1&&t.callee.body.body[0].declarations[0].id.type==="Identifier"&&t.callee.body.body[1].type==="ExpressionStatement"&&t.callee.body.body[1].expression.type==="AssignmentExpression"&&t.callee.body.body[2].type==="ExpressionStatement"&&t.callee.body.body[2].expression.type==="AssignmentExpression"&&t.callee.body.body[3].type==="ExpressionStatement"&&t.callee.body.body[3].expression.type==="AssignmentExpression"&&t.callee.body.body[3].expression.left.type==="MemberExpression"&&t.callee.body.body[3].expression.left.object.type==="Identifier"&&t.callee.body.body[3].expression.left.object.name===t.callee.body.body[0].declarations[0].id.name&&t.callee.body.body[3].expression.left.property.type==="Identifier"&&t.callee.body.body[3].expression.left.property.name==="modules"&&t.callee.body.body[3].expression.right.type==="ObjectExpression"&&t.callee.body.body[3].expression.right.properties.every((e=>e&&e.type==="Property"&&!e.computed&&e.key&&e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number")&&e.value&&e.value.type==="FunctionExpression"))&&(r=t.callee.body.body[3].expression.right)&&(t.callee.body.body[4].type==="VariableDeclaration"&&t.callee.body.body[4].declarations.length===1&&t.callee.body.body[4].declarations[0].init&&t.callee.body.body[4].declarations[0].init.type==="CallExpression"&&t.callee.body.body[4].declarations[0].init.callee.type==="Identifier"&&t.callee.body.body[4].declarations[0].init.callee.name==="require"||t.callee.body.body[5].type==="VariableDeclaration"&&t.callee.body.body[5].declarations.length===1&&t.callee.body.body[5].declarations[0].init&&t.callee.body.body[5].declarations[0].init.type==="CallExpression"&&t.callee.body.body[5].declarations[0].init.callee.type==="Identifier"&&t.callee.body.body[5].declarations[0].init.callee.name==="require")){const e=new Map;let t;if(r.type==="ArrayExpression")t=r.elements.filter((e=>e?.type==="FunctionExpression")).map(((e,t)=>[String(t),e]));else t=r.properties.map((e=>[String(e.key.value),e.value]));for(const[r,s]of t){const t=s.body.body.length===1?s.body.body[0]:(s.body.body.length===2||s.body.body.length===3&&s.body.body[2].type==="EmptyStatement")&&s.body.body[0].type==="ExpressionStatement"&&s.body.body[0].expression.type==="Literal"&&s.body.body[0].expression.value==="use strict"?s.body.body[1]:null;if(t&&t.type==="ExpressionStatement"&&t.expression.type==="AssignmentExpression"&&t.expression.operator==="="&&t.expression.left.type==="MemberExpression"&&t.expression.left.object.type==="Identifier"&&"params"in s&&s.params.length>0&&"name"in s.params[0]&&t.expression.left.object.name===s.params[0].name&&t.expression.left.property.type==="Identifier"&&t.expression.left.property.name==="exports"&&t.expression.right.type==="CallExpression"&&t.expression.right.callee.type==="Identifier"&&t.expression.right.callee.name==="require"&&t.expression.right.arguments.length===1&&t.expression.right.arguments[0].type==="Literal"){e.set(r,t.expression.right.arguments[0].value)}}for(const[,r]of t){if("params"in r&&r.params.length===3&&r.params[2].type==="Identifier"){const t=new Map;(0,s.walk)(r.body,{enter(s,a){const o=s;const u=a;if(o.type==="CallExpression"&&o.callee.type==="Identifier"&&"name"in r.params[2]&&o.callee.name===r.params[2].name&&o.arguments.length===1&&o.arguments[0].type==="Literal"){const r=e.get(String(o.arguments[0].value));if(r){const e={type:"CallExpression",optional:false,callee:{type:"Identifier",name:"require"},arguments:[{type:"Literal",value:r}]};const s=u;if("right"in s&&s.right===o){s.right=e}else if("left"in s&&s.left===o){s.left=e}else if("object"in s&&s.object===o){s.object=e}else if("callee"in s&&s.callee===o){s.callee=e}else if("arguments"in s&&s.arguments.some((e=>e===o))){s.arguments=s.arguments.map((t=>t===o?e:t))}else if("init"in s&&s.init===o){if(s.type==="VariableDeclarator"&&s.id.type==="Identifier")t.set(s.id.name,r);s.init=e}}}else if(o.type==="CallExpression"&&o.callee.type==="MemberExpression"&&o.callee.object.type==="Identifier"&&"name"in r.params[2]&&o.callee.object.name===r.params[2].name&&o.callee.property.type==="Identifier"&&o.callee.property.name==="n"&&o.arguments.length===1&&o.arguments[0].type==="Identifier"){if(u&&"init"in u&&u.init===o){const e=o.arguments[0];const t={type:"CallExpression",optional:false,callee:{type:"MemberExpression",computed:false,optional:false,object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"assign"}},arguments:[{type:"ArrowFunctionExpression",expression:true,params:[],body:e},{type:"ObjectExpression",properties:[{type:"Property",kind:"init",method:false,computed:false,shorthand:false,key:{type:"Identifier",name:"a"},value:e}]}]};u.init=t}}}})}}}}}t.handleWrappers=handleWrappers},351:(e,t)=>{e.exports=t=abbrev.abbrev=abbrev;abbrev.monkeyPatch=monkeyPatch;function monkeyPatch(){Object.defineProperty(Array.prototype,"abbrev",{value:function(){return abbrev(this)},enumerable:false,configurable:true,writable:true});Object.defineProperty(Object.prototype,"abbrev",{value:function(){return abbrev(Object.keys(this))},enumerable:false,configurable:true,writable:true})}function abbrev(e){if(arguments.length!==1||!Array.isArray(e)){e=Array.prototype.slice.call(arguments,0)}for(var t=0,r=e.length,s=[];tt?1:-1}},878:e=>{"use strict";function isArguments(e){return e!=null&&typeof e==="object"&&e.hasOwnProperty("callee")}var t={"*":{label:"any",check:function(){return true}},A:{label:"array",check:function(e){return Array.isArray(e)||isArguments(e)}},S:{label:"string",check:function(e){return typeof e==="string"}},N:{label:"number",check:function(e){return typeof e==="number"}},F:{label:"function",check:function(e){return typeof e==="function"}},O:{label:"object",check:function(e){return typeof e==="object"&&e!=null&&!t.A.check(e)&&!t.E.check(e)}},B:{label:"boolean",check:function(e){return typeof e==="boolean"}},E:{label:"error",check:function(e){return e instanceof Error}},Z:{label:"null",check:function(e){return e==null}}};function addSchema(e,t){var r=t[e.length]=t[e.length]||[];if(r.indexOf(e)===-1)r.push(e)}var r=e.exports=function(e,r){if(arguments.length!==2)throw wrongNumberOfArgs(["SA"],arguments.length);if(!e)throw missingRequiredArg(0,"rawSchemas");if(!r)throw missingRequiredArg(1,"args");if(!t.S.check(e))throw invalidType(0,["string"],e);if(!t.A.check(r))throw invalidType(1,["array"],r);var s=e.split("|");var a={};s.forEach((function(e){for(var r=0;r{"use strict";t.TrackerGroup=r(308);t.Tracker=r(7605);t.TrackerStream=r(374)},5299:(e,t,r)=>{"use strict";var s=r(2361).EventEmitter;var a=r(3837);var o=0;var u=e.exports=function(e){s.call(this);this.id=++o;this.name=e};a.inherits(u,s)},308:(e,t,r)=>{"use strict";var s=r(3837);var a=r(5299);var o=r(7605);var u=r(374);var c=e.exports=function(e){a.call(this,e);this.parentGroup=null;this.trackers=[];this.completion={};this.weight={};this.totalWeight=0;this.finished=false;this.bubbleChange=bubbleChange(this)};s.inherits(c,a);function bubbleChange(e){return function(t,r,s){e.completion[s.id]=r;if(e.finished)return;e.emit("change",t||e.name,e.completed(),e)}}c.prototype.nameInTree=function(){var e=[];var t=this;while(t){e.unshift(t.name);t=t.parentGroup}return e.join("/")};c.prototype.addUnit=function(e,t){if(e.addUnit){var r=this;while(r){if(e===r){throw new Error("Attempted to add tracker group "+e.name+" to tree that already includes it "+this.nameInTree(this))}r=r.parentGroup}e.parentGroup=this}this.weight[e.id]=t||1;this.totalWeight+=this.weight[e.id];this.trackers.push(e);this.completion[e.id]=e.completed();e.on("change",this.bubbleChange);if(!this.finished)this.emit("change",e.name,this.completion[e.id],e);return e};c.prototype.completed=function(){if(this.trackers.length===0)return 0;var e=1/this.totalWeight;var t=0;for(var r=0;r{"use strict";var s=r(3837);var a=r(8511);var o=r(857);var u=r(7605);var c=e.exports=function(e,t,r){a.Transform.call(this,r);this.tracker=new u(e,t);this.name=e;this.id=this.tracker.id;this.tracker.on("change",delegateChange(this))};s.inherits(c,a.Transform);function delegateChange(e){return function(t,r,s){e.emit("change",t,r,e)}}c.prototype._transform=function(e,t,r){this.tracker.completeWork(e.length?e.length:1);this.push(e);r()};c.prototype._flush=function(e){this.tracker.finish();e()};o(c.prototype,"tracker").method("completed").method("addWork").method("finish")},7605:(e,t,r)=>{"use strict";var s=r(3837);var a=r(5299);var o=e.exports=function(e,t){a.call(this,e);this.workDone=0;this.workTodo=t||0};s.inherits(o,a);o.prototype.completed=function(){return this.workTodo===0?0:this.workDone/this.workTodo};o.prototype.addWork=function(e){this.workTodo+=e;this.emit("change",this.name,this.completed(),this)};o.prototype.completeWork=function(e){this.workDone+=e;if(this.workDone>this.workTodo)this.workDone=this.workTodo;this.emit("change",this.name,this.completed(),this)};o.prototype.finish=function(){this.workTodo=this.workDone=1;this.emit("change",this.name,1,this)}},3331:(module,exports,__nccwpck_require__)=>{var fs=__nccwpck_require__(7147),path=__nccwpck_require__(1017),fileURLToPath=__nccwpck_require__(7121),join=path.join,dirname=path.dirname,exists=fs.accessSync&&function(e){try{fs.accessSync(e)}catch(e){return false}return true}||fs.existsSync||path.existsSync,defaults={arrow:process.env.NODE_BINDINGS_ARROW||" → ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","addon-build","release","install-root","bindings"],["module_root","addon-build","debug","install-root","bindings"],["module_root","addon-build","default","install-root","bindings"],["module_root","lib","binding","nodePreGyp","bindings"]]};function bindings(opts){if(typeof opts=="string"){opts={bindings:opts}}else if(!opts){opts={}}Object.keys(defaults).map((function(e){if(!(e in opts))opts[e]=defaults[e]}));if(!opts.module_root){opts.module_root=exports.getRoot(exports.getFileName())}if(path.extname(opts.bindings)!=".node"){opts.bindings+=".node"}var requireFunc=true?eval("require"):0;var tries=[],i=0,l=opts.try.length,n,b,err;for(;i{"use strict";e.exports=function(e,t){if(e===null||e===undefined){throw TypeError()}e=String(e);var r=e.length;var s=t?Number(t):0;if(Number.isNaN(s)){s=0}if(s<0||s>=r){return undefined}var a=e.charCodeAt(s);if(a>=55296&&a<=56319&&r>s+1){var o=e.charCodeAt(s+1);if(o>=56320&&o<=57343){return(a-55296)*1024+o-56320+65536}}return a}},3844:(e,t)=>{"use strict";var r="[";t.up=function up(e){return r+(e||"")+"A"};t.down=function down(e){return r+(e||"")+"B"};t.forward=function forward(e){return r+(e||"")+"C"};t.back=function back(e){return r+(e||"")+"D"};t.nextLine=function nextLine(e){return r+(e||"")+"E"};t.previousLine=function previousLine(e){return r+(e||"")+"F"};t.horizontalAbsolute=function horizontalAbsolute(e){if(e==null)throw new Error("horizontalAboslute requires a column to position to");return r+e+"G"};t.eraseData=function eraseData(){return r+"J"};t.eraseLine=function eraseLine(){return r+"K"};t.goto=function(e,t){return r+t+";"+e+"H"};t.gotoSOL=function(){return"\r"};t.beep=function(){return""};t.hideCursor=function hideCursor(){return r+"?25l"};t.showCursor=function showCursor(){return r+"?25h"};var s={reset:0,bold:1,italic:3,underline:4,inverse:7,stopBold:22,stopItalic:23,stopUnderline:24,stopInverse:27,white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,bgWhite:47,bgBlack:40,bgBlue:44,bgCyan:46,bgGreen:42,bgMagenta:45,bgRed:41,bgYellow:43,grey:90,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97,bgGrey:100,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107};t.color=function color(e){if(arguments.length!==1||!Array.isArray(e)){e=Array.prototype.slice.call(arguments)}return r+e.map(colorNameToCode).join(";")+"m"};function colorNameToCode(e){if(s[e]!=null)return s[e];throw new Error("Unknown color or style name: "+e)}},1504:(e,t)=>{function isArray(e){if(Array.isArray){return Array.isArray(e)}return objectToString(e)==="[object Array]"}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return objectToString(e)==="[object Date]"}t.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}t.isError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=Buffer.isBuffer;function objectToString(e){return Object.prototype.toString.call(e)}},857:e=>{e.exports=Delegator;function Delegator(e,t){if(!(this instanceof Delegator))return new Delegator(e,t);this.proto=e;this.target=t;this.methods=[];this.getters=[];this.setters=[];this.fluents=[]}Delegator.prototype.method=function(e){var t=this.proto;var r=this.target;this.methods.push(e);t[e]=function(){return this[r][e].apply(this[r],arguments)};return this};Delegator.prototype.access=function(e){return this.getter(e).setter(e)};Delegator.prototype.getter=function(e){var t=this.proto;var r=this.target;this.getters.push(e);t.__defineGetter__(e,(function(){return this[r][e]}));return this};Delegator.prototype.setter=function(e){var t=this.proto;var r=this.target;this.setters.push(e);t.__defineSetter__(e,(function(t){return this[r][e]=t}));return this};Delegator.prototype.fluent=function(e){var t=this.proto;var r=this.target;this.fluents.push(e);t[e]=function(t){if("undefined"!=typeof t){this[r][e]=t;return this}else{return this[r][e]}};return this}},5104:(e,t,r)=>{"use strict";var s=r(2037).platform();var a=r(2081).spawnSync;var o=r(7147).readdirSync;var u="glibc";var c="musl";var f={encoding:"utf8",env:process.env};if(!a){a=function(){return{status:126,stdout:"",stderr:""}}}function contains(e){return function(t){return t.indexOf(e)!==-1}}function versionFromMuslLdd(e){return e.split(/[\r\n]+/)[1].trim().split(/\s/)[1]}function safeReaddirSync(e){try{return o(e)}catch(e){}return[]}var d="";var p="";var h="";if(s==="linux"){var v=a("getconf",["GNU_LIBC_VERSION"],f);if(v.status===0){d=u;p=v.stdout.trim().split(" ")[1];h="getconf"}else{var D=a("ldd",["--version"],f);if(D.status===0&&D.stdout.indexOf(c)!==-1){d=c;p=versionFromMuslLdd(D.stdout);h="ldd"}else if(D.status===1&&D.stderr.indexOf(c)!==-1){d=c;p=versionFromMuslLdd(D.stderr);h="ldd"}else{var g=safeReaddirSync("/lib");if(g.some(contains("-linux-gnu"))){d=u;h="filesystem"}else if(g.some(contains("libc.musl-"))){d=c;h="filesystem"}else if(g.some(contains("ld-musl-"))){d=c;h="filesystem"}else{var y=safeReaddirSync("/usr/sbin");if(y.some(contains("glibc"))){d=u;h="filesystem"}}}}}var m=d!==""&&d!==u;e.exports={GLIBC:u,MUSL:c,family:d,version:p,method:h,isNonGlibcLinux:m}},3876:e=>{"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},7121:(e,t,r)=>{var s=r(1017).sep||"/";e.exports=fileUriToPath;function fileUriToPath(e){if("string"!=typeof e||e.length<=7||"file://"!=e.substring(0,7)){throw new TypeError("must pass in a file:// URI to convert to a file path")}var t=decodeURI(e.substring(7));var r=t.indexOf("/");var a=t.substring(0,r);var o=t.substring(r+1);if("localhost"==a)a="";if(a){a=s+s+a}o=o.replace(/^(.+)\|/,"$1:");if(s=="\\"){o=o.replace(/\//g,"\\")}if(/^.+\:/.test(o)){}else{o=s+o}return a+o}},8862:(e,t,r)=>{"use strict";var s=r(5154);var a=r(2964);e.exports={activityIndicator:function(e,t,r){if(e.spun==null)return;return s(t,e.spun)},progressbar:function(e,t,r){if(e.completed==null)return;return a(t,r,e.completed)}}},2905:(e,t,r)=>{"use strict";var s=r(3837);var a=t.User=function User(e){var t=new Error(e);Error.captureStackTrace(t,User);t.code="EGAUGE";return t};t.MissingTemplateValue=function MissingTemplateValue(e,t){var r=new a(s.format('Missing template value "%s"',e.type));Error.captureStackTrace(r,MissingTemplateValue);r.template=e;r.values=t;return r};t.Internal=function Internal(e){var t=new Error(e);Error.captureStackTrace(t,Internal);t.code="EGAUGEINTERNAL";return t}},1191:e=>{"use strict";e.exports=isWin32()||isColorTerm();function isWin32(){return process.platform==="win32"}function isColorTerm(){var e=/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i;return!!process.env.COLORTERM||e.test(process.env.TERM)}},287:(e,t,r)=>{"use strict";var s=r(4052);var a=r(5214);var o=r(1191);var u=r(7234);var c=r(9986);var f=r(7131);var d=r(5751);var p=r(5498);e.exports=Gauge;function callWith(e,t){return function(){return t.call(e)}}function Gauge(e,t){var r,a;if(e&&e.write){a=e;r=t||{}}else if(t&&t.write){a=t;r=e||{}}else{a=d.stderr;r=e||t||{}}this._status={spun:0,section:"",subsection:""};this._paused=false;this._disabled=true;this._showing=false;this._onScreen=false;this._needsRedraw=false;this._hideCursor=r.hideCursor==null?true:r.hideCursor;this._fixedFramerate=r.fixedFramerate==null?!/^v0\.8\./.test(d.version):r.fixedFramerate;this._lastUpdateAt=null;this._updateInterval=r.updateInterval==null?50:r.updateInterval;this._themes=r.themes||c;this._theme=r.theme;var o=this._computeTheme(r.theme);var u=r.template||[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",kerning:1,default:""},{type:"subsection",kerning:1,default:""}];this.setWriteTo(a,r.tty);var f=r.Plumbing||s;this._gauge=new f(o,u,this.getWidth());this._$$doRedraw=callWith(this,this._doRedraw);this._$$handleSizeChange=callWith(this,this._handleSizeChange);this._cleanupOnExit=r.cleanupOnExit==null||r.cleanupOnExit;this._removeOnExit=null;if(r.enabled||r.enabled==null&&this._tty&&this._tty.isTTY){this.enable()}else{this.disable()}}Gauge.prototype={};Gauge.prototype.isEnabled=function(){return!this._disabled};Gauge.prototype.setTemplate=function(e){this._gauge.setTemplate(e);if(this._showing)this._requestRedraw()};Gauge.prototype._computeTheme=function(e){if(!e)e={};if(typeof e==="string"){e=this._themes.getTheme(e)}else if(e&&(Object.keys(e).length===0||e.hasUnicode!=null||e.hasColor!=null)){var t=e.hasUnicode==null?a():e.hasUnicode;var r=e.hasColor==null?o:e.hasColor;e=this._themes.getDefault({hasUnicode:t,hasColor:r,platform:e.platform})}return e};Gauge.prototype.setThemeset=function(e){this._themes=e;this.setTheme(this._theme)};Gauge.prototype.setTheme=function(e){this._gauge.setTheme(this._computeTheme(e));if(this._showing)this._requestRedraw();this._theme=e};Gauge.prototype._requestRedraw=function(){this._needsRedraw=true;if(!this._fixedFramerate)this._doRedraw()};Gauge.prototype.getWidth=function(){return(this._tty&&this._tty.columns||80)-1};Gauge.prototype.setWriteTo=function(e,t){var r=!this._disabled;if(r)this.disable();this._writeTo=e;this._tty=t||e===d.stderr&&d.stdout.isTTY&&d.stdout||e.isTTY&&e||this._tty;if(this._gauge)this._gauge.setWidth(this.getWidth());if(r)this.enable()};Gauge.prototype.enable=function(){if(!this._disabled)return;this._disabled=false;if(this._tty)this._enableEvents();if(this._showing)this.show()};Gauge.prototype.disable=function(){if(this._disabled)return;if(this._showing){this._lastUpdateAt=null;this._showing=false;this._doRedraw();this._showing=true}this._disabled=true;if(this._tty)this._disableEvents()};Gauge.prototype._enableEvents=function(){if(this._cleanupOnExit){this._removeOnExit=u(callWith(this,this.disable))}this._tty.on("resize",this._$$handleSizeChange);if(this._fixedFramerate){this.redrawTracker=f(this._$$doRedraw,this._updateInterval);if(this.redrawTracker.unref)this.redrawTracker.unref()}};Gauge.prototype._disableEvents=function(){this._tty.removeListener("resize",this._$$handleSizeChange);if(this._fixedFramerate)clearInterval(this.redrawTracker);if(this._removeOnExit)this._removeOnExit()};Gauge.prototype.hide=function(e){if(this._disabled)return e&&d.nextTick(e);if(!this._showing)return e&&d.nextTick(e);this._showing=false;this._doRedraw();e&&p(e)};Gauge.prototype.show=function(e,t){this._showing=true;if(typeof e==="string"){this._status.section=e}else if(typeof e==="object"){var r=Object.keys(e);for(var s=0;s{"use strict";var s=r(3844);var a=r(7238);var o=r(878);var u=e.exports=function(e,t,r){if(!r)r=80;o("OAN",[e,t,r]);this.showing=false;this.theme=e;this.width=r;this.template=t};u.prototype={};u.prototype.setTheme=function(e){o("O",[e]);this.theme=e};u.prototype.setTemplate=function(e){o("A",[e]);this.template=e};u.prototype.setWidth=function(e){o("N",[e]);this.width=e};u.prototype.hide=function(){return s.gotoSOL()+s.eraseLine()};u.prototype.hideCursor=s.hideCursor;u.prototype.showCursor=s.showCursor;u.prototype.show=function(e){var t=Object.create(this.theme);for(var r in e){t[r]=e[r]}return a(this.width,this.template,t).trim()+s.color("reset")+s.eraseLine()+s.gotoSOL()}},5751:e=>{"use strict";e.exports=process},2964:(e,t,r)=>{"use strict";var s=r(878);var a=r(7238);var o=r(5791);var u=r(8321);e.exports=function(e,t,r){s("ONN",[e,t,r]);if(r<0)r=0;if(r>1)r=1;if(t<=0)return"";var o=Math.round(t*r);var u=t-o;var c=[{type:"complete",value:repeat(e.complete,o),length:o},{type:"remaining",value:repeat(e.remaining,u),length:u}];return a(t,c,e)};function repeat(e,t){var r="";var s=t;do{if(s%2){r+=e}s=Math.floor(s/2);e+=e}while(s&&u(r){"use strict";var s=r(1365);var a=r(878);var o=r(3540);var u=r(5791);var c=r(2905);var f=r(8855);function renderValueWithValues(e){return function(t){return renderValue(t,e)}}var d=e.exports=function(e,t,r){var a=prepareItems(e,t,r);var o=a.map(renderValueWithValues(r)).join("");return s.left(u(o,e),e)};function preType(e){var t=e.type[0].toUpperCase()+e.type.slice(1);return"pre"+t}function postType(e){var t=e.type[0].toUpperCase()+e.type.slice(1);return"post"+t}function hasPreOrPost(e,t){if(!e.type)return;return t[preType(e)]||t[postType(e)]}function generatePreAndPost(e,t){var r=o({},e);var s=Object.create(t);var a=[];var u=preType(r);var c=postType(r);if(s[u]){a.push({value:s[u]});s[u]=null}r.minLength=null;r.length=null;r.maxLength=null;a.push(r);s[r.type]=s[r.type];if(s[c]){a.push({value:s[c]});s[c]=null}return function(e,t,r){return d(r,a,s)}}function prepareItems(e,t,r){function cloneAndObjectify(t,s,a){var o=new f(t,e);var u=o.type;if(o.value==null){if(!(u in r)){if(o.default==null){throw new c.MissingTemplateValue(o,r)}else{o.value=o.default}}else{o.value=r[u]}}if(o.value==null||o.value==="")return null;o.index=s;o.first=s===0;o.last=s===a.length-1;if(hasPreOrPost(o,r))o.value=generatePreAndPost(o,r);return o}var s=t.map(cloneAndObjectify).filter((function(e){return e!=null}));var a=0;var o=e;var u=s.length;function consumeSpace(e){if(e>o)e=o;a+=e;o-=e}function finishSizing(e,t){if(e.finished)throw new c.Internal("Tried to finish template item that was already finished");if(t===Infinity)throw new c.Internal("Length of template item cannot be infinity");if(t!=null)e.length=t;e.minLength=null;e.maxLength=null;--u;e.finished=true;if(e.length==null)e.length=e.getBaseLength();if(e.length==null)throw new c.Internal("Finished template items must have a length");consumeSpace(e.getLength())}s.forEach((function(e){if(!e.kerning)return;var t=e.first?0:s[e.index-1].padRight;if(!e.first&&t=h){finishSizing(e,e.minLength);p=true}}))}while(p&&d++{"use strict";var s=r(5751);try{e.exports=setImmediate}catch(t){e.exports=s.nextTick}},7131:e=>{"use strict";e.exports=setInterval},5154:e=>{"use strict";e.exports=function spin(e,t){return e[t%e.length]}},8855:(e,t,r)=>{"use strict";var s=r(8321);e.exports=TemplateItem;function isPercent(e){if(typeof e!=="string")return false;return e.slice(-1)==="%"}function percent(e){return Number(e.slice(0,-1))/100}function TemplateItem(e,t){this.overallOutputLength=t;this.finished=false;this.type=null;this.value=null;this.length=null;this.maxLength=null;this.minLength=null;this.kerning=null;this.align="left";this.padLeft=0;this.padRight=0;this.index=null;this.first=null;this.last=null;if(typeof e==="string"){this.value=e}else{for(var r in e)this[r]=e[r]}if(isPercent(this.length)){this.length=Math.round(this.overallOutputLength*percent(this.length))}if(isPercent(this.minLength)){this.minLength=Math.round(this.overallOutputLength*percent(this.minLength))}if(isPercent(this.maxLength)){this.maxLength=Math.round(this.overallOutputLength*percent(this.maxLength))}return this}TemplateItem.prototype={};TemplateItem.prototype.getBaseLength=function(){var e=this.length;if(e==null&&typeof this.value==="string"&&this.maxLength==null&&this.minLength==null){e=s(this.value)}return e};TemplateItem.prototype.getLength=function(){var e=this.getBaseLength();if(e==null)return null;return e+this.padLeft+this.padRight};TemplateItem.prototype.getMaxLength=function(){if(this.maxLength==null)return null;return this.maxLength+this.padLeft+this.padRight};TemplateItem.prototype.getMinLength=function(){if(this.minLength==null)return null;return this.minLength+this.padLeft+this.padRight}},8469:(e,t,r)=>{"use strict";var s=r(3540);e.exports=function(){return a.newThemeSet()};var a={};a.baseTheme=r(8862);a.newTheme=function(e,t){if(!t){t=e;e=this.baseTheme}return s({},e,t)};a.getThemeNames=function(){return Object.keys(this.themes)};a.addTheme=function(e,t,r){this.themes[e]=this.newTheme(t,r)};a.addToAllThemes=function(e){var t=this.themes;Object.keys(t).forEach((function(r){s(t[r],e)}));s(this.baseTheme,e)};a.getTheme=function(e){if(!this.themes[e])throw this.newMissingThemeError(e);return this.themes[e]};a.setDefault=function(e,t){if(t==null){t=e;e={}}var r=e.platform==null?"fallback":e.platform;var s=!!e.hasUnicode;var a=!!e.hasColor;if(!this.defaults[r])this.defaults[r]={true:{},false:{}};this.defaults[r][s][a]=t};a.getDefault=function(e){if(!e)e={};var t=e.platform||process.platform;var r=this.defaults[t]||this.defaults.fallback;var a=!!e.hasUnicode;var o=!!e.hasColor;if(!r)throw this.newMissingDefaultThemeError(t,a,o);if(!r[a][o]){if(a&&o&&r[!a][o]){a=false}else if(a&&o&&r[a][!o]){o=false}else if(a&&o&&r[!a][!o]){a=false;o=false}else if(a&&!o&&r[!a][o]){a=false}else if(!a&&o&&r[a][!o]){o=false}else if(r===this.defaults.fallback){throw this.newMissingDefaultThemeError(t,a,o)}}if(r[a][o]){return this.getTheme(r[a][o])}else{return this.getDefault(s({},e,{platform:"fallback"}))}};a.newMissingThemeError=function newMissingThemeError(e){var t=new Error('Could not find a gauge theme named "'+e+'"');Error.captureStackTrace.call(t,newMissingThemeError);t.theme=e;t.code="EMISSINGTHEME";return t};a.newMissingDefaultThemeError=function newMissingDefaultThemeError(e,t,r){var s=new Error("Could not find a gauge theme for your platform/unicode/color use combo:\n"+" platform = "+e+"\n"+" hasUnicode = "+t+"\n"+" hasColor = "+r);Error.captureStackTrace.call(s,newMissingDefaultThemeError);s.platform=e;s.hasUnicode=t;s.hasColor=r;s.code="EMISSINGTHEME";return s};a.newThemeSet=function(){var themeset=function(e){return themeset.getDefault(e)};return s(themeset,a,{themes:s({},this.themes),baseTheme:s({},this.baseTheme),defaults:JSON.parse(JSON.stringify(this.defaults||{}))})}},9986:(e,t,r)=>{"use strict";var s=r(3844);var a=r(8469);var o=e.exports=new a;o.addTheme("ASCII",{preProgressbar:"[",postProgressbar:"]",progressbarTheme:{complete:"#",remaining:"."},activityIndicatorTheme:"-\\|/",preSubsection:">"});o.addTheme("colorASCII",o.getTheme("ASCII"),{progressbarTheme:{preComplete:s.color("inverse"),complete:" ",postComplete:s.color("stopInverse"),preRemaining:s.color("brightBlack"),remaining:".",postRemaining:s.color("reset")}});o.addTheme("brailleSpinner",{preProgressbar:"⸨",postProgressbar:"⸩",progressbarTheme:{complete:"░",remaining:"⠂"},activityIndicatorTheme:"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏",preSubsection:">"});o.addTheme("colorBrailleSpinner",o.getTheme("brailleSpinner"),{progressbarTheme:{preComplete:s.color("inverse"),complete:" ",postComplete:s.color("stopInverse"),preRemaining:s.color("brightBlack"),remaining:"░",postRemaining:s.color("reset")}});o.setDefault({},"ASCII");o.setDefault({hasColor:true},"colorASCII");o.setDefault({platform:"darwin",hasUnicode:true},"brailleSpinner");o.setDefault({platform:"darwin",hasUnicode:true,hasColor:true},"colorBrailleSpinner")},5791:(e,t,r)=>{"use strict";var s=r(8321);var a=r(7518);e.exports=wideTruncate;function wideTruncate(e,t){if(s(e)===0)return e;if(t<=0)return"";if(s(e)<=t)return e;var r=a(e);var o=e.length+r.length;var u=e.slice(0,t+o);while(s(u)>t){u=u.slice(0,-1)}return u}},4444:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},9165:(e,t,r)=>{var s=r(7147);var a=r(8986);var o=r(7078);var u=r(4444);var c=r(3837);var f;var d;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){f=Symbol.for("graceful-fs.queue");d=Symbol.for("graceful-fs.previous")}else{f="___graceful-fs.queue";d="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,f,{get:function(){return t}})}var p=noop;if(c.debuglog)p=c.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))p=function(){var e=c.format.apply(c,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!s[f]){var h=global[f]||[];publishQueue(s,h);s.close=function(e){function close(t,r){return e.call(s,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,d,{value:e});return close}(s.close);s.closeSync=function(e){function closeSync(t){e.apply(s,arguments);resetQueue()}Object.defineProperty(closeSync,d,{value:e});return closeSync}(s.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){p(s[f]);r(9491).equal(s[f].length,0)}))}}if(!global[f]){publishQueue(global,s[f])}e.exports=patch(u(s));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched){e.exports=patch(s);s.__patched=true}function patch(e){a(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,s){if(typeof r==="function")s=r,r=null;return go$readFile(e,r,s);function go$readFile(e,r,s,a){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,s],t,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,s,a){if(typeof s==="function")a=s,s=null;return go$writeFile(e,t,s,a);function go$writeFile(e,t,s,a,o){return r(e,t,s,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,s,a],r,o||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var s=e.appendFile;if(s)e.appendFile=appendFile;function appendFile(e,t,r,a){if(typeof r==="function")a=r,r=null;return go$appendFile(e,t,r,a);function go$appendFile(e,t,r,a,o){return s(e,t,r,(function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,a],s,o||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var u=e.copyFile;if(u)e.copyFile=copyFile;function copyFile(e,t,r,s){if(typeof r==="function"){s=r;r=0}return go$copyFile(e,t,r,s);function go$copyFile(e,t,r,s,a){return u(e,t,r,(function(o){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,s],o,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}var c=e.readdir;e.readdir=readdir;var f=/^v[0-5]\./;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;var s=f.test(process.version)?function go$readdir(e,t,r,s){return c(e,fs$readdirCallback(e,t,r,s))}:function go$readdir(e,t,r,s){return c(e,t,fs$readdirCallback(e,t,r,s))};return s(e,t,r);function fs$readdirCallback(e,t,r,a){return function(o,u){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([s,[e,t,r],o,a||Date.now(),Date.now()]);else{if(u&&u.sort)u.sort();if(typeof r==="function")r.call(this,o,u)}}}}if(process.version.substr(0,4)==="v0.8"){var d=o(e);ReadStream=d.ReadStream;WriteStream=d.WriteStream}var p=e.ReadStream;if(p){ReadStream.prototype=Object.create(p.prototype);ReadStream.prototype.open=ReadStream$open}var h=e.WriteStream;if(h){WriteStream.prototype=Object.create(h.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var v=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(e){v=e},enumerable:true,configurable:true});var D=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return D},set:function(e){D=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return p.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return h.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var g=e.open;e.open=open;function open(e,t,r,s){if(typeof r==="function")s=r,r=null;return go$open(e,t,r,s);function go$open(e,t,r,s,a){return g(e,t,r,(function(o,u){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$open,[e,t,r,s],o,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}return e}function enqueue(e){p("ENQUEUE",e[0].name,e[1]);s[f].push(e);retry()}var v;function resetQueue(){var e=Date.now();for(var t=0;t2){s[f][t][3]=e;s[f][t][4]=e}}retry()}function retry(){clearTimeout(v);v=undefined;if(s[f].length===0)return;var e=s[f].shift();var t=e[0];var r=e[1];var a=e[2];var o=e[3];var u=e[4];if(o===undefined){p("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-o>=6e4){p("TIMEOUT",t.name,r);var c=r.pop();if(typeof c==="function")c.call(null,a)}else{var d=Date.now()-u;var h=Math.max(u-o,1);var D=Math.min(h*1.2,100);if(d>=D){p("RETRY",t.name,r);t.apply(null,r.concat([o]))}else{s[f].push(e)}}if(v===undefined){v=setTimeout(retry,0)}}},7078:(e,t,r)=>{var s=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);s.call(this);var a=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var u=0,c=o.length;uthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){a._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){a.emit("error",e);a.readable=false;return}a.fd=t;a.emit("open",t);a._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);s.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var a=Object.keys(r);for(var o=0,u=a.length;o= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},8986:(e,t,r)=>{var s=r(2057);var a=process.cwd;var o=null;var u=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=a.call(process);return o};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var c=process.chdir;process.chdir=function(e){o=null;c.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c)}e.exports=patch;function patch(e){if(s.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(e.chmod&&!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(e.chown&&!e.lchown){e.lchown=function(e,t,r,s){if(s)process.nextTick(s)};e.lchownSync=function(){}}if(u==="win32"){e.rename=typeof e.rename!=="function"?e.rename:function(t){function rename(r,s,a){var o=Date.now();var u=0;t(r,s,(function CB(c){if(c&&(c.code==="EACCES"||c.code==="EPERM")&&Date.now()-o<6e4){setTimeout((function(){e.stat(s,(function(e,o){if(e&&e.code==="ENOENT")t(r,s,CB);else a(c)}))}),u);if(u<100)u+=10;return}if(a)a(c)}))}if(Object.setPrototypeOf)Object.setPrototypeOf(rename,t);return rename}(e.rename)}e.read=typeof e.read!=="function"?e.read:function(t){function read(r,s,a,o,u,c){var f;if(c&&typeof c==="function"){var d=0;f=function(p,h,v){if(p&&p.code==="EAGAIN"&&d<10){d++;return t.call(e,r,s,a,o,u,f)}c.apply(this,arguments)}}return t.call(e,r,s,a,o,u,f)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=typeof e.readSync!=="function"?e.readSync:function(t){return function(r,s,a,o,u){var c=0;while(true){try{return t.call(e,r,s,a,o,u)}catch(e){if(e.code==="EAGAIN"&&c<10){c++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,a){e.open(t,s.O_WRONLY|s.O_SYMLINK,r,(function(t,s){if(t){if(a)a(t);return}e.fchmod(s,r,(function(t){e.close(s,(function(e){if(a)a(t||e)}))}))}))};e.lchmodSync=function(t,r){var a=e.openSync(t,s.O_WRONLY|s.O_SYMLINK,r);var o=true;var u;try{u=e.fchmodSync(a,r);o=false}finally{if(o){try{e.closeSync(a)}catch(e){}}else{e.closeSync(a)}}return u}}function patchLutimes(e){if(s.hasOwnProperty("O_SYMLINK")&&e.futimes){e.lutimes=function(t,r,a,o){e.open(t,s.O_SYMLINK,(function(t,s){if(t){if(o)o(t);return}e.futimes(s,r,a,(function(t){e.close(s,(function(e){if(o)o(t||e)}))}))}))};e.lutimesSync=function(t,r,a){var o=e.openSync(t,s.O_SYMLINK);var u;var c=true;try{u=e.futimesSync(o,r,a);c=false}finally{if(c){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return u}}else if(e.futimes){e.lutimes=function(e,t,r,s){if(s)process.nextTick(s)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,s,a){return t.call(e,r,s,(function(e){if(chownErOk(e))e=null;if(a)a.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,s){try{return t.call(e,r,s)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,s,a,o){return t.call(e,r,s,a,(function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,s,a){try{return t.call(e,r,s,a)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,s,a){if(typeof s==="function"){a=s;s=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(a)a.apply(this,arguments)}return s?t.call(e,r,s,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,s){var a=s?t.call(e,r,s):t.call(e,r);if(a){if(a.uid<0)a.uid+=4294967296;if(a.gid<0)a.gid+=4294967296}return a}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},5214:(e,t,r)=>{"use strict";var s=r(2037);var a=e.exports=function(){if(s.type()=="Windows_NT"){return false}var e=/UTF-?8$/i;var t=process.env.LC_ALL||process.env.LC_CTYPE||process.env.LANG;return e.test(t)}},2842:(e,t,r)=>{try{var s=r(3837);if(typeof s.inherits!=="function")throw"";e.exports=s.inherits}catch(t){e.exports=r(3782)}},3782:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},3279:(e,t,r)=>{"use strict";var s=r(3979);e.exports=function(e){if(s(e)){return false}if(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false}},8502:e=>{"use strict";const isFullwidthCodePoint=e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false};e.exports=isFullwidthCodePoint;e.exports["default"]=isFullwidthCodePoint},1551:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},7663:(module,__unused_webpack_exports,__nccwpck_require__)=>{var fs=__nccwpck_require__(7147);var path=__nccwpck_require__(1017);var os=__nccwpck_require__(2037);var runtimeRequire=true?eval("require"):0;var vars=process.config&&process.config.variables||{};var prebuildsOnly=!!process.env.PREBUILDS_ONLY;var abi=process.versions.modules;var runtime=isElectron()?"electron":"node";var arch=os.arch();var platform=os.platform();var libc=process.env.LIBC||(isAlpine(platform)?"musl":"glibc");var armv=process.env.ARM_VERSION||(arch==="arm64"?"8":vars.arm_version)||"";var uv=(process.versions.uv||"").split(".")[0];module.exports=load;function load(e){return runtimeRequire(load.path(e))}load.path=function(e){e=path.resolve(e||".");try{var t=runtimeRequire(path.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");if(process.env[t+"_PREBUILD"])e=process.env[t+"_PREBUILD"]}catch(e){}if(!prebuildsOnly){var r=getFirst(path.join(e,"build/Release"),matchBuild);if(r)return r;var s=getFirst(path.join(e,"build/Debug"),matchBuild);if(s)return s}var a=resolve(e);if(a)return a;var o=resolve(path.dirname(process.execPath));if(o)return o;var u=["platform="+platform,"arch="+arch,"runtime="+runtime,"abi="+abi,"uv="+uv,armv?"armv="+armv:"","libc="+libc,"node="+process.versions.node,process.versions&&process.versions.electron?"electron="+process.versions.electron:"",true?"webpack=true":0].filter(Boolean).join(" ");throw new Error("No native build was found for "+u+"\n loaded from: "+e+"\n");function resolve(e){var t=path.join(e,"prebuilds",platform+"-"+arch);var r=readdirSync(t).map(parseTags);var s=r.filter(matchTags(runtime,abi));var a=s.sort(compareTags(runtime))[0];if(a)return path.join(t,a.file)}};function readdirSync(e){try{return fs.readdirSync(e)}catch(e){return[]}}function getFirst(e,t){var r=readdirSync(e).filter(t);return r[0]&&path.join(e,r[0])}function matchBuild(e){return/\.node$/.test(e)}function parseTags(e){var t=e.split(".");var r=t.pop();var s={file:e,specificity:0};if(r!=="node")return;for(var a=0;ar.specificity?-1:1}else{return 0}}}function isElectron(){if(process.versions&&process.versions.electron)return true;if(process.env.ELECTRON_RUN_AS_NODE)return true;return typeof window!=="undefined"&&window.process&&window.process.type==="renderer"}function isAlpine(e){return e==="linux"&&fs.existsSync("/etc/alpine-release")}load.parseTags=parseTags;load.matchTags=matchTags;load.compareTags=compareTags},1758:(e,t,r)=>{var s=process.env.DEBUG_NOPT||process.env.NOPT_DEBUG?function(){console.error.apply(console,arguments)}:function(){};var a=r(7310),o=r(1017),u=r(2781).Stream,c=r(351),f=r(2037);e.exports=t=nopt;t.clean=clean;t.typeDefs={String:{type:String,validate:validateString},Boolean:{type:Boolean,validate:validateBoolean},url:{type:a,validate:validateUrl},Number:{type:Number,validate:validateNumber},path:{type:o,validate:validatePath},Stream:{type:u,validate:validateStream},Date:{type:Date,validate:validateDate}};function nopt(e,r,a,o){a=a||process.argv;e=e||{};r=r||{};if(typeof o!=="number")o=2;s(e,r,a,o);a=a.slice(o);var u={},c,f={remain:[],cooked:a,original:a.slice(0)};parse(a,u,f.remain,e,r);clean(u,e,t.typeDefs);u.argv=f;Object.defineProperty(u.argv,"toString",{value:function(){return this.original.map(JSON.stringify).join(" ")},enumerable:false});return u}function clean(e,r,a){a=a||t.typeDefs;var o={},u=[false,true,null,String,Array];Object.keys(e).forEach((function(c){if(c==="argv")return;var f=e[c],d=Array.isArray(f),p=r[c];if(!d)f=[f];if(!p)p=u;if(p===Array)p=u.concat(Array);if(!Array.isArray(p))p=[p];s("val=%j",f);s("types=",p);f=f.map((function(u){if(typeof u==="string"){s("string %j",u);u=u.trim();if(u==="null"&&~p.indexOf(null)||u==="true"&&(~p.indexOf(true)||~p.indexOf(Boolean))||u==="false"&&(~p.indexOf(false)||~p.indexOf(Boolean))){u=JSON.parse(u);s("jsonable %j",u)}else if(~p.indexOf(Number)&&!isNaN(u)){s("convert to number",u);u=+u}else if(~p.indexOf(Date)&&!isNaN(Date.parse(u))){s("convert to date",u);u=new Date(u)}}if(!r.hasOwnProperty(c)){return u}if(u===false&&~p.indexOf(null)&&!(~p.indexOf(false)||~p.indexOf(Boolean))){u=null}var f={};f[c]=u;s("prevalidated val",f,u,r[c]);if(!validate(f,c,u,r[c],a)){if(t.invalidHandler){t.invalidHandler(c,u,r[c],e)}else if(t.invalidHandler!==false){s("invalid: "+c+"="+u,r[c])}return o}s("validated val",f,u,r[c]);return f[c]})).filter((function(e){return e!==o}));if(!f.length&&p.indexOf(Array)===-1){s("VAL HAS NO LENGTH, DELETE IT",f,c,p.indexOf(Array));delete e[c]}else if(d){s(d,e[c],f);e[c]=f}else e[c]=f[0];s("k=%s val=%j",c,f,e[c])}))}function validateString(e,t,r){e[t]=String(r)}function validatePath(e,t,r){if(r===true)return false;if(r===null)return true;r=String(r);var s=process.platform==="win32",a=s?/^~(\/|\\)/:/^~\//,u=f.homedir();if(u&&r.match(a)){e[t]=o.resolve(u,r.substr(2))}else{e[t]=o.resolve(r)}return true}function validateNumber(e,t,r){s("validate Number %j %j %j",t,r,isNaN(r));if(isNaN(r))return false;e[t]=+r}function validateDate(e,t,r){var a=Date.parse(r);s("validate Date %j %j %j",t,r,a);if(isNaN(a))return false;e[t]=new Date(r)}function validateBoolean(e,t,r){if(r instanceof Boolean)r=r.valueOf();else if(typeof r==="string"){if(!isNaN(r))r=!!+r;else if(r==="null"||r==="false")r=false;else r=true}else r=!!r;e[t]=r}function validateUrl(e,t,r){r=a.parse(String(r));if(!r.host)return false;e[t]=r.href}function validateStream(e,t,r){if(!(r instanceof u))return false;e[t]=r}function validate(e,t,r,a,o){if(Array.isArray(a)){for(var u=0,c=a.length;u1){var D=h.indexOf("=");if(D>-1){v=true;var g=h.substr(D+1);h=h.substr(0,D);e.splice(p,1,h,g)}var y=resolveShort(h,o,d,f);s("arg=%j shRes=%j",h,y);if(y){s(h,y);e.splice.apply(e,[p,1].concat(y));if(h!==y[0]){p--;continue}}h=h.replace(/^-+/,"");var m=null;while(h.toLowerCase().indexOf("no-")===0){m=!m;h=h.substr(3)}if(f[h])h=f[h];var _=a[h];var E=Array.isArray(_);if(E&&_.length===1){E=false;_=_[0]}var w=_===Array||E&&_.indexOf(Array)!==-1;if(!a.hasOwnProperty(h)&&t.hasOwnProperty(h)){if(!Array.isArray(t[h]))t[h]=[t[h]];w=true}var x,F=e[p+1];var C=typeof m==="boolean"||_===Boolean||E&&_.indexOf(Boolean)!==-1||typeof _==="undefined"&&!v||F==="false"&&(_===null||E&&~_.indexOf(null));if(C){x=!m;if(F==="true"||F==="false"){x=JSON.parse(F);F=null;if(m)x=!x;p++}if(E&&F){if(~_.indexOf(F)){x=F;p++}else if(F==="null"&&~_.indexOf(null)){x=null;p++}else if(!F.match(/^-{2,}[^-]/)&&!isNaN(F)&&~_.indexOf(Number)){x=+F;p++}else if(!F.match(/^-[^-]/)&&~_.indexOf(String)){x=F;p++}}if(w)(t[h]=t[h]||[]).push(x);else t[h]=x;continue}if(_===String){if(F===undefined){F=""}else if(F.match(/^-{1,2}[^-]+/)){F="";p--}}if(F&&F.match(/^-{2,}$/)){F=undefined;p--}x=F===undefined?true:F;if(w)(t[h]=t[h]||[]).push(x);else t[h]=x;p++;continue}r.push(h)}}function resolveShort(e,t,r,a){e=e.replace(/^-+/,"");if(a[e]===e)return null;if(t[e]){if(t[e]&&!Array.isArray(t[e]))t[e]=t[e].split(/\s+/);return t[e]}var o=t.___singles;if(!o){o=Object.keys(t).filter((function(e){return e.length===1})).reduce((function(e,t){e[t]=true;return e}),{});t.___singles=o;s("shorthand singles",o)}var u=e.split("").filter((function(e){return o[e]}));if(u.join("")===e)return u.map((function(e){return t[e]})).reduce((function(e,t){return e.concat(t)}),[]);if(a[e]&&!t[e])return null;if(r[e])e=r[e];if(t[e]&&!Array.isArray(t[e]))t[e]=t[e].split(/\s+/);return t[e]}},9544:(e,t,r)=>{"use strict";var s=r(4906);var a=r(287);var o=r(2361).EventEmitter;var u=t=e.exports=new o;var c=r(3837);var f=r(2656);var d=r(3844);f(true);var p=process.stderr;Object.defineProperty(u,"stream",{set:function(e){p=e;if(this.gauge)this.gauge.setWriteTo(p,p)},get:function(){return p}});var h;u.useColor=function(){return h!=null?h:p.isTTY};u.enableColor=function(){h=true;this.gauge.setTheme({hasColor:h,hasUnicode:v})};u.disableColor=function(){h=false;this.gauge.setTheme({hasColor:h,hasUnicode:v})};u.level="info";u.gauge=new a(p,{enabled:false,theme:{hasColor:u.useColor()},template:[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",default:""},":",{type:"logline",kerning:1,default:""}]});u.tracker=new s.TrackerGroup;u.progressEnabled=u.gauge.isEnabled();var v;u.enableUnicode=function(){v=true;this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:v})};u.disableUnicode=function(){v=false;this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:v})};u.setGaugeThemeset=function(e){this.gauge.setThemeset(e)};u.setGaugeTemplate=function(e){this.gauge.setTemplate(e)};u.enableProgress=function(){if(this.progressEnabled)return;this.progressEnabled=true;this.tracker.on("change",this.showProgress);if(this._pause)return;this.gauge.enable()};u.disableProgress=function(){if(!this.progressEnabled)return;this.progressEnabled=false;this.tracker.removeListener("change",this.showProgress);this.gauge.disable()};var D=["newGroup","newItem","newStream"];var mixinLog=function(e){Object.keys(u).forEach((function(t){if(t[0]==="_")return;if(D.filter((function(e){return e===t})).length)return;if(e[t])return;if(typeof u[t]!=="function")return;var r=u[t];e[t]=function(){return r.apply(u,arguments)}}));if(e instanceof s.TrackerGroup){D.forEach((function(t){var r=e[t];e[t]=function(){return mixinLog(r.apply(e,arguments))}}))}return e};D.forEach((function(e){u[e]=function(){return mixinLog(this.tracker[e].apply(this.tracker,arguments))}}));u.clearProgress=function(e){if(!this.progressEnabled)return e&&process.nextTick(e);this.gauge.hide(e)};u.showProgress=function(e,t){if(!this.progressEnabled)return;var r={};if(e)r.section=e;var s=u.record[u.record.length-1];if(s){r.subsection=s.prefix;var a=u.disp[s.level]||s.level;var o=this._format(a,u.style[s.level]);if(s.prefix)o+=" "+this._format(s.prefix,this.prefixStyle);o+=" "+s.message.split(/\r?\n/)[0];r.logline=o}r.completed=t||this.tracker.completed();this.gauge.show(r)}.bind(u);u.pause=function(){this._paused=true;if(this.progressEnabled)this.gauge.disable()};u.resume=function(){if(!this._paused)return;this._paused=false;var e=this._buffer;this._buffer=[];e.forEach((function(e){this.emitLog(e)}),this);if(this.progressEnabled)this.gauge.enable()};u._buffer=[];var g=0;u.record=[];u.maxRecordSize=1e4;u.log=function(e,t,r){var s=this.levels[e];if(s===undefined){return this.emit("error",new Error(c.format("Undefined log level: %j",e)))}var a=new Array(arguments.length-2);var o=null;for(var u=2;up/10){var v=Math.floor(p*.9);this.record=this.record.slice(-1*v)}this.emitLog(d)}.bind(u);u.emitLog=function(e){if(this._paused){this._buffer.push(e);return}if(this.progressEnabled)this.gauge.pulse(e.prefix);var t=this.levels[e.level];if(t===undefined)return;if(t0&&!isFinite(t))return;var r=u.disp[e.level]!=null?u.disp[e.level]:e.level;this.clearProgress();e.message.split(/\r?\n/).forEach((function(t){if(this.heading){this.write(this.heading,this.headingStyle);this.write(" ")}this.write(r,u.style[e.level]);var s=e.prefix||"";if(s)this.write(" ");this.write(s,this.prefixStyle);this.write(" "+t+"\n")}),this);this.showProgress()};u._format=function(e,t){if(!p)return;var r="";if(this.useColor()){t=t||{};var s=[];if(t.fg)s.push(t.fg);if(t.bg)s.push("bg"+t.bg[0].toUpperCase()+t.bg.slice(1));if(t.bold)s.push("bold");if(t.underline)s.push("underline");if(t.inverse)s.push("inverse");if(s.length)r+=d.color(s);if(t.beep)r+=d.beep()}r+=e;if(this.useColor()){r+=d.color("reset")}return r};u.write=function(e,t){if(!p)return;p.write(this._format(e,t))};u.addLevel=function(e,t,r,s){if(s==null)s=e;this.levels[e]=t;this.style[e]=r;if(!this[e]){this[e]=function(){var t=new Array(arguments.length+1);t[0]=e;for(var r=0;r{"use strict";e.exports=Number.isNaN||function(e){return e!==e}},3540:e=>{"use strict"; +(()=>{var __webpack_modules__={5841:(e,t,r)=>{"use strict";e.exports=t;t.mockS3Http=r(9361).get_mockS3Http();t.mockS3Http("on");const s=t.mockS3Http("get");const a=r(7147);const o=r(1017);const u=r(1758);const c=r(9544);c.disableProgress();const f=r(5977);const d=r(2361).EventEmitter;const p=r(3837).inherits;const h=["clean","install","reinstall","build","rebuild","package","testpackage","publish","unpublish","info","testbinary","reveal","configure"];const v={};c.heading="node-pre-gyp";if(s){c.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`)}Object.defineProperty(t,"find",{get:function(){return r(5921).find},enumerable:true});function Run({package_json_path:e="./package.json",argv:t}){this.package_json_path=e;this.commands={};const r=this;h.forEach((e=>{r.commands[e]=function(t,s){c.verbose("command",e,t);return require("./"+e)(r,t,s)}}));this.parseArgv(t);this.binaryHostSet=false}p(Run,d);t.Run=Run;const D=Run.prototype;D.package=r(7399);D.configDefs={help:Boolean,arch:String,debug:Boolean,directory:String,proxy:String,loglevel:String};D.shorthands={release:"--no-debug",C:"--directory",debug:"--debug",j:"--jobs",silent:"--loglevel=silent",silly:"--loglevel=silly",verbose:"--loglevel=verbose"};D.aliases=v;D.parseArgv=function parseOpts(e){this.opts=u(this.configDefs,this.shorthands,e);this.argv=this.opts.argv.remain.slice();const t=this.todo=[];e=this.argv.map((e=>{if(e in this.aliases){e=this.aliases[e]}return e}));e.slice().forEach((r=>{if(r in this.commands){const s=e.splice(0,e.indexOf(r));e.shift();if(t.length>0){t[t.length-1].args=s}t.push({name:r,args:[]})}}));if(t.length>0){t[t.length-1].args=e.splice(0)}let r=this.package_json_path;if(this.opts.directory){r=o.join(this.opts.directory,r)}this.package_json=JSON.parse(a.readFileSync(r));this.todo=f.expand_commands(this.package_json,this.opts,t);const s="npm_config_";Object.keys(process.env).forEach((e=>{if(e.indexOf(s)!==0)return;const t=process.env[e];if(e===s+"loglevel"){c.level=t}else{e=e.substring(s.length);if(e==="argv"){if(this.opts.argv&&this.opts.argv.remain&&this.opts.argv.remain.length){}else{this.opts[e]=t}}else{this.opts[e]=t}}}));if(this.opts.loglevel){c.level=this.opts.loglevel}c.resume()};D.setBinaryHostProperty=function(e){if(this.binaryHostSet){return this.package_json.binary.host}const t=this.package_json;if(!t||!t.binary||t.binary.host){return""}if(!t.binary.staging_host||!t.binary.production_host){return""}let r="production_host";if(e==="publish"){r="staging_host"}const s=process.env.node_pre_gyp_s3_host;if(s==="staging"||s==="production"){r=`${s}_host`}else if(this.opts["s3_host"]==="staging"||this.opts["s3_host"]==="production"){r=`${this.opts["s3_host"]}_host`}else if(this.opts["s3_host"]||s){throw new Error(`invalid s3_host ${this.opts["s3_host"]||s}`)}t.binary.host=t.binary[r];this.binaryHostSet=true;return t.binary.host};D.usage=function usage(){const e=[""," Usage: node-pre-gyp [options]",""," where is one of:",h.map((e=>" - "+e+" - "+require("./"+e).usage)).join("\n"),"","node-pre-gyp@"+this.version+" "+o.resolve(__dirname,".."),"node@"+process.versions.node].join("\n");return e};Object.defineProperty(D,"version",{get:function(){return this.package.version},enumerable:true})},5921:(e,t,r)=>{"use strict";const s=r(5841);const a=r(2821);const o=r(5977);const u=r(7147).existsSync||r(1017).existsSync;const c=r(1017);e.exports=t;t.usage="Finds the require path for the node-pre-gyp installed module";t.validate=function(e,t){a.validate_config(e,t)};t.find=function(e,t){if(!u(e)){throw new Error(e+"does not exist")}const r=new s.Run({package_json_path:e,argv:process.argv});r.setBinaryHostProperty();const f=r.package_json;a.validate_config(f,t);let d;if(o.get_napi_build_versions(f,t)){d=o.get_best_napi_build_version(f,t)}t=t||{};if(!t.module_root)t.module_root=c.dirname(e);const p=a.evaluate(f,t,d);return p.module}},5977:(e,t,r)=>{"use strict";const s=r(7147);e.exports=t;const a=process.version.substr(1).replace(/-.*$/,"").split(".").map((e=>+e));const o=["build","clean","configure","package","publish","reveal","testbinary","testpackage","unpublish"];const u="napi_build_version=";e.exports.get_napi_version=function(){let e=process.versions.napi;if(!e){if(a[0]===9&&a[1]>=3)e=2;else if(a[0]===8)e=1}return e};e.exports.get_napi_version_as_string=function(t){const r=e.exports.get_napi_version(t);return r?""+r:""};e.exports.validate_package_json=function(t,r){const s=t.binary;const a=pathOK(s.module_path);const o=pathOK(s.remote_path);const u=pathOK(s.package_name);const c=e.exports.get_napi_build_versions(t,r,true);const f=e.exports.get_napi_build_versions_raw(t);if(c){c.forEach((e=>{if(!(parseInt(e,10)===e&&e>0)){throw new Error("All values specified in napi_versions must be positive integers.")}}))}if(c&&(!a||!o&&!u)){throw new Error("When napi_versions is specified; module_path and either remote_path or "+"package_name must contain the substitution string '{napi_build_version}`.")}if((a||o||u)&&!f){throw new Error("When the substitution string '{napi_build_version}` is specified in "+"module_path, remote_path, or package_name; napi_versions must also be specified.")}if(c&&!e.exports.get_best_napi_build_version(t,r)&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}if(f&&!c&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}};function pathOK(e){return e&&(e.indexOf("{napi_build_version}")!==-1||e.indexOf("{node_napi_label}")!==-1)}e.exports.expand_commands=function(t,r,s){const a=[];const c=e.exports.get_napi_build_versions(t,r);s.forEach((s=>{if(c&&s.name==="install"){const o=e.exports.get_best_napi_build_version(t,r);const c=o?[u+o]:[];a.push({name:s.name,args:c})}else if(c&&o.indexOf(s.name)!==-1){c.forEach((e=>{const t=s.args.slice();t.push(u+e);a.push({name:s.name,args:t})}))}else{a.push(s)}}));return a};e.exports.get_napi_build_versions=function(t,s,a){const o=r(9544);let u=[];const c=e.exports.get_napi_version(s?s.target:undefined);if(t.binary&&t.binary.napi_versions){t.binary.napi_versions.forEach((e=>{const t=u.indexOf(e)!==-1;if(!t&&c&&e<=c){u.push(e)}else if(a&&!t&&c){o.info("This Node instance does not support builds for Node-API version",e)}}))}if(s&&s["build-latest-napi-version-only"]){let e=0;u.forEach((t=>{if(t>e)e=t}));u=e?[e]:[]}return u.length?u:undefined};e.exports.get_napi_build_versions_raw=function(e){const t=[];if(e.binary&&e.binary.napi_versions){e.binary.napi_versions.forEach((e=>{if(t.indexOf(e)===-1){t.push(e)}}))}return t.length?t:undefined};e.exports.get_command_arg=function(e){return u+e};e.exports.get_napi_build_version_from_command_args=function(e){for(let t=0;t{if(e>s&&e<=t){s=e}}))}return s===0?undefined:s};e.exports.build_napi_only=function(e){return e.binary&&e.binary.package_name&&e.binary.package_name.indexOf("{node_napi_label}")===-1}},9361:(e,t,r)=>{"use strict";e.exports=t;const s=r(7310);const a=r(7147);const o=r(1017);e.exports.detect=function(e,t){const r=e.hosted_path;const a=s.parse(r);t.prefix=!a.pathname||a.pathname==="/"?"":a.pathname.replace("/","");if(e.bucket&&e.region){t.bucket=e.bucket;t.region=e.region;t.endpoint=e.host;t.s3ForcePathStyle=e.s3ForcePathStyle}else{const e=a.hostname.split(".s3");const r=e[0];if(!r){return}if(!t.bucket){t.bucket=r}if(!t.region){const r=e[1].slice(1).split(".")[0];if(r==="amazonaws"){t.region="us-east-1"}else{t.region=r}}}};e.exports.get_s3=function(e){if(process.env.node_pre_gyp_mock_s3){const e=r(3930);const t=r(2037);e.config.basePath=`${t.tmpdir()}/mock`;const s=e.S3();const wcb=e=>(t,...r)=>{if(t&&t.code==="ENOENT"){t.code="NotFound"}return e(t,...r)};return{listObjects(e,t){return s.listObjects(e,wcb(t))},headObject(e,t){return s.headObject(e,wcb(t))},deleteObject(e,t){return s.deleteObject(e,wcb(t))},putObject(e,t){return s.putObject(e,wcb(t))}}}const t=r(2355);t.config.update(e);const s=new t.S3;return{listObjects(e,t){return s.listObjects(e,t)},headObject(e,t){return s.headObject(e,t)},deleteObject(e,t){return s.deleteObject(e,t)},putObject(e,t){return s.putObject(e,t)}}};e.exports.get_mockS3Http=function(){let e=false;if(!process.env.node_pre_gyp_mock_s3){return()=>e}const t=r(4997);const s="https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com";const u=process.env.node_pre_gyp_mock_s3+"/mapbox-node-pre-gyp-public-testing-bucket";const mock_http=()=>{function get(e,t){const r=o.join(u,e.replace("%2B","+"));try{a.accessSync(r,a.constants.R_OK)}catch(e){return[404,"not found\n"]}return[200,a.createReadStream(r)]}return t(s).persist().get((()=>e)).reply(get)};mock_http(t,s,u);const mockS3Http=t=>{const r=e;if(t==="off"){e=false}else if(t==="on"){e=true}else if(t!=="get"){throw new Error(`illegal action for setMockHttp ${t}`)}return r};return mockS3Http}},2821:(e,t,r)=>{"use strict";e.exports=t;const s=r(1017);const a=r(7849);const o=r(7310);const u=r(5104);const c=r(5977);let f;if(process.env.NODE_PRE_GYP_ABI_CROSSWALK){f=require(process.env.NODE_PRE_GYP_ABI_CROSSWALK)}else{f=r(9448)}const d={};Object.keys(f).forEach((e=>{const t=e.split(".")[0];if(!d[t]){d[t]=e}}));function get_electron_abi(e,t){if(!e){throw new Error("get_electron_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if electron is the target.")}const r=a.parse(t);return e+"-v"+r.major+"."+r.minor}e.exports.get_electron_abi=get_electron_abi;function get_node_webkit_abi(e,t){if(!e){throw new Error("get_node_webkit_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if node-webkit is the target.")}return e+"-v"+t}e.exports.get_node_webkit_abi=get_node_webkit_abi;function get_node_abi(e,t){if(!e){throw new Error("get_node_abi requires valid runtime arg")}if(!t){throw new Error("get_node_abi requires valid process.versions object")}const r=a.parse(t.node);if(r.major===0&&r.minor%2){return e+"-v"+t.node}else{return t.modules?e+"-v"+ +t.modules:"v8-"+t.v8.split(".").slice(0,2).join(".")}}e.exports.get_node_abi=get_node_abi;function get_runtime_abi(e,t){if(!e){throw new Error("get_runtime_abi requires valid runtime arg")}if(e==="node-webkit"){return get_node_webkit_abi(e,t||process.versions["node-webkit"])}else if(e==="electron"){return get_electron_abi(e,t||process.versions.electron)}else{if(e!=="node"){throw new Error("Unknown Runtime: '"+e+"'")}if(!t){return get_node_abi(e,process.versions)}else{let r;if(f[t]){r=f[t]}else{const e=t.split(".").map((e=>+e));if(e.length!==3){throw new Error("Unknown target version: "+t)}const s=e[0];let a=e[1];let o=e[2];if(s===1){while(true){if(a>0)--a;if(o>0)--o;const e=""+s+"."+a+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}if(a===0&&o===0){break}}}else if(s>=2){if(d[s]){r=f[d[s]];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+d[s]+" as ABI compatible target")}}else if(s===0){if(e[1]%2===0){while(--o>0){const e=""+s+"."+a+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}}}}}if(!r){throw new Error("Unsupported target version: "+t)}const s={node:t,v8:r.v8+".0",modules:r.node_abi>1?r.node_abi:undefined};return get_node_abi(e,s)}}}e.exports.get_runtime_abi=get_runtime_abi;const p=["module_name","module_path","host"];function validate_config(e,t){const r=e.name+" package.json is not node-pre-gyp ready:\n";const s=[];if(!e.main){s.push("main")}if(!e.version){s.push("version")}if(!e.name){s.push("name")}if(!e.binary){s.push("binary")}const a=e.binary;if(a){p.forEach((e=>{if(!a[e]||typeof a[e]!=="string"){s.push("binary."+e)}}))}if(s.length>=1){throw new Error(r+"package.json must declare these properties: \n"+s.join("\n"))}if(a){const e=o.parse(a.host).protocol;if(e==="http:"){throw new Error("'host' protocol ("+e+") is invalid - only 'https:' is accepted")}}c.validate_package_json(e,t)}e.exports.validate_config=validate_config;function eval_template(e,t){Object.keys(t).forEach((r=>{const s="{"+r+"}";while(e.indexOf(s)>-1){e=e.replace(s,t[r])}}));return e}function fix_slashes(e){if(e.slice(-1)!=="/"){return e+"/"}return e}function drop_double_slashes(e){return e.replace(/\/\//g,"/")}function get_process_runtime(e){let t="node";if(e["node-webkit"]){t="node-webkit"}else if(e.electron){t="electron"}return t}e.exports.get_process_runtime=get_process_runtime;const h="{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz";const v="";e.exports.evaluate=function(e,t,r){t=t||{};validate_config(e,t);const f=e.version;const d=a.parse(f);const p=t.runtime||get_process_runtime(process.versions);const D={name:e.name,configuration:t.debug?"Debug":"Release",debug:t.debug,module_name:e.binary.module_name,version:d.version,prerelease:d.prerelease.length?d.prerelease.join("."):"",build:d.build.length?d.build.join("."):"",major:d.major,minor:d.minor,patch:d.patch,runtime:p,node_abi:get_runtime_abi(p,t.target),node_abi_napi:c.get_napi_version(t.target)?"napi":get_runtime_abi(p,t.target),napi_version:c.get_napi_version(t.target),napi_build_version:r||"",node_napi_label:r?"napi-v"+r:get_runtime_abi(p,t.target),target:t.target||"",platform:t.target_platform||process.platform,target_platform:t.target_platform||process.platform,arch:t.target_arch||process.arch,target_arch:t.target_arch||process.arch,libc:t.target_libc||u.family||"unknown",module_main:e.main,toolset:t.toolset||"",bucket:e.binary.bucket,region:e.binary.region,s3ForcePathStyle:e.binary.s3ForcePathStyle||false};const g=D.module_name.replace("-","_");const y=process.env["npm_config_"+g+"_binary_host_mirror"]||e.binary.host;D.host=fix_slashes(eval_template(y,D));D.module_path=eval_template(e.binary.module_path,D);if(t.module_root){D.module_path=s.join(t.module_root,D.module_path)}else{D.module_path=s.resolve(D.module_path)}D.module=s.join(D.module_path,D.module_name+".node");D.remote_path=e.binary.remote_path?drop_double_slashes(fix_slashes(eval_template(e.binary.remote_path,D))):v;const m=e.binary.package_name?e.binary.package_name:h;D.package_name=eval_template(m,D);D.staged_tarball=s.join("build/stage",D.remote_path,D.package_name);D.hosted_path=o.resolve(D.host,D.remote_path);D.hosted_tarball=o.resolve(D.hosted_path,D.package_name);return D}},7498:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(1017));const o=r(3982);const u=r(9663);const c=r(4370);const f=r(1988);const d=s(r(3331));const p=r(9336);const h=s(r(3535));const v=r(1226);const D=r(2100);const g=r(7393);const y=s(r(1415));const m=s(r(1));const _=s(r(7663));const E=s(r(5841));const w=r(7310);const x=f.Parser.extend();const F=s(r(2037));const C=r(3791);const S=s(r(2382));const k={cwd:()=>K,env:{NODE_ENV:c.UNKNOWN,[c.UNKNOWN]:true},[c.UNKNOWN]:true};const A=Symbol();const R=Symbol();const O=Symbol();const T=Symbol();const j=Symbol();const B=Symbol();const L=Symbol();const N=Symbol();const I=Symbol();const P={access:B,accessSync:B,createReadStream:B,exists:B,existsSync:B,fstat:B,fstatSync:B,lstat:B,lstatSync:B,open:B,readdir:L,readdirSync:L,readFile:B,readFileSync:B,stat:B,statSync:B};const W={...P,pathExists:B,pathExistsSync:B,readJson:B,readJSON:B,readJsonSync:B,readJSONSync:B};const M=Object.assign(Object.create(null),{bindings:{default:N},express:{default:function(){return{[c.UNKNOWN]:true,set:A,engine:R}}},fs:{default:P,...P},"fs-extra":{default:W,...W},"graceful-fs":{default:P,...P},process:{default:k,...k},path:{default:{}},os:{default:F.default,...F.default},"@mapbox/node-pre-gyp":{default:E.default,...E.default},"node-pre-gyp":D.pregyp,"node-pre-gyp/lib/pre-binding":D.pregyp,"node-pre-gyp/lib/pre-binding.js":D.pregyp,"node-gyp-build":{default:I},nbind:{init:O,default:{init:O}},"resolve-from":{default:S.default},"strong-globalize":{default:{SetRootDir:T},SetRootDir:T},pkginfo:{default:j}});const $={_interopRequireDefault:g.normalizeDefaultRequire,_interopRequireWildcard:g.normalizeWildcardRequire,__importDefault:g.normalizeDefaultRequire,__importStar:g.normalizeWildcardRequire,MONGOOSE_DRIVER_PATH:undefined,URL:w.URL,Object:{assign:Object.assign}};$.global=$.GLOBAL=$.globalThis=$;const q=Symbol();D.pregyp.find[q]=true;const U=M.path;Object.keys(a.default).forEach((e=>{const t=a.default[e];if(typeof t==="function"){const r=function mockPath(){return t.apply(mockPath,arguments)};r[q]=true;U[e]=U.default[e]=r}else{U[e]=U.default[e]=t}}));U.resolve=U.default.resolve=function(...e){return a.default.resolve.apply(this,[K,...e])};U.resolve[q]=true;const G=new Set([".h",".cmake",".c",".cpp"]);const H=new Set(["CHANGELOG.md","README.md","readme.md","changelog.md"]);let K;const z=/^\/[^\/]+|^[a-z]:[\\/][^\\/]+/i;function isAbsolutePathOrUrl(e){if(e instanceof w.URL)return e.protocol==="file:";if(typeof e==="string"){if(e.startsWith("file:")){try{new w.URL(e);return true}catch{return false}}return z.test(e)}return false}const V=Symbol();const Y=/([\/\\]\*\*[\/\\]\*)+/g;async function analyze(e,t,r){const s=new Set;const f=new Set;const g=new Set;const E=a.default.dirname(e);K=r.cwd;const F=(0,v.getPackageBase)(e);const emitAssetDirectory=e=>{if(!r.analysis.emitGlobs)return;const t=e.indexOf(c.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const u=e.substring(0,o);const f=e.slice(o);const d=f.replace(c.wildcardRegEx,((e,t)=>f[t-1]===a.default.sep?"**/*":"*")).replace(Y,"/**/*")||"/**/*";if(r.ignoreFn(a.default.relative(r.base,u+d)))return;P=P.then((async()=>{if(r.log)console.log("Globbing "+u+d);const e=await new Promise(((e,t)=>(0,h.default)(u+d,{mark:true,ignore:u+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));e.filter((e=>!G.has(a.default.extname(e))&&!H.has(a.default.basename(e))&&!e.endsWith("/"))).forEach((e=>s.add(e)))}))};let P=Promise.resolve();t=t.replace(/^#![^\n\r]*[\r\n]/,"");let W;let U=false;try{W=x.parse(t,{ecmaVersion:"latest",allowReturnOutsideFunction:true});U=false}catch(t){const s=t&&t.message&&t.message.includes("sourceType: module");if(!s){r.warnings.add(new Error(`Failed to parse ${e} as script:\n${t&&t.message}`))}}if(!W){try{W=x.parse(t,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:true});U=true}catch(t){r.warnings.add(new Error(`Failed to parse ${e} as module:\n${t&&t.message}`));return{assets:s,deps:f,imports:g,isESM:false}}}const Q=(0,w.pathToFileURL)(e).href;const J=Object.assign(Object.create(null),{__dirname:{shadowDepth:0,value:{value:a.default.resolve(e,"..")}},__filename:{shadowDepth:0,value:{value:e}},process:{shadowDepth:0,value:{value:k}}});if(!U||r.mixedModules){J.require={shadowDepth:0,value:{value:{[c.FUNCTION](e){f.add(e);const t=M[e.startsWith("node:")?e.slice(5):e];return t.default},resolve(t){return(0,m.default)(t,e,r)}}}};J.require.value.value.resolve[q]=true}function setKnownBinding(e,t){if(e==="require")return;J[e]={shadowDepth:0,value:t}}function getKnownBinding(e){const t=J[e];if(t){if(t.shadowDepth===0){return t.value}}return undefined}function hasKnownBindingValue(e){const t=J[e];return t&&t.shadowDepth===0}if((U||r.mixedModules)&&isAst(W)){for(const e of W.body){if(e.type==="ImportDeclaration"){const t=String(e.source.value);f.add(t);const r=M[t.startsWith("node:")?t.slice(5):t];if(r){for(const t of e.specifiers){if(t.type==="ImportNamespaceSpecifier")setKnownBinding(t.local.name,{value:r});else if(t.type==="ImportDefaultSpecifier"&&"default"in r)setKnownBinding(t.local.name,{value:r.default});else if(t.type==="ImportSpecifier"&&t.imported.name in r)setKnownBinding(t.local.name,{value:r[t.imported.name]})}}}else if(e.type==="ExportNamedDeclaration"||e.type==="ExportAllDeclaration"){if(e.source)f.add(String(e.source.value))}}}async function computePureStaticValue(e,t=true){const r=Object.create(null);Object.keys($).forEach((e=>{r[e]={value:$[e]}}));Object.keys(J).forEach((e=>{r[e]=getKnownBinding(e)}));r["import.meta"]={url:Q};const s=await(0,c.evaluate)(e,r,t);return s}let X;let Z;let ee=false;function emitWildcardRequire(e){if(!r.analysis.emitGlobs||!e.startsWith("./")&&!e.startsWith("../"))return;e=a.default.resolve(E,e);const t=e.indexOf(c.WILDCARD);const s=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const o=e.substring(0,s);const u=e.slice(s);let d=u.replace(c.wildcardRegEx,((e,t)=>u[t-1]===a.default.sep?"**/*":"*"))||"/**/*";if(!d.endsWith("*"))d+="?("+(r.ts?".ts|.tsx|":"")+".js|.json|.node)";if(r.ignoreFn(a.default.relative(r.base,o+d)))return;P=P.then((async()=>{if(r.log)console.log("Globbing "+o+d);const e=await new Promise(((e,t)=>(0,h.default)(o+d,{mark:true,ignore:o+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));e.filter((e=>!G.has(a.default.extname(e))&&!H.has(a.default.basename(e))&&!e.endsWith("/"))).forEach((e=>f.add(e)))}))}async function processRequireArg(e,t=false){if(e.type==="ConditionalExpression"){await processRequireArg(e.consequent,t);await processRequireArg(e.alternate,t);return}if(e.type==="LogicalExpression"){await processRequireArg(e.left,t);await processRequireArg(e.right,t);return}let r=await computePureStaticValue(e,true);if(!r)return;if("value"in r&&typeof r.value==="string"){if(!r.wildcards)(t?g:f).add(r.value);else if(r.wildcards.length>=1)emitWildcardRequire(r.value)}else{if("then"in r&&typeof r.then==="string")(t?g:f).add(r.then);if("else"in r&&typeof r.else==="string")(t?g:f).add(r.else)}}let te=(0,u.attachScopes)(W,"scope");if(isAst(W)){(0,C.handleWrappers)(W);await(0,y.default)({id:e,ast:W,emitDependency:e=>f.add(e),emitAsset:e=>s.add(e),emitAssetDirectory:emitAssetDirectory,job:r})}async function backtrack(e,t){if(!X)throw new Error("Internal error: No staticChildNode for backtrack.");const r=await computePureStaticValue(e,true);if(r){if("value"in r&&typeof r.value!=="symbol"||"then"in r&&typeof r.then!=="symbol"&&typeof r.else!=="symbol"){Z=r;X=e;if(t)t.skip();return}}await emitStaticChildAsset()}await(0,o.asyncWalk)(W,{async enter(t,o){const u=t;const c=o;if(u.scope){te=u.scope;for(const e in u.scope.declarations){if(e in J)J[e].shadowDepth++}}if(X)return;if(!c)return;if(u.type==="Identifier"){if((0,p.isIdentifierRead)(u,c)&&r.analysis.computeFileReferences){let e;if(typeof(e=getKnownBinding(u.name)?.value)==="string"&&e.match(z)||e&&(typeof e==="function"||typeof e==="object")&&e[q]){Z={value:typeof e==="string"?e:undefined};X=u;await backtrack(c,this)}}}else if(r.analysis.computeFileReferences&&u.type==="MemberExpression"&&u.object.type==="MetaProperty"&&u.object.meta.name==="import"&&u.object.property.name==="meta"&&(u.property.computed?u.property.value:u.property.name)==="url"){Z={value:Q};X=u;await backtrack(c,this)}else if(u.type==="ImportExpression"){await processRequireArg(u.source,true);return}else if(u.type==="CallExpression"){if((!U||r.mixedModules)&&u.callee.type==="Identifier"&&u.arguments.length){if(u.callee.name==="require"&&J.require.shadowDepth===0){await processRequireArg(u.arguments[0]);return}}else if((!U||r.mixedModules)&&u.callee.type==="MemberExpression"&&u.callee.object.type==="Identifier"&&u.callee.object.name==="module"&&"module"in J===false&&u.callee.property.type==="Identifier"&&!u.callee.computed&&u.callee.property.name==="require"&&u.arguments.length){await processRequireArg(u.arguments[0]);return}else if((!U||r.mixedModules)&&u.callee.type==="MemberExpression"&&u.callee.object.type==="Identifier"&&u.callee.object.name==="require"&&J.require.shadowDepth===0&&u.callee.property.type==="Identifier"&&!u.callee.computed&&u.callee.property.name==="resolve"&&u.arguments.length){await processRequireArg(u.arguments[0]);return}const t=r.analysis.evaluatePureExpressions&&await computePureStaticValue(u.callee,false);if(t&&"value"in t&&typeof t.value==="function"&&t.value[q]&&r.analysis.computeFileReferences){Z=await computePureStaticValue(u,true);if(Z&&c){X=u;await backtrack(c,this)}}else if(t&&"value"in t&&typeof t.value==="symbol"){switch(t.value){case V:if(u.arguments.length===1&&u.arguments[0].type==="Literal"&&u.callee.type==="Identifier"&&J.require.shadowDepth===0){await processRequireArg(u.arguments[0])}break;case N:if(u.arguments.length){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&e.value){let t;if(typeof e.value==="object")t=e.value;else if(typeof e.value==="string")t={bindings:e.value};if(!t.path){t.path=true}t.module_root=F;let r;try{r=(0,d.default)(t)}catch(e){}if(r){Z={value:r};X=u;await emitStaticChildAsset()}}}break;case I:if(u.arguments.length===1&&u.arguments[0].type==="Identifier"&&u.arguments[0].name==="__dirname"&&J.__dirname.shadowDepth===0){let e;try{const t=(0,S.default)(E,"node-gyp-build");e=require(t).path(E)}catch(t){try{e=_.default.path(E)}catch(e){}}if(e){Z={value:e};X=u;await emitStaticChildAsset()}}break;case O:if(u.arguments.length){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&(typeof e.value==="string"||typeof e.value==="undefined")){const t=(0,D.nbind)(e.value);if(t&&t.path){f.add(a.default.relative(E,t.path).replace(/\\/g,"/"));return this.skip()}}}break;case A:if(u.arguments.length===2&&u.arguments[0].type==="Literal"&&u.arguments[0].value==="view engine"&&!ee){await processRequireArg(u.arguments[1]);return this.skip()}break;case R:ee=true;break;case B:case L:if(u.arguments[0]&&r.analysis.computeFileReferences){Z=await computePureStaticValue(u.arguments[0],true);if(Z){X=u.arguments[0];if(t.value===L&&u.arguments[0].type==="Identifier"&&u.arguments[0].name==="__dirname"){emitAssetDirectory(E)}else{await backtrack(c,this)}return this.skip()}}break;case T:if(u.arguments[0]){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&e.value)emitAssetDirectory(e.value+"/intl");return this.skip()}break;case j:let o=a.default.resolve(e,"../package.json");const p=a.default.resolve("/package.json");while(o!==p&&await r.stat(o)===null)o=a.default.resolve(o,"../../package.json");if(o!==p)s.add(o);break}}}else if(u.type==="VariableDeclaration"&&c&&!(0,p.isVarLoop)(c)&&r.analysis.evaluatePureExpressions){for(const e of u.declarations){if(!e.init)continue;const t=await computePureStaticValue(e.init,true);if(t){if(e.id.type==="Identifier"){setKnownBinding(e.id.name,t)}else if(e.id.type==="ObjectPattern"&&"value"in t){for(const r of e.id.properties){if(r.type!=="Property"||r.key.type!=="Identifier"||r.value.type!=="Identifier"||typeof t.value!=="object"||t.value===null||!(r.key.name in t.value))continue;setKnownBinding(r.value.name,{value:t.value[r.key.name]})}}if(!("value"in t)&&isAbsolutePathOrUrl(t.then)&&isAbsolutePathOrUrl(t.else)){Z=t;X=e.init;await emitStaticChildAsset()}}}}else if(u.type==="AssignmentExpression"&&c&&!(0,p.isLoop)(c)&&r.analysis.evaluatePureExpressions){if(!hasKnownBindingValue(u.left.name)){const e=await computePureStaticValue(u.right,false);if(e&&"value"in e){if(u.left.type==="Identifier"){setKnownBinding(u.left.name,e)}else if(u.left.type==="ObjectPattern"){for(const t of u.left.properties){if(t.type!=="Property"||t.key.type!=="Identifier"||t.value.type!=="Identifier"||typeof e.value!=="object"||e.value===null||!(t.key.name in e.value))continue;setKnownBinding(t.value.name,{value:e.value[t.key.name]})}}if(isAbsolutePathOrUrl(e.value)){Z=e;X=u.right;await emitStaticChildAsset()}}}}else if((!U||r.mixedModules)&&(u.type==="FunctionDeclaration"||u.type==="FunctionExpression"||u.type==="ArrowFunctionExpression")&&(u.arguments||u.params)[0]&&(u.arguments||u.params)[0].type==="Identifier"){let e;let t;if((u.type==="ArrowFunctionExpression"||u.type==="FunctionExpression")&&c&&c.type==="VariableDeclarator"&&c.id.type==="Identifier"){e=c.id;t=u.arguments||u.params}else if(u.id){e=u.id;t=u.arguments||u.params}if(e&&u.body.body){let r,s=false;for(let e=0;ee&&e.id&&e.id.type==="Identifier"&&e.init&&e.init.type==="CallExpression"&&e.init.callee.type==="Identifier"&&e.init.callee.name==="require"&&J.require.shadowDepth===0&&e.init.arguments[0]&&e.init.arguments[0].type==="Identifier"&&e.init.arguments[0].name===t[0].name))}if(r&&u.body.body[e].type==="ReturnStatement"&&u.body.body[e].argument&&u.body.body[e].argument.type==="Identifier"&&u.body.body[e].argument.name===r.id.name){s=true;break}}if(s)setKnownBinding(e.name,{value:V})}}},async leave(e,t){const r=e;const s=t;if(r.scope){if(te.parent){te=te.parent}for(const e in r.scope.declarations){if(e in J){if(J[e].shadowDepth>0)J[e].shadowDepth--;else delete J[e]}}}if(X&&s)await backtrack(s,this)}});await P;return{assets:s,deps:f,imports:g,isESM:U};async function emitAssetPath(e){const t=e.indexOf(c.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const u=e.substring(0,o);try{var f=await r.stat(u);if(f===null){throw new Error("file not found")}}catch(e){return}if(t!==-1&&f.isFile())return;if(f.isFile()){s.add(e)}else if(f.isDirectory()){if(validWildcard(e))emitAssetDirectory(e)}}function validWildcard(t){let s="";if(t.endsWith(a.default.sep))s=a.default.sep;else if(t.endsWith(a.default.sep+c.WILDCARD))s=a.default.sep+c.WILDCARD;else if(t.endsWith(c.WILDCARD))s=c.WILDCARD;if(t===E+s)return false;if(t===K+s)return false;if(t.endsWith(a.default.sep+"node_modules"+s))return false;if(E.startsWith(t.slice(0,t.length-s.length)+a.default.sep))return false;if(F){const s=e.substring(0,e.indexOf(a.default.sep+"node_modules"))+a.default.sep+"node_modules"+a.default.sep;if(!t.startsWith(s)){if(r.log)console.log("Skipping asset emission of "+t.replace(c.wildcardRegEx,"*")+" for "+e+" as it is outside the package base "+F);return false}}return true}function resolveAbsolutePathOrUrl(e){return e instanceof w.URL?(0,w.fileURLToPath)(e):e.startsWith("file:")?(0,w.fileURLToPath)(new w.URL(e)):a.default.resolve(e)}async function emitStaticChildAsset(){if(!Z){return}if("value"in Z&&isAbsolutePathOrUrl(Z.value)){try{const e=resolveAbsolutePathOrUrl(Z.value);await emitAssetPath(e)}catch(e){}}else if("then"in Z&&"else"in Z&&isAbsolutePathOrUrl(Z.then)&&isAbsolutePathOrUrl(Z.else)){let e;try{e=resolveAbsolutePathOrUrl(Z.then)}catch(e){}let t;try{t=resolveAbsolutePathOrUrl(Z.else)}catch(e){}if(e)await emitAssetPath(e);if(t)await emitAssetPath(t)}else if(X&&X.type==="ArrayExpression"&&"value"in Z&&Z.value instanceof Array){for(const e of Z.value){try{const t=resolveAbsolutePathOrUrl(e);await emitAssetPath(t)}catch(e){}}}X=Z=undefined}}t["default"]=analyze;function isAst(e){return"body"in e}},529:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.CachedFileSystem=void 0;const a=r(1017);const o=s(r(9165));const u=r(5749);const c=o.default.promises.readFile;const f=o.default.promises.readlink;const d=o.default.promises.stat;class CachedFileSystem{constructor({cache:e,fileIOConcurrency:t}){this.fileIOQueue=new u.Sema(t);this.fileCache=e?.fileCache??new Map;this.statCache=e?.statCache??new Map;this.symlinkCache=e?.symlinkCache??new Map;if(e){e.fileCache=this.fileCache;e.statCache=this.statCache;e.symlinkCache=this.symlinkCache}}async readlink(e){const t=this.symlinkCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalReadlink);this.symlinkCache.set(e,r);return r}async readFile(e){const t=this.fileCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalReadFile);this.fileCache.set(e,r);return r}async stat(e){const t=this.statCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalStat);this.statCache.set(e,r);return r}async _internalReadlink(e){try{const t=await f(e);const r=this.statCache.get(e);if(r)this.statCache.set((0,a.resolve)(e,t),r);return t}catch(e){if(e.code!=="EINVAL"&&e.code!=="ENOENT"&&e.code!=="UNKNOWN")throw e;return null}}async _internalReadFile(e){try{return(await c(e)).toString()}catch(e){if(e.code==="ENOENT"||e.code==="EISDIR"){return null}throw e}}async _internalStat(e){try{return await d(e)}catch(e){if(e.code==="ENOENT"){return null}throw e}}async executeFileIO(e,t){await this.fileIOQueue.acquire();try{return t.call(this,e)}finally{this.fileIOQueue.release()}}}t.CachedFileSystem=CachedFileSystem},6223:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;var a=Object.getOwnPropertyDescriptor(t,r);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,s,a)}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))s(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});t.nodeFileTrace=void 0;a(r(8470),t);var o=r(2411);Object.defineProperty(t,"nodeFileTrace",{enumerable:true,get:function(){return o.nodeFileTrace}})},2411:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;var a=Object.getOwnPropertyDescriptor(t,r);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,s,a)}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))s(t,e,r);a(t,e);return t};var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Job=t.nodeFileTrace=void 0;const c=r(1017);const f=u(r(7498));const d=o(r(1));const p=r(2540);const h=r(8908);const v=r(1017);const D=r(529);function inPath(e,t){const r=(0,v.join)(t,c.sep);return e.startsWith(r)&&e!==r}async function nodeFileTrace(e,t={}){const r=new Job(t);if(t.readFile)r.readFile=t.readFile;if(t.stat)r.stat=t.stat;if(t.readlink)r.readlink=t.readlink;if(t.resolve)r.resolve=t.resolve;r.ts=true;await Promise.all(e.map((async e=>{const t=(0,c.resolve)(e);await r.emitFile(t,"initial");return r.emitDependency(t)})));const s={fileList:r.fileList,esmFileList:r.esmFileList,reasons:r.reasons,warnings:r.warnings};return s}t.nodeFileTrace=nodeFileTrace;class Job{constructor({base:e=process.cwd(),processCwd:t,exports:r,conditions:s=r||["node"],exportsOnly:a=false,paths:o={},ignore:u,log:f=false,mixedModules:h=false,ts:v=true,analysis:g={},cache:y,fileIOConcurrency:m=1024}){this.reasons=new Map;this.maybeEmitDep=async(e,t,r)=>{let s="";let a;try{s=await this.resolve(e,t,this,r)}catch(o){a=o;try{if(this.ts&&e.endsWith(".js")&&o instanceof d.NotFoundError){const o=e.slice(0,-3)+".ts";s=await this.resolve(o,t,this,r);a=undefined}}catch(e){a=e}}if(a){this.warnings.add(new Error(`Failed to resolve dependency "${e}":\n${a?.message}`));return}if(Array.isArray(s)){for(const e of s){if(e.startsWith("node:"))return;await this.emitDependency(e,t)}}else{if(s.startsWith("node:"))return;await this.emitDependency(s,t)}};this.ts=v;e=(0,c.resolve)(e);this.ignoreFn=e=>{if(e.startsWith(".."+c.sep))return true;return false};if(typeof u==="string")u=[u];if(typeof u==="function"){const e=u;this.ignoreFn=t=>{if(t.startsWith(".."+c.sep))return true;if(e(t))return true;return false}}else if(Array.isArray(u)){const t=u.map((t=>(0,c.relative)(e,(0,c.resolve)(e||process.cwd(),t))));this.ignoreFn=e=>{if(e.startsWith(".."+c.sep))return true;if((0,p.isMatch)(e,t))return true;return false}}this.base=e;this.cwd=(0,c.resolve)(t||e);this.conditions=s;this.exportsOnly=a;const _={};for(const t of Object.keys(o)){const r=o[t].endsWith("/");const s=(0,c.resolve)(e,o[t]);_[t]=s+(r?"/":"")}this.paths=_;this.log=f;this.mixedModules=h;this.cachedFileSystem=new D.CachedFileSystem({cache:y,fileIOConcurrency:m});this.analysis={};if(g!==false){Object.assign(this.analysis,{emitGlobs:true,computeFileReferences:true,evaluatePureExpressions:true},g===true?{}:g)}this.analysisCache=y&&y.analysisCache||new Map;if(y){y.analysisCache=this.analysisCache}this.fileList=new Set;this.esmFileList=new Set;this.processed=new Set;this.warnings=new Set}async readlink(e){return this.cachedFileSystem.readlink(e)}async isFile(e){const t=await this.stat(e);if(t)return t.isFile();return false}async isDir(e){const t=await this.stat(e);if(t)return t.isDirectory();return false}async stat(e){return this.cachedFileSystem.stat(e)}async resolve(e,t,r,s){return(0,d.default)(e,t,r,s)}async readFile(e){return this.cachedFileSystem.readFile(e)}async realpath(e,t,r=new Set){if(r.has(e))throw new Error("Recursive symlink detected resolving "+e);r.add(e);const s=await this.readlink(e);if(s){const a=(0,c.dirname)(e);const o=(0,c.resolve)(a,s);const u=await this.realpath(a,t);if(inPath(e,u))await this.emitFile(e,"resolve",t,true);return this.realpath(o,t,r)}if(!inPath(e,this.base))return e;return(0,v.join)(await this.realpath((0,c.dirname)(e),t,r),(0,c.basename)(e))}async emitFile(e,t,r,s=false){if(!s){e=await this.realpath(e,r)}e=(0,c.relative)(this.base,e);if(r){r=(0,c.relative)(this.base,r)}let a=this.reasons.get(e);if(!a){a={type:[t],ignored:false,parents:new Set};this.reasons.set(e,a)}else if(!a.type.includes(t)){a.type.push(t)}if(r&&this.ignoreFn(e,r)){if(!this.fileList.has(e)&&a){a.ignored=true}return false}if(r){a.parents.add(r)}this.fileList.add(e);return true}async getPjsonBoundary(e){const t=e.indexOf(c.sep);let r;while((r=e.lastIndexOf(c.sep))>t){e=e.slice(0,r);if(await this.isFile(e+c.sep+"package.json"))return e}return undefined}async emitDependency(e,t){if(this.processed.has(e)){if(t){await this.emitFile(e,"dependency",t)}return}this.processed.add(e);const r=await this.emitFile(e,"dependency",t);if(!r)return;if(e.endsWith(".json"))return;if(e.endsWith(".node"))return await(0,h.sharedLibEmit)(e,this);if(e.endsWith(".js")||e.endsWith(".ts")){const t=await this.getPjsonBoundary(e);if(t)await this.emitFile(t+c.sep+"package.json","resolve",e)}let s;const a=this.analysisCache.get(e);if(a){s=a}else{const t=await this.readFile(e);if(t===null)throw new Error("File "+e+" does not exist.");s=await(0,f.default)(e,t.toString(),this);this.analysisCache.set(e,s)}const{deps:o,imports:u,assets:d,isESM:p}=s;if(p){this.esmFileList.add((0,c.relative)(this.base,e))}await Promise.all([...[...d].map((async t=>{const r=(0,c.extname)(t);if(r===".js"||r===".mjs"||r===".node"||r===""||this.ts&&(r===".ts"||r===".tsx")&&t.startsWith(this.base)&&t.slice(this.base.length).indexOf(c.sep+"node_modules"+c.sep)===-1)await this.emitDependency(t,e);else await this.emitFile(t,"asset",e)})),...[...o].map((async t=>this.maybeEmitDep(t,e,!p))),...[...u].map((async t=>this.maybeEmitDep(t,e,false)))])}}t.Job=Job},1:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NotFoundError=void 0;const s=r(1017);async function resolveDependency(e,t,r,a=true){let o;if((0,s.isAbsolute)(e)||e==="."||e===".."||e.startsWith("./")||e.startsWith("../")){const a=e.endsWith("/");o=await resolvePath((0,s.resolve)(t,"..",e)+(a?"/":""),t,r)}else if(e[0]==="#"){o=await packageImportsResolve(e,t,r,a)}else{o=await resolvePackage(e,t,r,a)}if(Array.isArray(o)){return Promise.all(o.map((e=>r.realpath(e,t))))}else if(o.startsWith("node:")){return o}else{return r.realpath(o,t)}}t["default"]=resolveDependency;async function resolvePath(e,t,r){const s=await resolveFile(e,t,r)||await resolveDir(e,t,r);if(!s){throw new NotFoundError(e,t)}return s}async function resolveFile(e,t,r){if(e.endsWith("/"))return undefined;e=await r.realpath(e,t);if(await r.isFile(e))return e;if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1&&await r.isFile(e+".ts"))return e+".ts";if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1&&await r.isFile(e+".tsx"))return e+".tsx";if(await r.isFile(e+".js"))return e+".js";if(await r.isFile(e+".json"))return e+".json";if(await r.isFile(e+".node"))return e+".node";return undefined}async function resolveDir(e,t,r){if(e.endsWith("/"))e=e.slice(0,-1);if(!await r.isDir(e))return;const a=await getPkgCfg(e,r);if(a&&typeof a.main==="string"){const o=await resolveFile((0,s.resolve)(e,a.main),t,r)||await resolveFile((0,s.resolve)(e,a.main,"index"),t,r);if(o){await r.emitFile(e+s.sep+"package.json","resolve",t);return o}}return resolveFile((0,s.resolve)(e,"index"),t,r)}class NotFoundError extends Error{constructor(e,t){super("Cannot find module '"+e+"' loaded from "+t);this.code="MODULE_NOT_FOUND"}}t.NotFoundError=NotFoundError;const a=new Set([...r(8102)._builtinLibs,"constants","module","timers","console","_stream_writable","_stream_readable","_stream_duplex","process","sys"]);function getPkgName(e){const t=e.split("/");if(e[0]==="@"&&t.length>1)return t.length>1?t.slice(0,2).join("/"):null;return t.length?t[0]:null}async function getPkgCfg(e,t){const r=await t.readFile(e+s.sep+"package.json");if(r){try{return JSON.parse(r.toString())}catch(e){}}return undefined}function getExportsTarget(e,t,r){if(typeof e==="string"){return e}else if(e===null){return e}else if(Array.isArray(e)){for(const s of e){const e=getExportsTarget(s,t,r);if(e===null||typeof e==="string"&&e.startsWith("./"))return e}}else if(typeof e==="object"){for(const s of Object.keys(e)){if(s==="default"||s==="require"&&r||s==="import"&&!r||t.includes(s)){const a=getExportsTarget(e[s],t,r);if(a!==undefined)return a}}}return undefined}function resolveExportsImports(e,t,r,s,a,o){let u;if(a){if(!(typeof t==="object"&&!Array.isArray(t)&&t!==null))return undefined;u=t}else if(typeof t==="string"||Array.isArray(t)||t===null||typeof t==="object"&&Object.keys(t).length&&Object.keys(t)[0][0]!=="."){u={".":t}}else{u=t}if(r in u){const t=getExportsTarget(u[r],s.conditions,o);if(typeof t==="string"&&t.startsWith("./"))return e+t.slice(1)}for(const t of Object.keys(u).sort(((e,t)=>t.length-e.length))){if(t.endsWith("*")&&r.startsWith(t.slice(0,-1))){const a=getExportsTarget(u[t],s.conditions,o);if(typeof a==="string"&&a.startsWith("./"))return e+a.slice(1).replace(/\*/g,r.slice(t.length-1))}if(!t.endsWith("/"))continue;if(r.startsWith(t)){const a=getExportsTarget(u[t],s.conditions,o);if(typeof a==="string"&&a.endsWith("/")&&a.startsWith("./"))return e+a.slice(1)+r.slice(t.length)}}return undefined}async function packageImportsResolve(e,t,r,a){if(e!=="#"&&!e.startsWith("#/")&&r.conditions){const o=await r.getPjsonBoundary(t);if(o){const u=await getPkgCfg(o,r);const{imports:c}=u||{};if(u&&c!==null&&c!==undefined){let u=resolveExportsImports(o,c,e,r,true,a);if(u){if(a)u=await resolveFile(u,t,r)||await resolveDir(u,t,r);else if(!await r.isFile(u))throw new NotFoundError(u,t);if(u){await r.emitFile(o+s.sep+"package.json","resolve",t);return u}}}}}throw new NotFoundError(e,t)}async function resolvePackage(e,t,r,o){let u=t;if(a.has(e))return"node:"+e;if(e.startsWith("node:"))return e;const c=getPkgName(e)||"";let f;if(r.conditions){const a=await r.getPjsonBoundary(t);if(a){const u=await getPkgCfg(a,r);const{exports:d}=u||{};if(u&&u.name&&u.name===c&&d!==null&&d!==undefined){f=resolveExportsImports(a,d,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f)await r.emitFile(a+s.sep+"package.json","resolve",t)}}}let d;const p=u.indexOf(s.sep);while((d=u.lastIndexOf(s.sep))>p){u=u.slice(0,d);const a=u+s.sep+"node_modules";const p=await r.stat(a);if(!p||!p.isDirectory())continue;const h=await getPkgCfg(a+s.sep+c,r);const{exports:v}=h||{};if(r.conditions&&v!==undefined&&v!==null&&!f){let u;if(!r.exportsOnly)u=await resolveFile(a+s.sep+e,t,r)||await resolveDir(a+s.sep+e,t,r);let f=resolveExportsImports(a+s.sep+c,v,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f){await r.emitFile(a+s.sep+c+s.sep+"package.json","resolve",t);if(u&&u!==f)return[f,u];return f}if(u)return u}else{const o=await resolveFile(a+s.sep+e,t,r)||await resolveDir(a+s.sep+e,t,r);if(o){if(f&&f!==o)return[o,f];return o}}}if(f)return f;if(Object.hasOwnProperty.call(r.paths,e)){return r.paths[e]}for(const s of Object.keys(r.paths)){if(s.endsWith("/")&&e.startsWith(s)){const a=r.paths[s]+e.slice(s.length);const o=await resolveFile(a,t,r)||await resolveDir(a,t,r);if(!o){throw new NotFoundError(e,t)}return o}}throw new NotFoundError(e,t)}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},9336:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isLoop=t.isVarLoop=t.isIdentifierRead=void 0;function isIdentifierRead(e,t){switch(t.type){case"ObjectPattern":case"ArrayPattern":return false;case"AssignmentExpression":return t.right===e;case"MemberExpression":return t.computed||e===t.object;case"Property":return e===t.value;case"MethodDefinition":return false;case"VariableDeclarator":return t.id!==e;case"ExportSpecifier":return false;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return false;default:return true}}t.isIdentifierRead=isIdentifierRead;function isVarLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"}t.isVarLoop=isVarLoop;function isLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="WhileStatement"||e.type==="DoWhileStatement"}t.isLoop=isLoop},2100:function(__unused_webpack_module,exports,__nccwpck_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:true});exports.nbind=exports.pregyp=void 0;const path_1=__importDefault(__nccwpck_require__(1017));const graceful_fs_1=__importDefault(__nccwpck_require__(9165));const versioning=__nccwpck_require__(2821);const napi=__nccwpck_require__(5977);const pregypFind=(e,t)=>{const r=JSON.parse(graceful_fs_1.default.readFileSync(e).toString());versioning.validate_config(r,t);var s;if(napi.get_napi_build_versions(r,t)){s=napi.get_best_napi_build_version(r,t)}t=t||{};if(!t.module_root)t.module_root=path_1.default.dirname(e);var a=versioning.evaluate(r,t,s);return a.module};exports.pregyp={default:{find:pregypFind},find:pregypFind};function makeModulePathList(e,t){return[[e,t],[e,"build",t],[e,"build","Debug",t],[e,"build","Release",t],[e,"out","Debug",t],[e,"Debug",t],[e,"out","Release",t],[e,"Release",t],[e,"build","default",t],[e,process.env["NODE_BINDINGS_COMPILED_DIR"]||"compiled",process.versions.node,process.platform,process.arch,t]]}function findCompiledModule(basePath,specList){var resolvedList=[];var ext=path_1.default.extname(basePath);for(var _i=0,specList_1=specList;_i{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPackageName=t.getPackageBase=void 0;const r=/^(@[^\\\/]+[\\\/])?[^\\\/]+/;function getPackageBase(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const s=e.slice(t+13).match(r);if(s)return e.slice(0,t+13+s[0].length)}return undefined}t.getPackageBase=getPackageBase;function getPackageName(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const s=e.slice(t+13).match(r);if(s&&s.length>0){return s[0].replace(/\\/g,"/")}}return undefined}t.getPackageName=getPackageName},7393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeWildcardRequire=t.normalizeDefaultRequire=void 0;function normalizeDefaultRequire(e){if(e&&e.__esModule)return e;return{default:e}}t.normalizeDefaultRequire=normalizeDefaultRequire;const r=Object.prototype.hasOwnProperty;function normalizeWildcardRequire(e){if(e&&e.__esModule)return e;const t={};for(const s in e){if(!r.call(e,s))continue;t[s]=e[s]}t["default"]=e;return t}t.normalizeWildcardRequire=normalizeWildcardRequire},8908:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.sharedLibEmit=void 0;const a=s(r(2037));const o=s(r(3535));const u=r(1226);let c="";switch(a.default.platform()){case"darwin":c="/**/*.@(dylib|so?(.*))";break;case"win32":c="/**/*.dll";break;default:c="/**/*.so?(.*)"}async function sharedLibEmit(e,t){const r=(0,u.getPackageBase)(e);if(!r)return;const s=await new Promise(((e,t)=>(0,o.default)(r+c,{ignore:r+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));await Promise.all(s.map((r=>t.emitFile(r,"sharedlib",e))))}t.sharedLibEmit=sharedLibEmit},1415:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=r(1017);const o=s(r(1));const u=r(1226);const c=r(9165);const f={"@generated/photon"({id:e,emitAssetDirectory:t}){if(e.endsWith("@generated/photon/index.js")){t((0,a.resolve)((0,a.dirname)(e),"runtime/"))}},argon2({id:e,emitAssetDirectory:t}){if(e.endsWith("argon2/argon2.js")){t((0,a.resolve)((0,a.dirname)(e),"build","Release"));t((0,a.resolve)((0,a.dirname)(e),"prebuilds"));t((0,a.resolve)((0,a.dirname)(e),"lib","binding"))}},bull({id:e,emitAssetDirectory:t}){if(e.endsWith("bull/lib/commands/index.js")){t((0,a.resolve)((0,a.dirname)(e)))}},camaro({id:e,emitAsset:t}){if(e.endsWith("camaro/dist/camaro.js")){t((0,a.resolve)((0,a.dirname)(e),"camaro.wasm"))}},esbuild({id:e,emitAssetDirectory:t}){if(e.endsWith("esbuild/lib/main.js")){const r=(0,a.resolve)(e,"..","..","package.json");const s=JSON.parse((0,c.readFileSync)(r,"utf8"));for(const r of Object.keys(s.optionalDependencies||{})){const s=(0,a.resolve)(e,"..","..","..",r);t(s)}}},"google-gax"({id:e,ast:t,emitAssetDirectory:r}){if(e.endsWith("google-gax/build/src/grpc.js")){for(const s of t.body){if(s.type==="VariableDeclaration"&&s.declarations[0].id.type==="Identifier"&&s.declarations[0].id.name==="googleProtoFilesDir"){r((0,a.resolve)((0,a.dirname)(e),"../../../google-proto-files"))}}}},oracledb({id:e,ast:t,emitAsset:r}){if(e.endsWith("oracledb/lib/oracledb.js")){for(const s of t.body){if(s.type==="ForStatement"&&"body"in s.body&&s.body.body&&Array.isArray(s.body.body)&&s.body.body[0]&&s.body.body[0].type==="TryStatement"&&s.body.body[0].block.body[0]&&s.body.body[0].block.body[0].type==="ExpressionStatement"&&s.body.body[0].block.body[0].expression.type==="AssignmentExpression"&&s.body.body[0].block.body[0].expression.operator==="="&&s.body.body[0].block.body[0].expression.left.type==="Identifier"&&s.body.body[0].block.body[0].expression.left.name==="oracledbCLib"&&s.body.body[0].block.body[0].expression.right.type==="CallExpression"&&s.body.body[0].block.body[0].expression.right.callee.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.callee.name==="require"&&s.body.body[0].block.body[0].expression.right.arguments.length===1&&s.body.body[0].block.body[0].expression.right.arguments[0].type==="MemberExpression"&&s.body.body[0].block.body[0].expression.right.arguments[0].computed===true&&s.body.body[0].block.body[0].expression.right.arguments[0].object.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.arguments[0].object.name==="binaryLocations"&&s.body.body[0].block.body[0].expression.right.arguments[0].property.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.arguments[0].property.name==="i"){s.body.body[0].block.body[0].expression.right.arguments=[{type:"Literal",value:"_"}];const t=global._unit?"3.0.0":JSON.parse((0,c.readFileSync)(e.slice(0,-15)+"package.json","utf8")).version;const o=Number(t.slice(0,t.indexOf(".")))>=4;const u="oracledb-"+(o?t:"abi"+process.versions.modules)+"-"+process.platform+"-"+process.arch+".node";r((0,a.resolve)(e,"../../build/Release/"+u))}}}},"phantomjs-prebuilt"({id:e,emitAssetDirectory:t}){if(e.endsWith("phantomjs-prebuilt/lib/phantomjs.js")){t((0,a.resolve)((0,a.dirname)(e),"..","bin"))}},"remark-prism"({id:e,emitAssetDirectory:t}){const r="remark-prism/src/highlight.js";if(e.endsWith(r)){try{const s=e.slice(0,-r.length);t((0,a.resolve)(s,"prismjs","components"))}catch(e){}}},semver({id:e,emitAsset:t}){if(e.endsWith("semver/index.js")){t((0,a.resolve)(e.replace("index.js","preload.js")))}},"socket.io":async function({id:e,ast:t,job:r}){if(e.endsWith("socket.io/lib/index.js")){async function replaceResolvePathStatement(t){if(t.type==="ExpressionStatement"&&t.expression.type==="AssignmentExpression"&&t.expression.operator==="="&&t.expression.right.type==="CallExpression"&&t.expression.right.callee.type==="Identifier"&&t.expression.right.callee.name==="read"&&t.expression.right.arguments.length>=1&&t.expression.right.arguments[0].type==="CallExpression"&&t.expression.right.arguments[0].callee.type==="Identifier"&&t.expression.right.arguments[0].callee.name==="resolvePath"&&t.expression.right.arguments[0].arguments.length===1&&t.expression.right.arguments[0].arguments[0].type==="Literal"){const s=t.expression.right.arguments[0].arguments[0].value;let u;try{const t=await(0,o.default)(String(s),e,r);if(typeof t==="string"){u=t}else{return undefined}}catch(e){return undefined}const c="/"+(0,a.relative)((0,a.dirname)(e),u);t.expression.right.arguments[0]={type:"BinaryExpression",start:t.expression.right.arguments[0].start,end:t.expression.right.arguments[0].end,operator:"+",left:{type:"Identifier",name:"__dirname"},right:{type:"Literal",value:c,raw:JSON.stringify(c)}}}return undefined}for(const e of t.body){if(e.type==="ExpressionStatement"&&e.expression.type==="AssignmentExpression"&&e.expression.operator==="="&&e.expression.left.type==="MemberExpression"&&e.expression.left.object.type==="MemberExpression"&&e.expression.left.object.object.type==="Identifier"&&e.expression.left.object.object.name==="Server"&&e.expression.left.object.property.type==="Identifier"&&e.expression.left.object.property.name==="prototype"&&e.expression.left.property.type==="Identifier"&&e.expression.left.property.name==="serveClient"&&e.expression.right.type==="FunctionExpression"){for(const t of e.expression.right.body.body){if(t.type==="IfStatement"&&t.consequent&&"body"in t.consequent&&t.consequent.body){const e=t.consequent.body;let r=false;if(Array.isArray(e)&&e[0]&&e[0].type==="ExpressionStatement"){r=await replaceResolvePathStatement(e[0])}if(Array.isArray(e)&&e[1]&&e[1].type==="TryStatement"&&e[1].block.body&&e[1].block.body[0]){r=await replaceResolvePathStatement(e[1].block.body[0])||r}return}}}}}},typescript({id:e,emitAssetDirectory:t}){if(e.endsWith("typescript/lib/tsc.js")){t((0,a.resolve)(e,"../"))}},"uglify-es"({id:e,emitAsset:t}){if(e.endsWith("uglify-es/tools/node.js")){t((0,a.resolve)(e,"../../lib/utils.js"));t((0,a.resolve)(e,"../../lib/ast.js"));t((0,a.resolve)(e,"../../lib/parse.js"));t((0,a.resolve)(e,"../../lib/transform.js"));t((0,a.resolve)(e,"../../lib/scope.js"));t((0,a.resolve)(e,"../../lib/output.js"));t((0,a.resolve)(e,"../../lib/compress.js"));t((0,a.resolve)(e,"../../lib/sourcemap.js"));t((0,a.resolve)(e,"../../lib/mozilla-ast.js"));t((0,a.resolve)(e,"../../lib/propmangle.js"));t((0,a.resolve)(e,"../../lib/minify.js"));t((0,a.resolve)(e,"../exports.js"))}},"uglify-js"({id:e,emitAsset:t,emitAssetDirectory:r}){if(e.endsWith("uglify-js/tools/node.js")){r((0,a.resolve)(e,"../../lib"));t((0,a.resolve)(e,"../exports.js"))}},"playwright-core"({id:e,emitAsset:t}){if(e.endsWith("playwright-core/index.js")){t((0,a.resolve)((0,a.dirname)(e),"browsers.json"))}},"geo-tz"({id:e,emitAsset:t}){if(e.endsWith("geo-tz/dist/geo-tz.js")){t((0,a.resolve)((0,a.dirname)(e),"../data/geo.dat"))}},pixelmatch({id:e,emitDependency:t}){if(e.endsWith("pixelmatch/index.js")){t((0,a.resolve)((0,a.dirname)(e),"bin/pixelmatch"))}}};async function handleSpecialCases({id:e,ast:t,emitDependency:r,emitAsset:s,emitAssetDirectory:a,job:o}){const c=(0,u.getPackageName)(e);const d=f[c||""];e=e.replace(/\\/g,"/");if(d)await d({id:e,ast:t,emitDependency:r,emitAsset:s,emitAssetDirectory:a,job:o})}t["default"]=handleSpecialCases},4370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wildcardRegEx=t.WILDCARD=t.FUNCTION=t.UNKNOWN=t.evaluate=void 0;const s=r(7310);async function evaluate(e,t={},r=true){const s={computeBranches:r,vars:t};return walk(e);function walk(e){const t=a[e.type];if(t){return t.call(s,e,walk)}return undefined}}t.evaluate=evaluate;t.UNKNOWN=Symbol();t.FUNCTION=Symbol();t.WILDCARD="";t.wildcardRegEx=/\x1a/g;function countWildcards(e){t.wildcardRegEx.lastIndex=0;let r=0;while(t.wildcardRegEx.exec(e))r++;return r}const a={ArrayExpression:async function ArrayExpression(e,t){const r=[];for(let s=0,a=e.elements.length;ss.value}}}return undefined},BinaryExpression:async function BinaryExpression(e,r){const s=e.operator;let a=await r(e.left);if(!a&&s!=="+")return;let o=await r(e.right);if(!a&&!o)return;if(!a){if(this.computeBranches&&o&&"value"in o&&typeof o.value==="string")return{value:t.WILDCARD+o.value,wildcards:[e.left,...o.wildcards||[]]};return}if(!o){if(this.computeBranches&&s==="+"){if(a&&"value"in a&&typeof a.value==="string")return{value:a.value+t.WILDCARD,wildcards:[...a.wildcards||[],e.right]}}if(!("test"in a)&&s==="||"&&a.value)return a;return}if("test"in a&&"value"in o){const e=o.value;if(s==="==")return{test:a.test,then:a.then==e,else:a.else==e};if(s==="===")return{test:a.test,then:a.then===e,else:a.else===e};if(s==="!=")return{test:a.test,then:a.then!=e,else:a.else!=e};if(s==="!==")return{test:a.test,then:a.then!==e,else:a.else!==e};if(s==="+")return{test:a.test,then:a.then+e,else:a.else+e};if(s==="-")return{test:a.test,then:a.then-e,else:a.else-e};if(s==="*")return{test:a.test,then:a.then*e,else:a.else*e};if(s==="/")return{test:a.test,then:a.then/e,else:a.else/e};if(s==="%")return{test:a.test,then:a.then%e,else:a.else%e};if(s==="<")return{test:a.test,then:a.then")return{test:a.test,then:a.then>e,else:a.else>e};if(s===">=")return{test:a.test,then:a.then>=e,else:a.else>=e};if(s==="|")return{test:a.test,then:a.then|e,else:a.else|e};if(s==="&")return{test:a.test,then:a.then&e,else:a.else&e};if(s==="^")return{test:a.test,then:a.then^e,else:a.else^e};if(s==="&&")return{test:a.test,then:a.then&&e,else:a.else&&e};if(s==="||")return{test:a.test,then:a.then||e,else:a.else||e}}else if("test"in o&&"value"in a){const e=a.value;if(s==="==")return{test:o.test,then:e==o.then,else:e==o.else};if(s==="===")return{test:o.test,then:e===o.then,else:e===o.else};if(s==="!=")return{test:o.test,then:e!=o.then,else:e!=o.else};if(s==="!==")return{test:o.test,then:e!==o.then,else:e!==o.else};if(s==="+")return{test:o.test,then:e+o.then,else:e+o.else};if(s==="-")return{test:o.test,then:e-o.then,else:e-o.else};if(s==="*")return{test:o.test,then:e*o.then,else:e*o.else};if(s==="/")return{test:o.test,then:e/o.then,else:e/o.else};if(s==="%")return{test:o.test,then:e%o.then,else:e%o.else};if(s==="<")return{test:o.test,then:e")return{test:o.test,then:e>o.then,else:e>o.else};if(s===">=")return{test:o.test,then:e>=o.then,else:e>=o.else};if(s==="|")return{test:o.test,then:e|o.then,else:e|o.else};if(s==="&")return{test:o.test,then:e&o.then,else:e&o.else};if(s==="^")return{test:o.test,then:e^o.then,else:e^o.else};if(s==="&&")return{test:o.test,then:e&&o.then,else:a&&o.else};if(s==="||")return{test:o.test,then:e||o.then,else:a||o.else}}else if("value"in a&&"value"in o){if(s==="==")return{value:a.value==o.value};if(s==="===")return{value:a.value===o.value};if(s==="!=")return{value:a.value!=o.value};if(s==="!==")return{value:a.value!==o.value};if(s==="+"){const e={value:a.value+o.value};let t=[];if("wildcards"in a&&a.wildcards){t=t.concat(a.wildcards)}if("wildcards"in o&&o.wildcards){t=t.concat(o.wildcards)}if(t.length>0){e.wildcards=t}return e}if(s==="-")return{value:a.value-o.value};if(s==="*")return{value:a.value*o.value};if(s==="/")return{value:a.value/o.value};if(s==="%")return{value:a.value%o.value};if(s==="<")return{value:a.value")return{value:a.value>o.value};if(s===">=")return{value:a.value>=o.value};if(s==="|")return{value:a.value|o.value};if(s==="&")return{value:a.value&o.value};if(s==="^")return{value:a.value^o.value};if(s==="&&")return{value:a.value&&o.value};if(s==="||")return{value:a.value||o.value}}return},CallExpression:async function CallExpression(e,r){const s=await r(e.callee);if(!s||"test"in s)return;let a=s.value;if(typeof a==="object"&&a!==null)a=a[t.FUNCTION];if(typeof a!=="function")return;let o=null;if(e.callee.object){o=await r(e.callee.object);o=o&&"value"in o&&o.value?o.value:null}let u;let c=[];let f;let d=e.arguments.length>0&&e.callee.property?.name!=="concat";const p=[];for(let s=0,a=e.arguments.length;sp.push(e)))}else{if(!this.computeBranches)return;a={value:t.WILDCARD};p.push(e.arguments[s])}if("test"in a){if(p.length)return;if(u)return;u=a.test;f=c.concat([]);c.push(a.then);f.push(a.else)}else{c.push(a.value);if(f)f.push(a.value)}}if(d)return;try{const e=await a.apply(o,c);if(e===t.UNKNOWN)return;if(!u){if(p.length){if(typeof e!=="string"||countWildcards(e)!==p.length)return;return{value:e,wildcards:p}}return{value:e}}const r=await a.apply(o,f);if(e===t.UNKNOWN)return;return{test:u,then:e,else:r}}catch(e){return}},ConditionalExpression:async function ConditionalExpression(e,t){const r=await t(e.test);if(r&&"value"in r)return r.value?t(e.consequent):t(e.alternate);if(!this.computeBranches)return;const s=await t(e.consequent);if(!s||"wildcards"in s||"test"in s)return;const a=await t(e.alternate);if(!a||"wildcards"in a||"test"in a)return;return{test:e.test,then:s.value,else:a.value}},ExpressionStatement:async function ExpressionStatement(e,t){return t(e.expression)},Identifier:async function Identifier(e,t){if(Object.hasOwnProperty.call(this.vars,e.name))return this.vars[e.name];return undefined},Literal:async function Literal(e,t){return{value:e.value}},MemberExpression:async function MemberExpression(e,r){const s=await r(e.object);if(!s||"test"in s||typeof s.value==="function"){return undefined}if(e.property.type==="Identifier"){if(typeof s.value==="string"&&e.property.name==="concat"){return{value:{[t.FUNCTION]:(...e)=>s.value.concat(e)}}}if(typeof s.value==="object"&&s.value!==null){const a=s.value;if(e.computed){const o=await r(e.property);if(o&&"value"in o&&o.value){const e=a[o.value];if(e===t.UNKNOWN)return undefined;return{value:e}}if(!a[t.UNKNOWN]&&Object.keys(s).length===0){return{value:undefined}}}else if(e.property.name in a){const r=a[e.property.name];if(r===t.UNKNOWN)return undefined;return{value:r}}else if(a[t.UNKNOWN])return undefined}else{return{value:undefined}}}const a=await r(e.property);if(!a||"test"in a)return undefined;if(typeof s.value==="object"&&s.value!==null){if(a.value in s.value){const e=s.value[a.value];if(e===t.UNKNOWN)return undefined;return{value:e}}else if(s.value[t.UNKNOWN]){return undefined}}else{return{value:undefined}}return undefined},MetaProperty:async function MetaProperty(e){if(e.meta.name==="import"&&e.property.name==="meta")return{value:this.vars["import.meta"]};return undefined},NewExpression:async function NewExpression(e,t){const r=await t(e.callee);if(r&&"value"in r&&r.value===s.URL&&e.arguments.length){const r=await t(e.arguments[0]);if(!r)return undefined;let a=null;if(e.arguments[1]){a=await t(e.arguments[1]);if(!a||!("value"in a))return undefined}if("value"in r){if(a){try{return{value:new s.URL(r.value,a.value)}}catch{return undefined}}try{return{value:new s.URL(r.value)}}catch{return undefined}}else{const e=r.test;if(a){try{return{test:e,then:new s.URL(r.then,a.value),else:new s.URL(r.else,a.value)}}catch{return undefined}}try{return{test:e,then:new s.URL(r.then),else:new s.URL(r.else)}}catch{return undefined}}}return undefined},ObjectExpression:async function ObjectExpression(e,r){const s={};for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.handleWrappers=void 0;const s=r(3982);function isUndefinedOrVoid(e){return e.type==="Identifier"&&e.name==="undefined"||e.type==="UnaryExpression"&&e.operator==="void"&&e.argument.type==="Literal"&&e.argument.value===0}function handleWrappers(e){let t;if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="UnaryExpression"&&e.body[0].expression.operator==="!"&&e.body[0].expression.argument.type==="CallExpression"&&e.body[0].expression.argument.callee.type==="FunctionExpression"&&e.body[0].expression.argument.arguments.length===1)t=e.body[0].expression.argument;else if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="CallExpression"&&e.body[0].expression.callee.type==="FunctionExpression"&&(e.body[0].expression.arguments.length===1||e.body[0].expression.arguments.length===0))t=e.body[0].expression;else if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="AssignmentExpression"&&e.body[0].expression.left.type==="MemberExpression"&&e.body[0].expression.left.object.type==="Identifier"&&e.body[0].expression.left.object.name==="module"&&e.body[0].expression.left.property.type==="Identifier"&&e.body[0].expression.left.property.name==="exports"&&e.body[0].expression.right.type==="CallExpression"&&e.body[0].expression.right.callee.type==="FunctionExpression"&&e.body[0].expression.right.arguments.length===1)t=e.body[0].expression.right;if(t){let e;let r;if(t.arguments[0]&&t.arguments[0].type==="ConditionalExpression"&&t.arguments[0].test.type==="LogicalExpression"&&t.arguments[0].test.operator==="&&"&&t.arguments[0].test.left.type==="BinaryExpression"&&t.arguments[0].test.left.operator==="==="&&t.arguments[0].test.left.left.type==="UnaryExpression"&&t.arguments[0].test.left.left.operator==="typeof"&&"name"in t.arguments[0].test.left.left.argument&&t.arguments[0].test.left.left.argument.name==="define"&&t.arguments[0].test.left.right.type==="Literal"&&t.arguments[0].test.left.right.value==="function"&&t.arguments[0].test.right.type==="MemberExpression"&&t.arguments[0].test.right.object.type==="Identifier"&&t.arguments[0].test.right.property.type==="Identifier"&&t.arguments[0].test.right.property.name==="amd"&&t.arguments[0].test.right.computed===false&&t.arguments[0].alternate.type==="FunctionExpression"&&t.arguments[0].alternate.params.length===1&&t.arguments[0].alternate.params[0].type==="Identifier"&&t.arguments[0].alternate.body.body.length===1&&t.arguments[0].alternate.body.body[0].type==="ExpressionStatement"&&t.arguments[0].alternate.body.body[0].expression.type==="AssignmentExpression"&&t.arguments[0].alternate.body.body[0].expression.left.type==="MemberExpression"&&t.arguments[0].alternate.body.body[0].expression.left.object.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.left.object.name==="module"&&t.arguments[0].alternate.body.body[0].expression.left.property.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.left.property.name==="exports"&&t.arguments[0].alternate.body.body[0].expression.left.computed===false&&t.arguments[0].alternate.body.body[0].expression.right.type==="CallExpression"&&t.arguments[0].alternate.body.body[0].expression.right.callee.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.right.callee.name===t.arguments[0].alternate.params[0].name&&"body"in t.callee&&"body"in t.callee.body&&Array.isArray(t.callee.body.body)&&t.arguments[0].alternate.body.body[0].expression.right.arguments.length===1&&t.arguments[0].alternate.body.body[0].expression.right.arguments[0].type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.right.arguments[0].name==="require"){let e=t.callee.body.body;if(e[0].type==="ExpressionStatement"&&e[0].expression.type==="Literal"&&e[0].expression.value==="use strict"){e=e.slice(1)}if(e.length===1&&e[0].type==="ExpressionStatement"&&e[0].expression.type==="CallExpression"&&e[0].expression.callee.type==="Identifier"&&e[0].expression.callee.name===t.arguments[0].test.right.object.name&&e[0].expression.arguments.length===1&&e[0].expression.arguments[0].type==="FunctionExpression"&&e[0].expression.arguments[0].params.length===1&&e[0].expression.arguments[0].params[0].type==="Identifier"&&e[0].expression.arguments[0].params[0].name==="require"){const t=e[0].expression.arguments[0];t.params=[];try{delete t.scope.declarations.require}catch(e){}}}else if(t.arguments[0]&&t.arguments[0].type==="FunctionExpression"&&t.arguments[0].params.length===0&&(t.arguments[0].body.body.length===1||t.arguments[0].body.body.length===2&&t.arguments[0].body.body[0].type==="VariableDeclaration"&&t.arguments[0].body.body[0].declarations.length===3&&t.arguments[0].body.body[0].declarations.every((e=>e.init===null&&e.id.type==="Identifier")))&&t.arguments[0].body.body[t.arguments[0].body.body.length-1].type==="ReturnStatement"&&(e=t.arguments[0].body.body[t.arguments[0].body.body.length-1])&&e.argument?.type==="CallExpression"&&e.argument.arguments.length&&e.argument.arguments.every((e=>e&&e.type==="Literal"&&typeof e.value==="number"))&&e.argument.callee.type==="CallExpression"&&(e.argument.callee.callee.type==="FunctionExpression"||e.argument.callee.callee.type==="CallExpression"&&e.argument.callee.callee.callee.type==="FunctionExpression"&&e.argument.callee.callee.arguments.length===0)&&e.argument.callee.arguments.length===3&&e.argument.callee.arguments[0].type==="ObjectExpression"&&e.argument.callee.arguments[1].type==="ObjectExpression"&&e.argument.callee.arguments[2].type==="ArrayExpression"){const t=e.argument.callee.arguments[0].properties;const r={};if(t.every((e=>{if(e.type!=="Property"||e.computed!==false||e.key.type!=="Literal"||typeof e.key.value!=="number"||e.value.type!=="ArrayExpression"||e.value.elements.length!==2||!e.value.elements[0]||!e.value.elements[1]||e.value.elements[0].type!=="FunctionExpression"||e.value.elements[1].type!=="ObjectExpression"){return false}const t=e.value.elements[1].properties;for(const e of t){if(e.type!=="Property"||e.value.type!=="Identifier"&&e.value.type!=="Literal"&&!isUndefinedOrVoid(e.value)||!(e.key.type==="Literal"&&typeof e.key.value==="string"||e.key.type==="Identifier")||e.computed){return false}if(isUndefinedOrVoid(e.value)){if(e.key.type==="Identifier"){r[e.key.name]={type:"Literal",start:e.key.start,end:e.key.end,value:e.key.name,raw:JSON.stringify(e.key.name)}}else if(e.key.type==="Literal"){r[String(e.key.value)]=e.key}}}return true}))){const t=Object.keys(r);const s=e.argument.callee.arguments[1];s.properties=t.map((e=>({type:"Property",method:false,shorthand:false,computed:false,kind:"init",key:r[e],value:{type:"ObjectExpression",properties:[{type:"Property",kind:"init",method:false,shorthand:false,computed:false,key:{type:"Identifier",name:"exports"},value:{type:"CallExpression",optional:false,callee:{type:"Identifier",name:"require"},arguments:[r[e]]}}]}})))}}else if(t.arguments[0]&&t.arguments[0].type==="FunctionExpression"&&t.arguments[0].params.length===2&&t.arguments[0].params[0].type==="Identifier"&&t.arguments[0].params[1].type==="Identifier"&&"body"in t.callee&&"body"in t.callee.body&&Array.isArray(t.callee.body.body)&&t.callee.body.body.length===1){const e=t.callee.body.body[0];if(e.type==="IfStatement"&&e.test.type==="LogicalExpression"&&e.test.operator==="&&"&&e.test.left.type==="BinaryExpression"&&e.test.left.left.type==="UnaryExpression"&&e.test.left.left.operator==="typeof"&&e.test.left.left.argument.type==="Identifier"&&e.test.left.left.argument.name==="module"&&e.test.left.right.type==="Literal"&&e.test.left.right.value==="object"&&e.test.right.type==="BinaryExpression"&&e.test.right.left.type==="UnaryExpression"&&e.test.right.left.operator==="typeof"&&e.test.right.left.argument.type==="MemberExpression"&&e.test.right.left.argument.object.type==="Identifier"&&e.test.right.left.argument.object.name==="module"&&e.test.right.left.argument.property.type==="Identifier"&&e.test.right.left.argument.property.name==="exports"&&e.test.right.right.type==="Literal"&&e.test.right.right.value==="object"&&e.consequent.type==="BlockStatement"&&e.consequent.body.length>0){let r;if(e.consequent.body[0].type==="VariableDeclaration"&&e.consequent.body[0].declarations[0].init&&e.consequent.body[0].declarations[0].init.type==="CallExpression")r=e.consequent.body[0].declarations[0].init;else if(e.consequent.body[0].type==="ExpressionStatement"&&e.consequent.body[0].expression.type==="CallExpression")r=e.consequent.body[0].expression;else if(e.consequent.body[0].type==="ExpressionStatement"&&e.consequent.body[0].expression.type==="AssignmentExpression"&&e.consequent.body[0].expression.operator==="="&&e.consequent.body[0].expression.right.type==="CallExpression")r=e.consequent.body[0].expression.right;if(r&&r.callee.type==="Identifier"&&"params"in t.callee&&t.callee.params.length>0&&"name"in t.callee.params[0]&&r.callee.name===t.callee.params[0].name&&r.arguments.length===2&&r.arguments[0].type==="Identifier"&&r.arguments[0].name==="require"&&r.arguments[1].type==="Identifier"&&r.arguments[1].name==="exports"){const e=t.arguments[0];e.params=[];try{const t=e.scope;delete t.declarations.require;delete t.declarations.exports}catch(e){}}}}else if(t.callee.type==="FunctionExpression"&&t.callee.body.body.length>2&&t.callee.body.body[0].type==="VariableDeclaration"&&t.callee.body.body[0].declarations.length===1&&t.callee.body.body[0].declarations[0].type==="VariableDeclarator"&&t.callee.body.body[0].declarations[0].id.type==="Identifier"&&t.callee.body.body[0].declarations[0].init&&(t.callee.body.body[0].declarations[0].init.type==="ObjectExpression"&&t.callee.body.body[0].declarations[0].init.properties.length===0||t.callee.body.body[0].declarations[0].init.type==="CallExpression"&&t.callee.body.body[0].declarations[0].init.arguments.length===1)&&(t.callee.body.body[1]&&t.callee.body.body[1].type==="FunctionDeclaration"&&t.callee.body.body[1].params.length===1&&t.callee.body.body[1].body.body.length>=3||t.callee.body.body[2]&&t.callee.body.body[2].type==="FunctionDeclaration"&&t.callee.body.body[2].params.length===1&&t.callee.body.body[2].body.body.length>=3)&&(t.arguments[0]&&(t.arguments[0].type==="ArrayExpression"&&(r=t.arguments[0])&&t.arguments[0].elements.length>0&&t.arguments[0].elements.every((e=>e&&e.type==="FunctionExpression"))||t.arguments[0].type==="ObjectExpression"&&(r=t.arguments[0])&&t.arguments[0].properties&&t.arguments[0].properties.length>0&&t.arguments[0].properties.every((e=>e&&e.type==="Property"&&!e.computed&&e.key&&e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number")&&e.value&&e.value.type==="FunctionExpression"))))||t.arguments.length===0&&t.callee.type==="FunctionExpression"&&t.callee.params.length===0&&t.callee.body.type==="BlockStatement"&&t.callee.body.body.length>5&&t.callee.body.body[0].type==="VariableDeclaration"&&t.callee.body.body[0].declarations.length===1&&t.callee.body.body[0].declarations[0].id.type==="Identifier"&&t.callee.body.body[1].type==="ExpressionStatement"&&t.callee.body.body[1].expression.type==="AssignmentExpression"&&t.callee.body.body[2].type==="ExpressionStatement"&&t.callee.body.body[2].expression.type==="AssignmentExpression"&&t.callee.body.body[3].type==="ExpressionStatement"&&t.callee.body.body[3].expression.type==="AssignmentExpression"&&t.callee.body.body[3].expression.left.type==="MemberExpression"&&t.callee.body.body[3].expression.left.object.type==="Identifier"&&t.callee.body.body[3].expression.left.object.name===t.callee.body.body[0].declarations[0].id.name&&t.callee.body.body[3].expression.left.property.type==="Identifier"&&t.callee.body.body[3].expression.left.property.name==="modules"&&t.callee.body.body[3].expression.right.type==="ObjectExpression"&&t.callee.body.body[3].expression.right.properties.every((e=>e&&e.type==="Property"&&!e.computed&&e.key&&e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number")&&e.value&&e.value.type==="FunctionExpression"))&&(r=t.callee.body.body[3].expression.right)&&(t.callee.body.body[4].type==="VariableDeclaration"&&t.callee.body.body[4].declarations.length===1&&t.callee.body.body[4].declarations[0].init&&t.callee.body.body[4].declarations[0].init.type==="CallExpression"&&t.callee.body.body[4].declarations[0].init.callee.type==="Identifier"&&t.callee.body.body[4].declarations[0].init.callee.name==="require"||t.callee.body.body[5].type==="VariableDeclaration"&&t.callee.body.body[5].declarations.length===1&&t.callee.body.body[5].declarations[0].init&&t.callee.body.body[5].declarations[0].init.type==="CallExpression"&&t.callee.body.body[5].declarations[0].init.callee.type==="Identifier"&&t.callee.body.body[5].declarations[0].init.callee.name==="require")){const e=new Map;let t;if(r.type==="ArrayExpression")t=r.elements.filter((e=>e?.type==="FunctionExpression")).map(((e,t)=>[String(t),e]));else t=r.properties.map((e=>[String(e.key.value),e.value]));for(const[r,s]of t){const t=s.body.body.length===1?s.body.body[0]:(s.body.body.length===2||s.body.body.length===3&&s.body.body[2].type==="EmptyStatement")&&s.body.body[0].type==="ExpressionStatement"&&s.body.body[0].expression.type==="Literal"&&s.body.body[0].expression.value==="use strict"?s.body.body[1]:null;if(t&&t.type==="ExpressionStatement"&&t.expression.type==="AssignmentExpression"&&t.expression.operator==="="&&t.expression.left.type==="MemberExpression"&&t.expression.left.object.type==="Identifier"&&"params"in s&&s.params.length>0&&"name"in s.params[0]&&t.expression.left.object.name===s.params[0].name&&t.expression.left.property.type==="Identifier"&&t.expression.left.property.name==="exports"&&t.expression.right.type==="CallExpression"&&t.expression.right.callee.type==="Identifier"&&t.expression.right.callee.name==="require"&&t.expression.right.arguments.length===1&&t.expression.right.arguments[0].type==="Literal"){e.set(r,t.expression.right.arguments[0].value)}}for(const[,r]of t){if("params"in r&&r.params.length===3&&r.params[2].type==="Identifier"){const t=new Map;(0,s.walk)(r.body,{enter(s,a){const o=s;const u=a;if(o.type==="CallExpression"&&o.callee.type==="Identifier"&&"name"in r.params[2]&&o.callee.name===r.params[2].name&&o.arguments.length===1&&o.arguments[0].type==="Literal"){const r=e.get(String(o.arguments[0].value));if(r){const e={type:"CallExpression",optional:false,callee:{type:"Identifier",name:"require"},arguments:[{type:"Literal",value:r}]};const s=u;if("right"in s&&s.right===o){s.right=e}else if("left"in s&&s.left===o){s.left=e}else if("object"in s&&s.object===o){s.object=e}else if("callee"in s&&s.callee===o){s.callee=e}else if("arguments"in s&&s.arguments.some((e=>e===o))){s.arguments=s.arguments.map((t=>t===o?e:t))}else if("init"in s&&s.init===o){if(s.type==="VariableDeclarator"&&s.id.type==="Identifier")t.set(s.id.name,r);s.init=e}}}else if(o.type==="CallExpression"&&o.callee.type==="MemberExpression"&&o.callee.object.type==="Identifier"&&"name"in r.params[2]&&o.callee.object.name===r.params[2].name&&o.callee.property.type==="Identifier"&&o.callee.property.name==="n"&&o.arguments.length===1&&o.arguments[0].type==="Identifier"){if(u&&"init"in u&&u.init===o){const e=o.arguments[0];const t={type:"CallExpression",optional:false,callee:{type:"MemberExpression",computed:false,optional:false,object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"assign"}},arguments:[{type:"ArrowFunctionExpression",expression:true,params:[],body:e},{type:"ObjectExpression",properties:[{type:"Property",kind:"init",method:false,computed:false,shorthand:false,key:{type:"Identifier",name:"a"},value:e}]}]};u.init=t}}}})}}}}}t.handleWrappers=handleWrappers},351:(e,t)=>{e.exports=t=abbrev.abbrev=abbrev;abbrev.monkeyPatch=monkeyPatch;function monkeyPatch(){Object.defineProperty(Array.prototype,"abbrev",{value:function(){return abbrev(this)},enumerable:false,configurable:true,writable:true});Object.defineProperty(Object.prototype,"abbrev",{value:function(){return abbrev(Object.keys(this))},enumerable:false,configurable:true,writable:true})}function abbrev(e){if(arguments.length!==1||!Array.isArray(e)){e=Array.prototype.slice.call(arguments,0)}for(var t=0,r=e.length,s=[];tt?1:-1}},878:e=>{"use strict";function isArguments(e){return e!=null&&typeof e==="object"&&e.hasOwnProperty("callee")}var t={"*":{label:"any",check:function(){return true}},A:{label:"array",check:function(e){return Array.isArray(e)||isArguments(e)}},S:{label:"string",check:function(e){return typeof e==="string"}},N:{label:"number",check:function(e){return typeof e==="number"}},F:{label:"function",check:function(e){return typeof e==="function"}},O:{label:"object",check:function(e){return typeof e==="object"&&e!=null&&!t.A.check(e)&&!t.E.check(e)}},B:{label:"boolean",check:function(e){return typeof e==="boolean"}},E:{label:"error",check:function(e){return e instanceof Error}},Z:{label:"null",check:function(e){return e==null}}};function addSchema(e,t){var r=t[e.length]=t[e.length]||[];if(r.indexOf(e)===-1)r.push(e)}var r=e.exports=function(e,r){if(arguments.length!==2)throw wrongNumberOfArgs(["SA"],arguments.length);if(!e)throw missingRequiredArg(0,"rawSchemas");if(!r)throw missingRequiredArg(1,"args");if(!t.S.check(e))throw invalidType(0,["string"],e);if(!t.A.check(r))throw invalidType(1,["array"],r);var s=e.split("|");var a={};s.forEach((function(e){for(var r=0;r{"use strict";t.TrackerGroup=r(308);t.Tracker=r(7605);t.TrackerStream=r(374)},5299:(e,t,r)=>{"use strict";var s=r(2361).EventEmitter;var a=r(3837);var o=0;var u=e.exports=function(e){s.call(this);this.id=++o;this.name=e};a.inherits(u,s)},308:(e,t,r)=>{"use strict";var s=r(3837);var a=r(5299);var o=r(7605);var u=r(374);var c=e.exports=function(e){a.call(this,e);this.parentGroup=null;this.trackers=[];this.completion={};this.weight={};this.totalWeight=0;this.finished=false;this.bubbleChange=bubbleChange(this)};s.inherits(c,a);function bubbleChange(e){return function(t,r,s){e.completion[s.id]=r;if(e.finished)return;e.emit("change",t||e.name,e.completed(),e)}}c.prototype.nameInTree=function(){var e=[];var t=this;while(t){e.unshift(t.name);t=t.parentGroup}return e.join("/")};c.prototype.addUnit=function(e,t){if(e.addUnit){var r=this;while(r){if(e===r){throw new Error("Attempted to add tracker group "+e.name+" to tree that already includes it "+this.nameInTree(this))}r=r.parentGroup}e.parentGroup=this}this.weight[e.id]=t||1;this.totalWeight+=this.weight[e.id];this.trackers.push(e);this.completion[e.id]=e.completed();e.on("change",this.bubbleChange);if(!this.finished)this.emit("change",e.name,this.completion[e.id],e);return e};c.prototype.completed=function(){if(this.trackers.length===0)return 0;var e=1/this.totalWeight;var t=0;for(var r=0;r{"use strict";var s=r(3837);var a=r(8511);var o=r(857);var u=r(7605);var c=e.exports=function(e,t,r){a.Transform.call(this,r);this.tracker=new u(e,t);this.name=e;this.id=this.tracker.id;this.tracker.on("change",delegateChange(this))};s.inherits(c,a.Transform);function delegateChange(e){return function(t,r,s){e.emit("change",t,r,e)}}c.prototype._transform=function(e,t,r){this.tracker.completeWork(e.length?e.length:1);this.push(e);r()};c.prototype._flush=function(e){this.tracker.finish();e()};o(c.prototype,"tracker").method("completed").method("addWork").method("finish")},7605:(e,t,r)=>{"use strict";var s=r(3837);var a=r(5299);var o=e.exports=function(e,t){a.call(this,e);this.workDone=0;this.workTodo=t||0};s.inherits(o,a);o.prototype.completed=function(){return this.workTodo===0?0:this.workDone/this.workTodo};o.prototype.addWork=function(e){this.workTodo+=e;this.emit("change",this.name,this.completed(),this)};o.prototype.completeWork=function(e){this.workDone+=e;if(this.workDone>this.workTodo)this.workDone=this.workTodo;this.emit("change",this.name,this.completed(),this)};o.prototype.finish=function(){this.workTodo=this.workDone=1;this.emit("change",this.name,1,this)}},3331:(module,exports,__nccwpck_require__)=>{var fs=__nccwpck_require__(7147),path=__nccwpck_require__(1017),fileURLToPath=__nccwpck_require__(7121),join=path.join,dirname=path.dirname,exists=fs.accessSync&&function(e){try{fs.accessSync(e)}catch(e){return false}return true}||fs.existsSync||path.existsSync,defaults={arrow:process.env.NODE_BINDINGS_ARROW||" → ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","addon-build","release","install-root","bindings"],["module_root","addon-build","debug","install-root","bindings"],["module_root","addon-build","default","install-root","bindings"],["module_root","lib","binding","nodePreGyp","bindings"]]};function bindings(opts){if(typeof opts=="string"){opts={bindings:opts}}else if(!opts){opts={}}Object.keys(defaults).map((function(e){if(!(e in opts))opts[e]=defaults[e]}));if(!opts.module_root){opts.module_root=exports.getRoot(exports.getFileName())}if(path.extname(opts.bindings)!=".node"){opts.bindings+=".node"}var requireFunc=true?eval("require"):0;var tries=[],i=0,l=opts.try.length,n,b,err;for(;i{"use strict";e.exports=function(e,t){if(e===null||e===undefined){throw TypeError()}e=String(e);var r=e.length;var s=t?Number(t):0;if(Number.isNaN(s)){s=0}if(s<0||s>=r){return undefined}var a=e.charCodeAt(s);if(a>=55296&&a<=56319&&r>s+1){var o=e.charCodeAt(s+1);if(o>=56320&&o<=57343){return(a-55296)*1024+o-56320+65536}}return a}},3844:(e,t)=>{"use strict";var r="[";t.up=function up(e){return r+(e||"")+"A"};t.down=function down(e){return r+(e||"")+"B"};t.forward=function forward(e){return r+(e||"")+"C"};t.back=function back(e){return r+(e||"")+"D"};t.nextLine=function nextLine(e){return r+(e||"")+"E"};t.previousLine=function previousLine(e){return r+(e||"")+"F"};t.horizontalAbsolute=function horizontalAbsolute(e){if(e==null)throw new Error("horizontalAboslute requires a column to position to");return r+e+"G"};t.eraseData=function eraseData(){return r+"J"};t.eraseLine=function eraseLine(){return r+"K"};t.goto=function(e,t){return r+t+";"+e+"H"};t.gotoSOL=function(){return"\r"};t.beep=function(){return""};t.hideCursor=function hideCursor(){return r+"?25l"};t.showCursor=function showCursor(){return r+"?25h"};var s={reset:0,bold:1,italic:3,underline:4,inverse:7,stopBold:22,stopItalic:23,stopUnderline:24,stopInverse:27,white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,bgWhite:47,bgBlack:40,bgBlue:44,bgCyan:46,bgGreen:42,bgMagenta:45,bgRed:41,bgYellow:43,grey:90,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97,bgGrey:100,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107};t.color=function color(e){if(arguments.length!==1||!Array.isArray(e)){e=Array.prototype.slice.call(arguments)}return r+e.map(colorNameToCode).join(";")+"m"};function colorNameToCode(e){if(s[e]!=null)return s[e];throw new Error("Unknown color or style name: "+e)}},1504:(e,t)=>{function isArray(e){if(Array.isArray){return Array.isArray(e)}return objectToString(e)==="[object Array]"}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return objectToString(e)==="[object Date]"}t.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}t.isError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=Buffer.isBuffer;function objectToString(e){return Object.prototype.toString.call(e)}},857:e=>{e.exports=Delegator;function Delegator(e,t){if(!(this instanceof Delegator))return new Delegator(e,t);this.proto=e;this.target=t;this.methods=[];this.getters=[];this.setters=[];this.fluents=[]}Delegator.prototype.method=function(e){var t=this.proto;var r=this.target;this.methods.push(e);t[e]=function(){return this[r][e].apply(this[r],arguments)};return this};Delegator.prototype.access=function(e){return this.getter(e).setter(e)};Delegator.prototype.getter=function(e){var t=this.proto;var r=this.target;this.getters.push(e);t.__defineGetter__(e,(function(){return this[r][e]}));return this};Delegator.prototype.setter=function(e){var t=this.proto;var r=this.target;this.setters.push(e);t.__defineSetter__(e,(function(t){return this[r][e]=t}));return this};Delegator.prototype.fluent=function(e){var t=this.proto;var r=this.target;this.fluents.push(e);t[e]=function(t){if("undefined"!=typeof t){this[r][e]=t;return this}else{return this[r][e]}};return this}},5104:(e,t,r)=>{"use strict";var s=r(2037).platform();var a=r(2081).spawnSync;var o=r(7147).readdirSync;var u="glibc";var c="musl";var f={encoding:"utf8",env:process.env};if(!a){a=function(){return{status:126,stdout:"",stderr:""}}}function contains(e){return function(t){return t.indexOf(e)!==-1}}function versionFromMuslLdd(e){return e.split(/[\r\n]+/)[1].trim().split(/\s/)[1]}function safeReaddirSync(e){try{return o(e)}catch(e){}return[]}var d="";var p="";var h="";if(s==="linux"){var v=a("getconf",["GNU_LIBC_VERSION"],f);if(v.status===0){d=u;p=v.stdout.trim().split(" ")[1];h="getconf"}else{var D=a("ldd",["--version"],f);if(D.status===0&&D.stdout.indexOf(c)!==-1){d=c;p=versionFromMuslLdd(D.stdout);h="ldd"}else if(D.status===1&&D.stderr.indexOf(c)!==-1){d=c;p=versionFromMuslLdd(D.stderr);h="ldd"}else{var g=safeReaddirSync("/lib");if(g.some(contains("-linux-gnu"))){d=u;h="filesystem"}else if(g.some(contains("libc.musl-"))){d=c;h="filesystem"}else if(g.some(contains("ld-musl-"))){d=c;h="filesystem"}else{var y=safeReaddirSync("/usr/sbin");if(y.some(contains("glibc"))){d=u;h="filesystem"}}}}}var m=d!==""&&d!==u;e.exports={GLIBC:u,MUSL:c,family:d,version:p,method:h,isNonGlibcLinux:m}},3876:e=>{"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},7121:(e,t,r)=>{var s=r(1017).sep||"/";e.exports=fileUriToPath;function fileUriToPath(e){if("string"!=typeof e||e.length<=7||"file://"!=e.substring(0,7)){throw new TypeError("must pass in a file:// URI to convert to a file path")}var t=decodeURI(e.substring(7));var r=t.indexOf("/");var a=t.substring(0,r);var o=t.substring(r+1);if("localhost"==a)a="";if(a){a=s+s+a}o=o.replace(/^(.+)\|/,"$1:");if(s=="\\"){o=o.replace(/\//g,"\\")}if(/^.+\:/.test(o)){}else{o=s+o}return a+o}},8862:(e,t,r)=>{"use strict";var s=r(5154);var a=r(4044);e.exports={activityIndicator:function(e,t,r){if(e.spun==null)return;return s(t,e.spun)},progressbar:function(e,t,r){if(e.completed==null)return;return a(t,r,e.completed)}}},2905:(e,t,r)=>{"use strict";var s=r(3837);var a=t.User=function User(e){var t=new Error(e);Error.captureStackTrace(t,User);t.code="EGAUGE";return t};t.MissingTemplateValue=function MissingTemplateValue(e,t){var r=new a(s.format('Missing template value "%s"',e.type));Error.captureStackTrace(r,MissingTemplateValue);r.template=e;r.values=t;return r};t.Internal=function Internal(e){var t=new Error(e);Error.captureStackTrace(t,Internal);t.code="EGAUGEINTERNAL";return t}},1191:e=>{"use strict";e.exports=isWin32()||isColorTerm();function isWin32(){return process.platform==="win32"}function isColorTerm(){var e=/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i;return!!process.env.COLORTERM||e.test(process.env.TERM)}},287:(e,t,r)=>{"use strict";var s=r(4052);var a=r(5214);var o=r(1191);var u=r(7234);var c=r(9986);var f=r(7131);var d=r(5751);var p=r(5498);e.exports=Gauge;function callWith(e,t){return function(){return t.call(e)}}function Gauge(e,t){var r,a;if(e&&e.write){a=e;r=t||{}}else if(t&&t.write){a=t;r=e||{}}else{a=d.stderr;r=e||t||{}}this._status={spun:0,section:"",subsection:""};this._paused=false;this._disabled=true;this._showing=false;this._onScreen=false;this._needsRedraw=false;this._hideCursor=r.hideCursor==null?true:r.hideCursor;this._fixedFramerate=r.fixedFramerate==null?!/^v0\.8\./.test(d.version):r.fixedFramerate;this._lastUpdateAt=null;this._updateInterval=r.updateInterval==null?50:r.updateInterval;this._themes=r.themes||c;this._theme=r.theme;var o=this._computeTheme(r.theme);var u=r.template||[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",kerning:1,default:""},{type:"subsection",kerning:1,default:""}];this.setWriteTo(a,r.tty);var f=r.Plumbing||s;this._gauge=new f(o,u,this.getWidth());this._$$doRedraw=callWith(this,this._doRedraw);this._$$handleSizeChange=callWith(this,this._handleSizeChange);this._cleanupOnExit=r.cleanupOnExit==null||r.cleanupOnExit;this._removeOnExit=null;if(r.enabled||r.enabled==null&&this._tty&&this._tty.isTTY){this.enable()}else{this.disable()}}Gauge.prototype={};Gauge.prototype.isEnabled=function(){return!this._disabled};Gauge.prototype.setTemplate=function(e){this._gauge.setTemplate(e);if(this._showing)this._requestRedraw()};Gauge.prototype._computeTheme=function(e){if(!e)e={};if(typeof e==="string"){e=this._themes.getTheme(e)}else if(e&&(Object.keys(e).length===0||e.hasUnicode!=null||e.hasColor!=null)){var t=e.hasUnicode==null?a():e.hasUnicode;var r=e.hasColor==null?o:e.hasColor;e=this._themes.getDefault({hasUnicode:t,hasColor:r,platform:e.platform})}return e};Gauge.prototype.setThemeset=function(e){this._themes=e;this.setTheme(this._theme)};Gauge.prototype.setTheme=function(e){this._gauge.setTheme(this._computeTheme(e));if(this._showing)this._requestRedraw();this._theme=e};Gauge.prototype._requestRedraw=function(){this._needsRedraw=true;if(!this._fixedFramerate)this._doRedraw()};Gauge.prototype.getWidth=function(){return(this._tty&&this._tty.columns||80)-1};Gauge.prototype.setWriteTo=function(e,t){var r=!this._disabled;if(r)this.disable();this._writeTo=e;this._tty=t||e===d.stderr&&d.stdout.isTTY&&d.stdout||e.isTTY&&e||this._tty;if(this._gauge)this._gauge.setWidth(this.getWidth());if(r)this.enable()};Gauge.prototype.enable=function(){if(!this._disabled)return;this._disabled=false;if(this._tty)this._enableEvents();if(this._showing)this.show()};Gauge.prototype.disable=function(){if(this._disabled)return;if(this._showing){this._lastUpdateAt=null;this._showing=false;this._doRedraw();this._showing=true}this._disabled=true;if(this._tty)this._disableEvents()};Gauge.prototype._enableEvents=function(){if(this._cleanupOnExit){this._removeOnExit=u(callWith(this,this.disable))}this._tty.on("resize",this._$$handleSizeChange);if(this._fixedFramerate){this.redrawTracker=f(this._$$doRedraw,this._updateInterval);if(this.redrawTracker.unref)this.redrawTracker.unref()}};Gauge.prototype._disableEvents=function(){this._tty.removeListener("resize",this._$$handleSizeChange);if(this._fixedFramerate)clearInterval(this.redrawTracker);if(this._removeOnExit)this._removeOnExit()};Gauge.prototype.hide=function(e){if(this._disabled)return e&&d.nextTick(e);if(!this._showing)return e&&d.nextTick(e);this._showing=false;this._doRedraw();e&&p(e)};Gauge.prototype.show=function(e,t){this._showing=true;if(typeof e==="string"){this._status.section=e}else if(typeof e==="object"){var r=Object.keys(e);for(var s=0;s{"use strict";var s=r(3844);var a=r(7238);var o=r(878);var u=e.exports=function(e,t,r){if(!r)r=80;o("OAN",[e,t,r]);this.showing=false;this.theme=e;this.width=r;this.template=t};u.prototype={};u.prototype.setTheme=function(e){o("O",[e]);this.theme=e};u.prototype.setTemplate=function(e){o("A",[e]);this.template=e};u.prototype.setWidth=function(e){o("N",[e]);this.width=e};u.prototype.hide=function(){return s.gotoSOL()+s.eraseLine()};u.prototype.hideCursor=s.hideCursor;u.prototype.showCursor=s.showCursor;u.prototype.show=function(e){var t=Object.create(this.theme);for(var r in e){t[r]=e[r]}return a(this.width,this.template,t).trim()+s.color("reset")+s.eraseLine()+s.gotoSOL()}},5751:e=>{"use strict";e.exports=process},4044:(e,t,r)=>{"use strict";var s=r(878);var a=r(7238);var o=r(5791);var u=r(8321);e.exports=function(e,t,r){s("ONN",[e,t,r]);if(r<0)r=0;if(r>1)r=1;if(t<=0)return"";var o=Math.round(t*r);var u=t-o;var c=[{type:"complete",value:repeat(e.complete,o),length:o},{type:"remaining",value:repeat(e.remaining,u),length:u}];return a(t,c,e)};function repeat(e,t){var r="";var s=t;do{if(s%2){r+=e}s=Math.floor(s/2);e+=e}while(s&&u(r){"use strict";var s=r(1365);var a=r(878);var o=r(3540);var u=r(5791);var c=r(2905);var f=r(8855);function renderValueWithValues(e){return function(t){return renderValue(t,e)}}var d=e.exports=function(e,t,r){var a=prepareItems(e,t,r);var o=a.map(renderValueWithValues(r)).join("");return s.left(u(o,e),e)};function preType(e){var t=e.type[0].toUpperCase()+e.type.slice(1);return"pre"+t}function postType(e){var t=e.type[0].toUpperCase()+e.type.slice(1);return"post"+t}function hasPreOrPost(e,t){if(!e.type)return;return t[preType(e)]||t[postType(e)]}function generatePreAndPost(e,t){var r=o({},e);var s=Object.create(t);var a=[];var u=preType(r);var c=postType(r);if(s[u]){a.push({value:s[u]});s[u]=null}r.minLength=null;r.length=null;r.maxLength=null;a.push(r);s[r.type]=s[r.type];if(s[c]){a.push({value:s[c]});s[c]=null}return function(e,t,r){return d(r,a,s)}}function prepareItems(e,t,r){function cloneAndObjectify(t,s,a){var o=new f(t,e);var u=o.type;if(o.value==null){if(!(u in r)){if(o.default==null){throw new c.MissingTemplateValue(o,r)}else{o.value=o.default}}else{o.value=r[u]}}if(o.value==null||o.value==="")return null;o.index=s;o.first=s===0;o.last=s===a.length-1;if(hasPreOrPost(o,r))o.value=generatePreAndPost(o,r);return o}var s=t.map(cloneAndObjectify).filter((function(e){return e!=null}));var a=0;var o=e;var u=s.length;function consumeSpace(e){if(e>o)e=o;a+=e;o-=e}function finishSizing(e,t){if(e.finished)throw new c.Internal("Tried to finish template item that was already finished");if(t===Infinity)throw new c.Internal("Length of template item cannot be infinity");if(t!=null)e.length=t;e.minLength=null;e.maxLength=null;--u;e.finished=true;if(e.length==null)e.length=e.getBaseLength();if(e.length==null)throw new c.Internal("Finished template items must have a length");consumeSpace(e.getLength())}s.forEach((function(e){if(!e.kerning)return;var t=e.first?0:s[e.index-1].padRight;if(!e.first&&t=h){finishSizing(e,e.minLength);p=true}}))}while(p&&d++{"use strict";var s=r(5751);try{e.exports=setImmediate}catch(t){e.exports=s.nextTick}},7131:e=>{"use strict";e.exports=setInterval},5154:e=>{"use strict";e.exports=function spin(e,t){return e[t%e.length]}},8855:(e,t,r)=>{"use strict";var s=r(8321);e.exports=TemplateItem;function isPercent(e){if(typeof e!=="string")return false;return e.slice(-1)==="%"}function percent(e){return Number(e.slice(0,-1))/100}function TemplateItem(e,t){this.overallOutputLength=t;this.finished=false;this.type=null;this.value=null;this.length=null;this.maxLength=null;this.minLength=null;this.kerning=null;this.align="left";this.padLeft=0;this.padRight=0;this.index=null;this.first=null;this.last=null;if(typeof e==="string"){this.value=e}else{for(var r in e)this[r]=e[r]}if(isPercent(this.length)){this.length=Math.round(this.overallOutputLength*percent(this.length))}if(isPercent(this.minLength)){this.minLength=Math.round(this.overallOutputLength*percent(this.minLength))}if(isPercent(this.maxLength)){this.maxLength=Math.round(this.overallOutputLength*percent(this.maxLength))}return this}TemplateItem.prototype={};TemplateItem.prototype.getBaseLength=function(){var e=this.length;if(e==null&&typeof this.value==="string"&&this.maxLength==null&&this.minLength==null){e=s(this.value)}return e};TemplateItem.prototype.getLength=function(){var e=this.getBaseLength();if(e==null)return null;return e+this.padLeft+this.padRight};TemplateItem.prototype.getMaxLength=function(){if(this.maxLength==null)return null;return this.maxLength+this.padLeft+this.padRight};TemplateItem.prototype.getMinLength=function(){if(this.minLength==null)return null;return this.minLength+this.padLeft+this.padRight}},8469:(e,t,r)=>{"use strict";var s=r(3540);e.exports=function(){return a.newThemeSet()};var a={};a.baseTheme=r(8862);a.newTheme=function(e,t){if(!t){t=e;e=this.baseTheme}return s({},e,t)};a.getThemeNames=function(){return Object.keys(this.themes)};a.addTheme=function(e,t,r){this.themes[e]=this.newTheme(t,r)};a.addToAllThemes=function(e){var t=this.themes;Object.keys(t).forEach((function(r){s(t[r],e)}));s(this.baseTheme,e)};a.getTheme=function(e){if(!this.themes[e])throw this.newMissingThemeError(e);return this.themes[e]};a.setDefault=function(e,t){if(t==null){t=e;e={}}var r=e.platform==null?"fallback":e.platform;var s=!!e.hasUnicode;var a=!!e.hasColor;if(!this.defaults[r])this.defaults[r]={true:{},false:{}};this.defaults[r][s][a]=t};a.getDefault=function(e){if(!e)e={};var t=e.platform||process.platform;var r=this.defaults[t]||this.defaults.fallback;var a=!!e.hasUnicode;var o=!!e.hasColor;if(!r)throw this.newMissingDefaultThemeError(t,a,o);if(!r[a][o]){if(a&&o&&r[!a][o]){a=false}else if(a&&o&&r[a][!o]){o=false}else if(a&&o&&r[!a][!o]){a=false;o=false}else if(a&&!o&&r[!a][o]){a=false}else if(!a&&o&&r[a][!o]){o=false}else if(r===this.defaults.fallback){throw this.newMissingDefaultThemeError(t,a,o)}}if(r[a][o]){return this.getTheme(r[a][o])}else{return this.getDefault(s({},e,{platform:"fallback"}))}};a.newMissingThemeError=function newMissingThemeError(e){var t=new Error('Could not find a gauge theme named "'+e+'"');Error.captureStackTrace.call(t,newMissingThemeError);t.theme=e;t.code="EMISSINGTHEME";return t};a.newMissingDefaultThemeError=function newMissingDefaultThemeError(e,t,r){var s=new Error("Could not find a gauge theme for your platform/unicode/color use combo:\n"+" platform = "+e+"\n"+" hasUnicode = "+t+"\n"+" hasColor = "+r);Error.captureStackTrace.call(s,newMissingDefaultThemeError);s.platform=e;s.hasUnicode=t;s.hasColor=r;s.code="EMISSINGTHEME";return s};a.newThemeSet=function(){var themeset=function(e){return themeset.getDefault(e)};return s(themeset,a,{themes:s({},this.themes),baseTheme:s({},this.baseTheme),defaults:JSON.parse(JSON.stringify(this.defaults||{}))})}},9986:(e,t,r)=>{"use strict";var s=r(3844);var a=r(8469);var o=e.exports=new a;o.addTheme("ASCII",{preProgressbar:"[",postProgressbar:"]",progressbarTheme:{complete:"#",remaining:"."},activityIndicatorTheme:"-\\|/",preSubsection:">"});o.addTheme("colorASCII",o.getTheme("ASCII"),{progressbarTheme:{preComplete:s.color("inverse"),complete:" ",postComplete:s.color("stopInverse"),preRemaining:s.color("brightBlack"),remaining:".",postRemaining:s.color("reset")}});o.addTheme("brailleSpinner",{preProgressbar:"⸨",postProgressbar:"⸩",progressbarTheme:{complete:"░",remaining:"⠂"},activityIndicatorTheme:"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏",preSubsection:">"});o.addTheme("colorBrailleSpinner",o.getTheme("brailleSpinner"),{progressbarTheme:{preComplete:s.color("inverse"),complete:" ",postComplete:s.color("stopInverse"),preRemaining:s.color("brightBlack"),remaining:"░",postRemaining:s.color("reset")}});o.setDefault({},"ASCII");o.setDefault({hasColor:true},"colorASCII");o.setDefault({platform:"darwin",hasUnicode:true},"brailleSpinner");o.setDefault({platform:"darwin",hasUnicode:true,hasColor:true},"colorBrailleSpinner")},5791:(e,t,r)=>{"use strict";var s=r(8321);var a=r(7518);e.exports=wideTruncate;function wideTruncate(e,t){if(s(e)===0)return e;if(t<=0)return"";if(s(e)<=t)return e;var r=a(e);var o=e.length+r.length;var u=e.slice(0,t+o);while(s(u)>t){u=u.slice(0,-1)}return u}},4444:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},9165:(e,t,r)=>{var s=r(7147);var a=r(8986);var o=r(7078);var u=r(4444);var c=r(3837);var f;var d;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){f=Symbol.for("graceful-fs.queue");d=Symbol.for("graceful-fs.previous")}else{f="___graceful-fs.queue";d="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,f,{get:function(){return t}})}var p=noop;if(c.debuglog)p=c.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))p=function(){var e=c.format.apply(c,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!s[f]){var h=global[f]||[];publishQueue(s,h);s.close=function(e){function close(t,r){return e.call(s,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,d,{value:e});return close}(s.close);s.closeSync=function(e){function closeSync(t){e.apply(s,arguments);resetQueue()}Object.defineProperty(closeSync,d,{value:e});return closeSync}(s.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){p(s[f]);r(9491).equal(s[f].length,0)}))}}if(!global[f]){publishQueue(global,s[f])}e.exports=patch(u(s));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched){e.exports=patch(s);s.__patched=true}function patch(e){a(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,s){if(typeof r==="function")s=r,r=null;return go$readFile(e,r,s);function go$readFile(e,r,s,a){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,s],t,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,s,a){if(typeof s==="function")a=s,s=null;return go$writeFile(e,t,s,a);function go$writeFile(e,t,s,a,o){return r(e,t,s,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,s,a],r,o||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var s=e.appendFile;if(s)e.appendFile=appendFile;function appendFile(e,t,r,a){if(typeof r==="function")a=r,r=null;return go$appendFile(e,t,r,a);function go$appendFile(e,t,r,a,o){return s(e,t,r,(function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,a],s,o||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var u=e.copyFile;if(u)e.copyFile=copyFile;function copyFile(e,t,r,s){if(typeof r==="function"){s=r;r=0}return go$copyFile(e,t,r,s);function go$copyFile(e,t,r,s,a){return u(e,t,r,(function(o){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,s],o,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}var c=e.readdir;e.readdir=readdir;var f=/^v[0-5]\./;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;var s=f.test(process.version)?function go$readdir(e,t,r,s){return c(e,fs$readdirCallback(e,t,r,s))}:function go$readdir(e,t,r,s){return c(e,t,fs$readdirCallback(e,t,r,s))};return s(e,t,r);function fs$readdirCallback(e,t,r,a){return function(o,u){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([s,[e,t,r],o,a||Date.now(),Date.now()]);else{if(u&&u.sort)u.sort();if(typeof r==="function")r.call(this,o,u)}}}}if(process.version.substr(0,4)==="v0.8"){var d=o(e);ReadStream=d.ReadStream;WriteStream=d.WriteStream}var p=e.ReadStream;if(p){ReadStream.prototype=Object.create(p.prototype);ReadStream.prototype.open=ReadStream$open}var h=e.WriteStream;if(h){WriteStream.prototype=Object.create(h.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var v=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(e){v=e},enumerable:true,configurable:true});var D=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return D},set:function(e){D=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return p.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return h.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var g=e.open;e.open=open;function open(e,t,r,s){if(typeof r==="function")s=r,r=null;return go$open(e,t,r,s);function go$open(e,t,r,s,a){return g(e,t,r,(function(o,u){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$open,[e,t,r,s],o,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}return e}function enqueue(e){p("ENQUEUE",e[0].name,e[1]);s[f].push(e);retry()}var v;function resetQueue(){var e=Date.now();for(var t=0;t2){s[f][t][3]=e;s[f][t][4]=e}}retry()}function retry(){clearTimeout(v);v=undefined;if(s[f].length===0)return;var e=s[f].shift();var t=e[0];var r=e[1];var a=e[2];var o=e[3];var u=e[4];if(o===undefined){p("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-o>=6e4){p("TIMEOUT",t.name,r);var c=r.pop();if(typeof c==="function")c.call(null,a)}else{var d=Date.now()-u;var h=Math.max(u-o,1);var D=Math.min(h*1.2,100);if(d>=D){p("RETRY",t.name,r);t.apply(null,r.concat([o]))}else{s[f].push(e)}}if(v===undefined){v=setTimeout(retry,0)}}},7078:(e,t,r)=>{var s=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);s.call(this);var a=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var u=0,c=o.length;uthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){a._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){a.emit("error",e);a.readable=false;return}a.fd=t;a.emit("open",t);a._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);s.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var a=Object.keys(r);for(var o=0,u=a.length;o= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},8986:(e,t,r)=>{var s=r(2057);var a=process.cwd;var o=null;var u=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=a.call(process);return o};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var c=process.chdir;process.chdir=function(e){o=null;c.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c)}e.exports=patch;function patch(e){if(s.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(e.chmod&&!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(e.chown&&!e.lchown){e.lchown=function(e,t,r,s){if(s)process.nextTick(s)};e.lchownSync=function(){}}if(u==="win32"){e.rename=typeof e.rename!=="function"?e.rename:function(t){function rename(r,s,a){var o=Date.now();var u=0;t(r,s,(function CB(c){if(c&&(c.code==="EACCES"||c.code==="EPERM")&&Date.now()-o<6e4){setTimeout((function(){e.stat(s,(function(e,o){if(e&&e.code==="ENOENT")t(r,s,CB);else a(c)}))}),u);if(u<100)u+=10;return}if(a)a(c)}))}if(Object.setPrototypeOf)Object.setPrototypeOf(rename,t);return rename}(e.rename)}e.read=typeof e.read!=="function"?e.read:function(t){function read(r,s,a,o,u,c){var f;if(c&&typeof c==="function"){var d=0;f=function(p,h,v){if(p&&p.code==="EAGAIN"&&d<10){d++;return t.call(e,r,s,a,o,u,f)}c.apply(this,arguments)}}return t.call(e,r,s,a,o,u,f)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=typeof e.readSync!=="function"?e.readSync:function(t){return function(r,s,a,o,u){var c=0;while(true){try{return t.call(e,r,s,a,o,u)}catch(e){if(e.code==="EAGAIN"&&c<10){c++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,a){e.open(t,s.O_WRONLY|s.O_SYMLINK,r,(function(t,s){if(t){if(a)a(t);return}e.fchmod(s,r,(function(t){e.close(s,(function(e){if(a)a(t||e)}))}))}))};e.lchmodSync=function(t,r){var a=e.openSync(t,s.O_WRONLY|s.O_SYMLINK,r);var o=true;var u;try{u=e.fchmodSync(a,r);o=false}finally{if(o){try{e.closeSync(a)}catch(e){}}else{e.closeSync(a)}}return u}}function patchLutimes(e){if(s.hasOwnProperty("O_SYMLINK")&&e.futimes){e.lutimes=function(t,r,a,o){e.open(t,s.O_SYMLINK,(function(t,s){if(t){if(o)o(t);return}e.futimes(s,r,a,(function(t){e.close(s,(function(e){if(o)o(t||e)}))}))}))};e.lutimesSync=function(t,r,a){var o=e.openSync(t,s.O_SYMLINK);var u;var c=true;try{u=e.futimesSync(o,r,a);c=false}finally{if(c){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return u}}else if(e.futimes){e.lutimes=function(e,t,r,s){if(s)process.nextTick(s)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,s,a){return t.call(e,r,s,(function(e){if(chownErOk(e))e=null;if(a)a.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,s){try{return t.call(e,r,s)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,s,a,o){return t.call(e,r,s,a,(function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,s,a){try{return t.call(e,r,s,a)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,s,a){if(typeof s==="function"){a=s;s=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(a)a.apply(this,arguments)}return s?t.call(e,r,s,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,s){var a=s?t.call(e,r,s):t.call(e,r);if(a){if(a.uid<0)a.uid+=4294967296;if(a.gid<0)a.gid+=4294967296}return a}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},5214:(e,t,r)=>{"use strict";var s=r(2037);var a=e.exports=function(){if(s.type()=="Windows_NT"){return false}var e=/UTF-?8$/i;var t=process.env.LC_ALL||process.env.LC_CTYPE||process.env.LANG;return e.test(t)}},2842:(e,t,r)=>{try{var s=r(3837);if(typeof s.inherits!=="function")throw"";e.exports=s.inherits}catch(t){e.exports=r(3782)}},3782:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},3279:(e,t,r)=>{"use strict";var s=r(3979);e.exports=function(e){if(s(e)){return false}if(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false}},8502:e=>{"use strict";const isFullwidthCodePoint=e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false};e.exports=isFullwidthCodePoint;e.exports["default"]=isFullwidthCodePoint},1551:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},7663:(module,__unused_webpack_exports,__nccwpck_require__)=>{var fs=__nccwpck_require__(7147);var path=__nccwpck_require__(1017);var os=__nccwpck_require__(2037);var runtimeRequire=true?eval("require"):0;var vars=process.config&&process.config.variables||{};var prebuildsOnly=!!process.env.PREBUILDS_ONLY;var abi=process.versions.modules;var runtime=isElectron()?"electron":"node";var arch=os.arch();var platform=os.platform();var libc=process.env.LIBC||(isAlpine(platform)?"musl":"glibc");var armv=process.env.ARM_VERSION||(arch==="arm64"?"8":vars.arm_version)||"";var uv=(process.versions.uv||"").split(".")[0];module.exports=load;function load(e){return runtimeRequire(load.path(e))}load.path=function(e){e=path.resolve(e||".");try{var t=runtimeRequire(path.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");if(process.env[t+"_PREBUILD"])e=process.env[t+"_PREBUILD"]}catch(e){}if(!prebuildsOnly){var r=getFirst(path.join(e,"build/Release"),matchBuild);if(r)return r;var s=getFirst(path.join(e,"build/Debug"),matchBuild);if(s)return s}var a=resolve(e);if(a)return a;var o=resolve(path.dirname(process.execPath));if(o)return o;var u=["platform="+platform,"arch="+arch,"runtime="+runtime,"abi="+abi,"uv="+uv,armv?"armv="+armv:"","libc="+libc,"node="+process.versions.node,process.versions&&process.versions.electron?"electron="+process.versions.electron:"",true?"webpack=true":0].filter(Boolean).join(" ");throw new Error("No native build was found for "+u+"\n loaded from: "+e+"\n");function resolve(e){var t=path.join(e,"prebuilds",platform+"-"+arch);var r=readdirSync(t).map(parseTags);var s=r.filter(matchTags(runtime,abi));var a=s.sort(compareTags(runtime))[0];if(a)return path.join(t,a.file)}};function readdirSync(e){try{return fs.readdirSync(e)}catch(e){return[]}}function getFirst(e,t){var r=readdirSync(e).filter(t);return r[0]&&path.join(e,r[0])}function matchBuild(e){return/\.node$/.test(e)}function parseTags(e){var t=e.split(".");var r=t.pop();var s={file:e,specificity:0};if(r!=="node")return;for(var a=0;ar.specificity?-1:1}else{return 0}}}function isElectron(){if(process.versions&&process.versions.electron)return true;if(process.env.ELECTRON_RUN_AS_NODE)return true;return typeof window!=="undefined"&&window.process&&window.process.type==="renderer"}function isAlpine(e){return e==="linux"&&fs.existsSync("/etc/alpine-release")}load.parseTags=parseTags;load.matchTags=matchTags;load.compareTags=compareTags},1758:(e,t,r)=>{var s=process.env.DEBUG_NOPT||process.env.NOPT_DEBUG?function(){console.error.apply(console,arguments)}:function(){};var a=r(7310),o=r(1017),u=r(2781).Stream,c=r(351),f=r(2037);e.exports=t=nopt;t.clean=clean;t.typeDefs={String:{type:String,validate:validateString},Boolean:{type:Boolean,validate:validateBoolean},url:{type:a,validate:validateUrl},Number:{type:Number,validate:validateNumber},path:{type:o,validate:validatePath},Stream:{type:u,validate:validateStream},Date:{type:Date,validate:validateDate}};function nopt(e,r,a,o){a=a||process.argv;e=e||{};r=r||{};if(typeof o!=="number")o=2;s(e,r,a,o);a=a.slice(o);var u={},c,f={remain:[],cooked:a,original:a.slice(0)};parse(a,u,f.remain,e,r);clean(u,e,t.typeDefs);u.argv=f;Object.defineProperty(u.argv,"toString",{value:function(){return this.original.map(JSON.stringify).join(" ")},enumerable:false});return u}function clean(e,r,a){a=a||t.typeDefs;var o={},u=[false,true,null,String,Array];Object.keys(e).forEach((function(c){if(c==="argv")return;var f=e[c],d=Array.isArray(f),p=r[c];if(!d)f=[f];if(!p)p=u;if(p===Array)p=u.concat(Array);if(!Array.isArray(p))p=[p];s("val=%j",f);s("types=",p);f=f.map((function(u){if(typeof u==="string"){s("string %j",u);u=u.trim();if(u==="null"&&~p.indexOf(null)||u==="true"&&(~p.indexOf(true)||~p.indexOf(Boolean))||u==="false"&&(~p.indexOf(false)||~p.indexOf(Boolean))){u=JSON.parse(u);s("jsonable %j",u)}else if(~p.indexOf(Number)&&!isNaN(u)){s("convert to number",u);u=+u}else if(~p.indexOf(Date)&&!isNaN(Date.parse(u))){s("convert to date",u);u=new Date(u)}}if(!r.hasOwnProperty(c)){return u}if(u===false&&~p.indexOf(null)&&!(~p.indexOf(false)||~p.indexOf(Boolean))){u=null}var f={};f[c]=u;s("prevalidated val",f,u,r[c]);if(!validate(f,c,u,r[c],a)){if(t.invalidHandler){t.invalidHandler(c,u,r[c],e)}else if(t.invalidHandler!==false){s("invalid: "+c+"="+u,r[c])}return o}s("validated val",f,u,r[c]);return f[c]})).filter((function(e){return e!==o}));if(!f.length&&p.indexOf(Array)===-1){s("VAL HAS NO LENGTH, DELETE IT",f,c,p.indexOf(Array));delete e[c]}else if(d){s(d,e[c],f);e[c]=f}else e[c]=f[0];s("k=%s val=%j",c,f,e[c])}))}function validateString(e,t,r){e[t]=String(r)}function validatePath(e,t,r){if(r===true)return false;if(r===null)return true;r=String(r);var s=process.platform==="win32",a=s?/^~(\/|\\)/:/^~\//,u=f.homedir();if(u&&r.match(a)){e[t]=o.resolve(u,r.substr(2))}else{e[t]=o.resolve(r)}return true}function validateNumber(e,t,r){s("validate Number %j %j %j",t,r,isNaN(r));if(isNaN(r))return false;e[t]=+r}function validateDate(e,t,r){var a=Date.parse(r);s("validate Date %j %j %j",t,r,a);if(isNaN(a))return false;e[t]=new Date(r)}function validateBoolean(e,t,r){if(r instanceof Boolean)r=r.valueOf();else if(typeof r==="string"){if(!isNaN(r))r=!!+r;else if(r==="null"||r==="false")r=false;else r=true}else r=!!r;e[t]=r}function validateUrl(e,t,r){r=a.parse(String(r));if(!r.host)return false;e[t]=r.href}function validateStream(e,t,r){if(!(r instanceof u))return false;e[t]=r}function validate(e,t,r,a,o){if(Array.isArray(a)){for(var u=0,c=a.length;u1){var D=h.indexOf("=");if(D>-1){v=true;var g=h.substr(D+1);h=h.substr(0,D);e.splice(p,1,h,g)}var y=resolveShort(h,o,d,f);s("arg=%j shRes=%j",h,y);if(y){s(h,y);e.splice.apply(e,[p,1].concat(y));if(h!==y[0]){p--;continue}}h=h.replace(/^-+/,"");var m=null;while(h.toLowerCase().indexOf("no-")===0){m=!m;h=h.substr(3)}if(f[h])h=f[h];var _=a[h];var E=Array.isArray(_);if(E&&_.length===1){E=false;_=_[0]}var w=_===Array||E&&_.indexOf(Array)!==-1;if(!a.hasOwnProperty(h)&&t.hasOwnProperty(h)){if(!Array.isArray(t[h]))t[h]=[t[h]];w=true}var x,F=e[p+1];var C=typeof m==="boolean"||_===Boolean||E&&_.indexOf(Boolean)!==-1||typeof _==="undefined"&&!v||F==="false"&&(_===null||E&&~_.indexOf(null));if(C){x=!m;if(F==="true"||F==="false"){x=JSON.parse(F);F=null;if(m)x=!x;p++}if(E&&F){if(~_.indexOf(F)){x=F;p++}else if(F==="null"&&~_.indexOf(null)){x=null;p++}else if(!F.match(/^-{2,}[^-]/)&&!isNaN(F)&&~_.indexOf(Number)){x=+F;p++}else if(!F.match(/^-[^-]/)&&~_.indexOf(String)){x=F;p++}}if(w)(t[h]=t[h]||[]).push(x);else t[h]=x;continue}if(_===String){if(F===undefined){F=""}else if(F.match(/^-{1,2}[^-]+/)){F="";p--}}if(F&&F.match(/^-{2,}$/)){F=undefined;p--}x=F===undefined?true:F;if(w)(t[h]=t[h]||[]).push(x);else t[h]=x;p++;continue}r.push(h)}}function resolveShort(e,t,r,a){e=e.replace(/^-+/,"");if(a[e]===e)return null;if(t[e]){if(t[e]&&!Array.isArray(t[e]))t[e]=t[e].split(/\s+/);return t[e]}var o=t.___singles;if(!o){o=Object.keys(t).filter((function(e){return e.length===1})).reduce((function(e,t){e[t]=true;return e}),{});t.___singles=o;s("shorthand singles",o)}var u=e.split("").filter((function(e){return o[e]}));if(u.join("")===e)return u.map((function(e){return t[e]})).reduce((function(e,t){return e.concat(t)}),[]);if(a[e]&&!t[e])return null;if(r[e])e=r[e];if(t[e]&&!Array.isArray(t[e]))t[e]=t[e].split(/\s+/);return t[e]}},9544:(e,t,r)=>{"use strict";var s=r(4906);var a=r(287);var o=r(2361).EventEmitter;var u=t=e.exports=new o;var c=r(3837);var f=r(2656);var d=r(3844);f(true);var p=process.stderr;Object.defineProperty(u,"stream",{set:function(e){p=e;if(this.gauge)this.gauge.setWriteTo(p,p)},get:function(){return p}});var h;u.useColor=function(){return h!=null?h:p.isTTY};u.enableColor=function(){h=true;this.gauge.setTheme({hasColor:h,hasUnicode:v})};u.disableColor=function(){h=false;this.gauge.setTheme({hasColor:h,hasUnicode:v})};u.level="info";u.gauge=new a(p,{enabled:false,theme:{hasColor:u.useColor()},template:[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",default:""},":",{type:"logline",kerning:1,default:""}]});u.tracker=new s.TrackerGroup;u.progressEnabled=u.gauge.isEnabled();var v;u.enableUnicode=function(){v=true;this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:v})};u.disableUnicode=function(){v=false;this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:v})};u.setGaugeThemeset=function(e){this.gauge.setThemeset(e)};u.setGaugeTemplate=function(e){this.gauge.setTemplate(e)};u.enableProgress=function(){if(this.progressEnabled)return;this.progressEnabled=true;this.tracker.on("change",this.showProgress);if(this._pause)return;this.gauge.enable()};u.disableProgress=function(){if(!this.progressEnabled)return;this.progressEnabled=false;this.tracker.removeListener("change",this.showProgress);this.gauge.disable()};var D=["newGroup","newItem","newStream"];var mixinLog=function(e){Object.keys(u).forEach((function(t){if(t[0]==="_")return;if(D.filter((function(e){return e===t})).length)return;if(e[t])return;if(typeof u[t]!=="function")return;var r=u[t];e[t]=function(){return r.apply(u,arguments)}}));if(e instanceof s.TrackerGroup){D.forEach((function(t){var r=e[t];e[t]=function(){return mixinLog(r.apply(e,arguments))}}))}return e};D.forEach((function(e){u[e]=function(){return mixinLog(this.tracker[e].apply(this.tracker,arguments))}}));u.clearProgress=function(e){if(!this.progressEnabled)return e&&process.nextTick(e);this.gauge.hide(e)};u.showProgress=function(e,t){if(!this.progressEnabled)return;var r={};if(e)r.section=e;var s=u.record[u.record.length-1];if(s){r.subsection=s.prefix;var a=u.disp[s.level]||s.level;var o=this._format(a,u.style[s.level]);if(s.prefix)o+=" "+this._format(s.prefix,this.prefixStyle);o+=" "+s.message.split(/\r?\n/)[0];r.logline=o}r.completed=t||this.tracker.completed();this.gauge.show(r)}.bind(u);u.pause=function(){this._paused=true;if(this.progressEnabled)this.gauge.disable()};u.resume=function(){if(!this._paused)return;this._paused=false;var e=this._buffer;this._buffer=[];e.forEach((function(e){this.emitLog(e)}),this);if(this.progressEnabled)this.gauge.enable()};u._buffer=[];var g=0;u.record=[];u.maxRecordSize=1e4;u.log=function(e,t,r){var s=this.levels[e];if(s===undefined){return this.emit("error",new Error(c.format("Undefined log level: %j",e)))}var a=new Array(arguments.length-2);var o=null;for(var u=2;up/10){var v=Math.floor(p*.9);this.record=this.record.slice(-1*v)}this.emitLog(d)}.bind(u);u.emitLog=function(e){if(this._paused){this._buffer.push(e);return}if(this.progressEnabled)this.gauge.pulse(e.prefix);var t=this.levels[e.level];if(t===undefined)return;if(t0&&!isFinite(t))return;var r=u.disp[e.level]!=null?u.disp[e.level]:e.level;this.clearProgress();e.message.split(/\r?\n/).forEach((function(t){if(this.heading){this.write(this.heading,this.headingStyle);this.write(" ")}this.write(r,u.style[e.level]);var s=e.prefix||"";if(s)this.write(" ");this.write(s,this.prefixStyle);this.write(" "+t+"\n")}),this);this.showProgress()};u._format=function(e,t){if(!p)return;var r="";if(this.useColor()){t=t||{};var s=[];if(t.fg)s.push(t.fg);if(t.bg)s.push("bg"+t.bg[0].toUpperCase()+t.bg.slice(1));if(t.bold)s.push("bold");if(t.underline)s.push("underline");if(t.inverse)s.push("inverse");if(s.length)r+=d.color(s);if(t.beep)r+=d.beep()}r+=e;if(this.useColor()){r+=d.color("reset")}return r};u.write=function(e,t){if(!p)return;p.write(this._format(e,t))};u.addLevel=function(e,t,r,s){if(s==null)s=e;this.levels[e]=t;this.style[e]=r;if(!this[e]){this[e]=function(){var t=new Array(arguments.length+1);t[0]=e;for(var r=0;r{"use strict";e.exports=Number.isNaN||function(e){return e!==e}},3540:e=>{"use strict"; /* object-assign (c) Sindre Sorhus @license MIT -*/var t=Object.getOwnPropertySymbols;var r=Object.prototype.hasOwnProperty;var s=Object.prototype.propertyIsEnumerable;function toObject(e){if(e===null||e===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(e)}function shouldUseNative(){try{if(!Object.assign){return false}var e=new String("abc");e[5]="de";if(Object.getOwnPropertyNames(e)[0]==="5"){return false}var t={};for(var r=0;r<10;r++){t["_"+String.fromCharCode(r)]=r}var s=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if(s.join("")!=="0123456789"){return false}var a={};"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e}));if(Object.keys(Object.assign({},a)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(e){return false}}e.exports=shouldUseNative()?Object.assign:function(e,a){var o;var u=toObject(e);var c;for(var f=1;f{"use strict";e.exports=r(3683)},9356:(e,t,r)=>{"use strict";const s=r(1017);const a="\\\\/";const o=`[^${a}]`;const u="\\.";const c="\\+";const f="\\?";const d="\\/";const p="(?=.)";const h="[^/]";const v=`(?:${d}|$)`;const D=`(?:^|${d})`;const g=`${u}{1,2}${v}`;const y=`(?!${u})`;const m=`(?!${D}${g})`;const _=`(?!${u}{0,1}${v})`;const E=`(?!${g})`;const w=`[^.${d}]`;const x=`${h}*?`;const F={DOT_LITERAL:u,PLUS_LITERAL:c,QMARK_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:p,QMARK:h,END_ANCHOR:v,DOTS_SLASH:g,NO_DOT:y,NO_DOTS:m,NO_DOT_SLASH:_,NO_DOTS_SLASH:E,QMARK_NO_DOT:w,STAR:x,START_ANCHOR:D};const C={...F,SLASH_LITERAL:`[${a}]`,QMARK:o,STAR:`${o}*?`,DOTS_SLASH:`${u}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${u})`,NO_DOTS:`(?!(?:^|[${a}])${u}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${u}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${u}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`};const S={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:S,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?C:F}}},4754:(e,t,r)=>{"use strict";const s=r(9356);const a=r(7513);const{MAX_LENGTH:o,POSIX_REGEX_SOURCE:u,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:d}=s;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>a.escapeRegex(e))).join("..")}return r};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=d[e]||e;const r={...t};const p=typeof r.maxLength==="number"?Math.min(o,r.maxLength):o;let h=e.length;if(h>p){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${p}`)}const v={type:"bos",value:"",output:r.prepend||""};const D=[v];const g=r.capture?"":"?:";const y=a.isWindows(t);const m=s.globChars(y);const _=s.extglobChars(m);const{DOT_LITERAL:E,PLUS_LITERAL:w,SLASH_LITERAL:x,ONE_CHAR:F,DOTS_SLASH:C,NO_DOT:S,NO_DOT_SLASH:k,NO_DOTS_SLASH:A,QMARK:R,QMARK_NO_DOT:O,STAR:T,START_ANCHOR:j}=m;const globstar=e=>`(${g}(?:(?!${j}${e.dot?C:E}).)*?)`;const B=r.dot?"":S;const L=r.dot?R:O;let N=r.bash===true?globstar(r):T;if(r.capture){N=`(${N})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const I={input:e,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:D};e=a.removePrefix(e,I);h=e.length;const P=[];const W=[];const M=[];let $=v;let q;const eos=()=>I.index===h-1;const U=I.peek=(t=1)=>e[I.index+t];const G=I.advance=()=>e[++I.index];const remaining=()=>e.slice(I.index+1);const consume=(e="",t=0)=>{I.consumed+=e;I.index+=t};const append=e=>{I.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while(U()==="!"&&(U(2)!=="("||U(3)==="?")){G();I.start++;e++}if(e%2===0){return false}I.negated=true;I.start++;return true};const increment=e=>{I[e]++;M.push(e)};const decrement=e=>{I[e]--;M.pop()};const push=e=>{if($.type==="globstar"){const t=I.braces>0&&(e.type==="comma"||e.type==="brace");const r=e.extglob===true||P.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!r){I.output=I.output.slice(0,-$.output.length);$.type="star";$.value="*";$.output=N;I.output+=$.output}}if(P.length&&e.type!=="paren"&&!_[e.value]){P[P.length-1].inner+=e.value}if(e.value||e.output)append(e);if($&&$.type==="text"&&e.type==="text"){$.value+=e.value;$.output=($.output||"")+e.value;return}e.prev=$;D.push(e);$=e};const extglobOpen=(e,t)=>{const s={..._[t],conditions:1,inner:""};s.prev=$;s.parens=I.parens;s.output=I.output;const a=(r.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:I.output?"":F});push({type:"paren",extglob:true,value:G(),output:a});P.push(s)};const extglobClose=e=>{let t=e.close+(r.capture?")":"");if(e.type==="negate"){let s=N;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){s=globstar(r)}if(s!==N||eos()||/^\)+$/.test(remaining())){t=e.close=`)$))${s}`}if(e.prev.type==="bos"){I.negatedExtglob=true}}push({type:"paren",extglob:true,value:q,output:t});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let o=e.replace(f,((e,t,r,a,o,u)=>{if(a==="\\"){s=true;return e}if(a==="?"){if(t){return t+a+(o?R.repeat(o.length):"")}if(u===0){return L+(o?R.repeat(o.length):"")}return R.repeat(r.length)}if(a==="."){return E.repeat(r.length)}if(a==="*"){if(t){return t+a+(o?N:"")}return N}return t?e:`\\${e}`}));if(s===true){if(r.unescape===true){o=o.replace(/\\/g,"")}else{o=o.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(o===e&&r.contains===true){I.output=e;return I}I.output=a.wrapOutput(o,I,t);return I}while(!eos()){q=G();if(q==="\0"){continue}if(q==="\\"){const e=U();if(e==="/"&&r.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){q+="\\";push({type:"text",value:q});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;I.index+=s;if(s%2!==0){q+="\\"}}if(r.unescape===true){q=G()||""}else{q+=G()||""}if(I.brackets===0){push({type:"text",value:q});continue}}if(I.brackets>0&&(q!=="]"||$.value==="["||$.value==="[^")){if(r.posix!==false&&q===":"){const e=$.value.slice(1);if(e.includes("[")){$.posix=true;if(e.includes(":")){const e=$.value.lastIndexOf("[");const t=$.value.slice(0,e);const r=$.value.slice(e+2);const s=u[r];if(s){$.value=t+s;I.backtrack=true;G();if(!v.output&&D.indexOf($)===1){v.output=F}continue}}}}if(q==="["&&U()!==":"||q==="-"&&U()==="]"){q=`\\${q}`}if(q==="]"&&($.value==="["||$.value==="[^")){q=`\\${q}`}if(r.posix===true&&q==="!"&&$.value==="["){q="^"}$.value+=q;append({value:q});continue}if(I.quotes===1&&q!=='"'){q=a.escapeRegex(q);$.value+=q;append({value:q});continue}if(q==='"'){I.quotes=I.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:q})}continue}if(q==="("){increment("parens");push({type:"paren",value:q});continue}if(q===")"){if(I.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=P[P.length-1];if(e&&I.parens===e.parens+1){extglobClose(P.pop());continue}push({type:"paren",value:q,output:I.parens?")":"\\)"});decrement("parens");continue}if(q==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}q=`\\${q}`}else{increment("brackets")}push({type:"bracket",value:q});continue}if(q==="]"){if(r.nobracket===true||$&&$.type==="bracket"&&$.value.length===1){push({type:"text",value:q,output:`\\${q}`});continue}if(I.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:q,output:`\\${q}`});continue}decrement("brackets");const e=$.value.slice(1);if($.posix!==true&&e[0]==="^"&&!e.includes("/")){q=`/${q}`}$.value+=q;append({value:q});if(r.literalBrackets===false||a.hasRegexChars(e)){continue}const t=a.escapeRegex($.value);I.output=I.output.slice(0,-$.value.length);if(r.literalBrackets===true){I.output+=t;$.value=t;continue}$.value=`(${g}${t}|${$.value})`;I.output+=$.value;continue}if(q==="{"&&r.nobrace!==true){increment("braces");const e={type:"brace",value:q,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};W.push(e);push(e);continue}if(q==="}"){const e=W[W.length-1];if(r.nobrace===true||!e){push({type:"text",value:q,output:q});continue}let t=")";if(e.dots===true){const e=D.slice();const s=[];for(let t=e.length-1;t>=0;t--){D.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,r);I.backtrack=true}if(e.comma!==true&&e.dots!==true){const r=I.output.slice(0,e.outputIndex);const s=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{";q=t="\\}";I.output=r;for(const e of s){I.output+=e.output||e.value}}push({type:"brace",value:q,output:t});decrement("braces");W.pop();continue}if(q==="|"){if(P.length>0){P[P.length-1].conditions++}push({type:"text",value:q});continue}if(q===","){let e=q;const t=W[W.length-1];if(t&&M[M.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:q,output:e});continue}if(q==="/"){if($.type==="dot"&&I.index===I.start+1){I.start=I.index+1;I.consumed="";I.output="";D.pop();$=v;continue}push({type:"slash",value:q,output:x});continue}if(q==="."){if(I.braces>0&&$.type==="dot"){if($.value===".")$.output=E;const e=W[W.length-1];$.type="dots";$.output+=q;$.value+=q;e.dots=true;continue}if(I.braces+I.parens===0&&$.type!=="bos"&&$.type!=="slash"){push({type:"text",value:q,output:E});continue}push({type:"dot",value:q,output:E});continue}if(q==="?"){const e=$&&$.value==="(";if(!e&&r.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("qmark",q);continue}if($&&$.type==="paren"){const e=U();let t=q;if(e==="<"&&!a.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if($.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${q}`}push({type:"text",value:q,output:t});continue}if(r.dot!==true&&($.type==="slash"||$.type==="bos")){push({type:"qmark",value:q,output:O});continue}push({type:"qmark",value:q,output:R});continue}if(q==="!"){if(r.noextglob!==true&&U()==="("){if(U(2)!=="?"||!/[!=<:]/.test(U(3))){extglobOpen("negate",q);continue}}if(r.nonegate!==true&&I.index===0){negate();continue}}if(q==="+"){if(r.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("plus",q);continue}if($&&$.value==="("||r.regex===false){push({type:"plus",value:q,output:w});continue}if($&&($.type==="bracket"||$.type==="paren"||$.type==="brace")||I.parens>0){push({type:"plus",value:q});continue}push({type:"plus",value:w});continue}if(q==="@"){if(r.noextglob!==true&&U()==="("&&U(2)!=="?"){push({type:"at",extglob:true,value:q,output:""});continue}push({type:"text",value:q});continue}if(q!=="*"){if(q==="$"||q==="^"){q=`\\${q}`}const e=c.exec(remaining());if(e){q+=e[0];I.index+=e[0].length}push({type:"text",value:q});continue}if($&&($.type==="globstar"||$.star===true)){$.type="star";$.star=true;$.value+=q;$.output=N;I.backtrack=true;I.globstar=true;consume(q);continue}let t=remaining();if(r.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",q);continue}if($.type==="star"){if(r.noglobstar===true){consume(q);continue}const s=$.prev;const a=s.prev;const o=s.type==="slash"||s.type==="bos";const u=a&&(a.type==="star"||a.type==="globstar");if(r.bash===true&&(!o||t[0]&&t[0]!=="/")){push({type:"star",value:q,output:""});continue}const c=I.braces>0&&(s.type==="comma"||s.type==="brace");const f=P.length&&(s.type==="pipe"||s.type==="paren");if(!o&&s.type!=="paren"&&!c&&!f){push({type:"star",value:q,output:""});continue}while(t.slice(0,3)==="/**"){const r=e[I.index+4];if(r&&r!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){$.type="globstar";$.value+=q;$.output=globstar(r);I.output=$.output;I.globstar=true;consume(q);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!u&&eos()){I.output=I.output.slice(0,-(s.output+$.output).length);s.output=`(?:${s.output}`;$.type="globstar";$.output=globstar(r)+(r.strictSlashes?")":"|$)");$.value+=q;I.globstar=true;I.output+=s.output+$.output;consume(q);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";I.output=I.output.slice(0,-(s.output+$.output).length);s.output=`(?:${s.output}`;$.type="globstar";$.output=`${globstar(r)}${x}|${x}${e})`;$.value+=q;I.output+=s.output+$.output;I.globstar=true;consume(q+G());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){$.type="globstar";$.value+=q;$.output=`(?:^|${x}|${globstar(r)}${x})`;I.output=$.output;I.globstar=true;consume(q+G());push({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-$.output.length);$.type="globstar";$.output=globstar(r);$.value+=q;I.output+=$.output;I.globstar=true;consume(q);continue}const s={type:"star",value:q,output:N};if(r.bash===true){s.output=".*?";if($.type==="bos"||$.type==="slash"){s.output=B+s.output}push(s);continue}if($&&($.type==="bracket"||$.type==="paren")&&r.regex===true){s.output=q;push(s);continue}if(I.index===I.start||$.type==="slash"||$.type==="dot"){if($.type==="dot"){I.output+=k;$.output+=k}else if(r.dot===true){I.output+=A;$.output+=A}else{I.output+=B;$.output+=B}if(U()!=="*"){I.output+=F;$.output+=F}}push(s)}while(I.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));I.output=a.escapeLast(I.output,"[");decrement("brackets")}while(I.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));I.output=a.escapeLast(I.output,"(");decrement("parens")}while(I.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));I.output=a.escapeLast(I.output,"{");decrement("braces")}if(r.strictSlashes!==true&&($.type==="star"||$.type==="bracket")){push({type:"maybe_slash",value:"",output:`${x}?`})}if(I.backtrack===true){I.output="";for(const e of I.tokens){I.output+=e.output!=null?e.output:e.value;if(e.suffix){I.output+=e.suffix}}}return I};parse.fastpaths=(e,t)=>{const r={...t};const u=typeof r.maxLength==="number"?Math.min(o,r.maxLength):o;const c=e.length;if(c>u){throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${u}`)}e=d[e]||e;const f=a.isWindows(t);const{DOT_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:v,DOTS_SLASH:D,NO_DOT:g,NO_DOTS:y,NO_DOTS_SLASH:m,STAR:_,START_ANCHOR:E}=s.globChars(f);const w=r.dot?y:g;const x=r.dot?m:g;const F=r.capture?"":"?:";const C={negated:false,prefix:""};let S=r.bash===true?".*?":_;if(r.capture){S=`(${S})`}const globstar=e=>{if(e.noglobstar===true)return S;return`(${F}(?:(?!${E}${e.dot?D:p}).)*?)`};const create=e=>{switch(e){case"*":return`${w}${v}${S}`;case".*":return`${p}${v}${S}`;case"*.*":return`${w}${S}${p}${v}${S}`;case"*/*":return`${w}${S}${h}${v}${x}${S}`;case"**":return w+globstar(r);case"**/*":return`(?:${w}${globstar(r)}${h})?${x}${v}${S}`;case"**/*.*":return`(?:${w}${globstar(r)}${h})?${x}${S}${p}${v}${S}`;case"**/.*":return`(?:${w}${globstar(r)}${h})?${p}${v}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=create(t[1]);if(!r)return;return r+p+t[2]}}};const k=a.removePrefix(e,C);let A=create(k);if(A&&r.strictSlashes!==true){A+=`${h}?`}return A};e.exports=parse},3683:(e,t,r)=>{"use strict";const s=r(1017);const a=r(1700);const o=r(4754);const u=r(7513);const c=r(9356);const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,r=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch(e,t,r)));const arrayMatcher=e=>{for(const t of s){const r=t(e);if(r)return r}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const a=t||{};const o=u.isWindows(t);const c=s?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const f=c.state;delete c.state;let isIgnored=()=>false;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(a.ignore,e,r)}const matcher=(r,s=false)=>{const{isMatch:u,match:d,output:p}=picomatch.test(r,c,t,{glob:e,posix:o});const h={glob:e,state:f,regex:c,posix:o,input:r,output:p,match:d,isMatch:u};if(typeof a.onResult==="function"){a.onResult(h)}if(u===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof a.onIgnore==="function"){a.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof a.onMatch==="function"){a.onMatch(h)}return s?h:true};if(r){matcher.state=f}return matcher};picomatch.test=(e,t,r,{glob:s,posix:a}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const o=r||{};const c=o.format||(a?u.toPosixSlashes:null);let f=e===s;let d=f&&c?c(e):e;if(f===false){d=c?c(e):e;f=d===s}if(f===false||o.capture===true){if(o.matchBase===true||o.basename===true){f=picomatch.matchBase(e,t,r,a)}else{f=t.exec(d)}}return{isMatch:Boolean(f),match:f,output:d}};picomatch.matchBase=(e,t,r,a=u.isWindows(r))=>{const o=t instanceof RegExp?t:picomatch.makeRe(t,r);return o.test(s.basename(e))};picomatch.isMatch=(e,t,r)=>picomatch(t,r)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return o(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>a(e,t);picomatch.compileRe=(e,t,r=false,s=false)=>{if(r===true){return e.output}const a=t||{};const o=a.contains?"":"^";const u=a.contains?"":"$";let c=`${o}(?:${e.output})${u}`;if(e&&e.negated===true){c=`^(?!${c}).*$`}const f=picomatch.toRegex(c,t);if(s===true){f.state=e}return f};picomatch.makeRe=(e,t,r=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}const a=t||{};let u={negated:false,fastpaths:true};let c="";let f;if(e.startsWith("./")){e=e.slice(2);c=u.prefix="./"}if(a.fastpaths!==false&&(e[0]==="."||e[0]==="*")){f=o.fastpaths(e,t)}if(f===undefined){u=o(e,t);u.prefix=c+(u.prefix||"")}else{u.output=f}return picomatch.compileRe(u,t,r,s)};picomatch.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=c;e.exports=picomatch},1700:(e,t,r)=>{"use strict";const s=r(7513);const{CHAR_ASTERISK:a,CHAR_AT:o,CHAR_BACKWARD_SLASH:u,CHAR_COMMA:c,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:d,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:D,CHAR_PLUS:g,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:E}=r(9356);const isPathSeparator=e=>e===p||e===u;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan=(e,t)=>{const r=t||{};const w=e.length-1;const x=r.parts===true||r.scanToEnd===true;const F=[];const C=[];const S=[];let k=e;let A=-1;let R=0;let O=0;let T=false;let j=false;let B=false;let L=false;let N=false;let I=false;let P=false;let W=false;let M=false;let $=0;let q;let U;let G={value:"",depth:0,isGlob:false};const eos=()=>A>=w;const peek=()=>k.charCodeAt(A+1);const advance=()=>{q=U;return k.charCodeAt(++A)};while(A0){K=k.slice(0,R);k=k.slice(R);O-=R}if(H&&B===true&&O>0){H=k.slice(0,O);z=k.slice(O)}else if(B===true){H="";z=k}else{H=k}if(H&&H!==""&&H!=="/"&&H!==k){if(isPathSeparator(H.charCodeAt(H.length-1))){H=H.slice(0,-1)}}if(r.unescape===true){if(z)z=s.removeBackslashes(z);if(H&&P===true){H=s.removeBackslashes(H)}}const V={prefix:K,input:e,start:R,base:H,glob:z,isBrace:T,isBracket:j,isGlob:B,isExtglob:L,isGlobstar:N,negated:W};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(U)){C.push(G)}V.tokens=C}if(r.parts===true||r.tokens===true){let t;for(let s=0;s{"use strict";const s=r(1017);const a=process.platform==="win32";const{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:f}=r(9356);t.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);t.hasRegexChars=e=>c.test(e);t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e);t.escapeRegex=e=>e.replace(f,"\\$1");t.toPosixSlashes=e=>e.replace(o,"/");t.removeBackslashes=e=>e.replace(u,(e=>e==="\\"?"":e));t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};t.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return a===true||s.sep==="\\"};t.escapeLast=(e,r,s)=>{const a=e.lastIndexOf(r,s);if(a===-1)return e;if(e[a-1]==="\\")return t.escapeLast(e,r,a-1);return`${e.slice(0,a)}\\${e.slice(a)}`};t.removePrefix=(e,t={})=>{let r=e;if(r.startsWith("./")){r=r.slice(2);t.prefix="./"}return r};t.wrapOutput=(e,t={},r={})=>{const s=r.contains?"":"^";const a=r.contains?"":"$";let o=`${s}(?:${e})${a}`;if(t.negated===true){o=`(?:^(?!${o}).*$)`}return o}},9182:e=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,s){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var a=arguments.length;var o,u;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function afterTickOne(){e.call(null,t)}));case 3:return process.nextTick((function afterTickTwo(){e.call(null,t,r)}));case 4:return process.nextTick((function afterTickThree(){e.call(null,t,r,s)}));default:o=new Array(a-1);u=0;while(u{"use strict";var s=r(9182);var a=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var o=Object.create(r(1504));o.inherits=r(2842);var u=r(7355);var c=r(3517);o.inherits(Duplex,u);{var f=a(c.prototype);for(var d=0;d{"use strict";e.exports=PassThrough;var s=r(2162);var a=Object.create(r(1504));a.inherits=r(2842);a.inherits(PassThrough,s);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);s.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},7355:(e,t,r)=>{"use strict";var s=r(9182);e.exports=Readable;var a=r(1551);var o;Readable.ReadableState=ReadableState;var u=r(2361).EventEmitter;var EElistenerCount=function(e,t){return e.listeners(t).length};var c=r(2641);var f=r(291).Buffer;var d=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return f.from(e)}function _isUint8Array(e){return f.isBuffer(e)||e instanceof d}var p=Object.create(r(1504));p.inherits=r(2842);var h=r(3837);var v=void 0;if(h&&h.debuglog){v=h.debuglog("stream")}else{v=function(){}}var D=r(4865);var g=r(2604);var y;p.inherits(Readable,c);var m=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(a(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t){o=o||r(4928);e=e||{};var s=t instanceof o;this.objectMode=!!e.objectMode;if(s)this.objectMode=this.objectMode||!!e.readableObjectMode;var a=e.highWaterMark;var u=e.readableHighWaterMark;var c=this.objectMode?16:16*1024;if(a||a===0)this.highWaterMark=a;else if(s&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=c;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new D;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!y)y=r(4426).s;this.decoder=new y(e.encoding);this.encoding=e.encoding}}function Readable(e){o=o||r(4928);if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}c.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=g.destroy;Readable.prototype._undestroy=g.undestroy;Readable.prototype._destroy=function(e,t){this.push(null);t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var s;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=f.from(e,t);t=""}s=true}}else{s=true}return readableAddChunk(this,e,t,false,s)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,s,a){var o=e._readableState;if(t===null){o.reading=false;onEofChunk(e,o)}else{var u;if(!a)u=chunkInvalid(o,t);if(u){e.emit("error",u)}else if(o.objectMode||t&&t.length>0){if(typeof t!=="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==f.prototype){t=_uint8ArrayToBuffer(t)}if(s){if(o.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,o,t,true)}else if(o.ended){e.emit("error",new Error("stream.push() after EOF"))}else{o.reading=false;if(o.decoder&&!r){t=o.decoder.write(t);if(o.objectMode||t.length!==0)addChunk(e,o,t,false);else maybeReadMore(e,o)}else{addChunk(e,o,t,false)}}}else if(!s){o.reading=false}}return needMoreData(o)}function addChunk(e,t,r,s){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(s)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=_){e=_}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){v("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){v("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var s=t.needReadable;v("need readable",s);if(t.length===0||t.length-e0)a=fromList(e,t);else a=null;if(a===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(a!==null)this.emit("data",a);return a};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){v("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)s.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){v("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;s.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(a.pipes,e)!==-1)&&!f){v("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;d=true}r.pause()}}function onerror(t){v("onerror",t);unpipe();e.removeListener("error",onerror);if(EElistenerCount(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){v("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){v("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!a.flowing){v("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;v("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&EElistenerCount(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var s=t.pipes;var a=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var o=0;o=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var s;if(eo.length?o.length:e;if(u===o.length)a+=o;else a+=o.slice(0,e);e-=u;if(e===0){if(u===o.length){++s;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=o.slice(u)}break}++s}t.length-=s;return a}function copyFromBuffer(e,t){var r=f.allocUnsafe(e);var s=t.head;var a=1;s.data.copy(r);e-=s.data.length;while(s=s.next){var o=s.data;var u=e>o.length?o.length:e;o.copy(r,r.length-e,0,u);e-=u;if(e===0){if(u===o.length){++a;if(s.next)t.head=s.next;else t.head=t.tail=null}else{t.head=s;s.data=o.slice(u)}break}++a}t.length-=a;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;s.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,s=e.length;r{"use strict";e.exports=Transform;var s=r(4928);var a=Object.create(r(1504));a.inherits=r(2842);a.inherits(Transform,s);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var s=r.writecb;if(!s){return this.emit("error",new Error("write callback called multiple times"))}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);s(e);var a=this._readableState;a.reading=false;if(a.needReadable||a.length{"use strict";var s=r(9182);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:s.nextTick;var o;Writable.WritableState=WritableState;var u=Object.create(r(1504));u.inherits=r(2842);var c={deprecate:r(6124)};var f=r(2641);var d=r(291).Buffer;var p=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return d.from(e)}function _isUint8Array(e){return d.isBuffer(e)||e instanceof p}var h=r(2604);u.inherits(Writable,f);function nop(){}function WritableState(e,t){o=o||r(4928);e=e||{};var s=t instanceof o;this.objectMode=!!e.objectMode;if(s)this.objectMode=this.objectMode||!!e.writableObjectMode;var a=e.highWaterMark;var u=e.writableHighWaterMark;var c=this.objectMode?16:16*1024;if(a||a===0)this.highWaterMark=a;else if(s&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=c;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var f=e.decodeStrings===false;this.decodeStrings=!f;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var v;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){v=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(v.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{v=function(e){return e instanceof this}}function Writable(e){o=o||r(4928);if(!v.call(Writable,this)&&!(this instanceof o)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}f.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);s.nextTick(t,r)}function validChunk(e,t,r,a){var o=true;var u=false;if(r===null){u=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){e.emit("error",u);s.nextTick(a,u);o=false}return o}Writable.prototype.write=function(e,t,r){var s=this._writableState;var a=false;var o=!s.objectMode&&_isUint8Array(e);if(o&&!d.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(o)t="buffer";else if(!t)t=s.defaultEncoding;if(typeof r!=="function")r=nop;if(s.ended)writeAfterEnd(this,r);else if(o||validChunk(this,s,e,r)){s.pendingcb++;a=writeOrBuffer(this,s,o,e,t,r)}return a};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=d.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,s,a,o){if(!r){var u=decodeChunk(t,s,a);if(s!==u){r=true;a="buffer";s=u}}var c=t.objectMode?1:s.length;t.length+=c;var f=t.length{"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var s=r(291).Buffer;var a=r(3837);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return s.alloc(0);if(this.length===1)return this.head.data;var t=s.allocUnsafe(e>>>0);var r=this.head;var a=0;while(r){copyBuffer(r.data,t,a);a+=r.data.length;r=r.next}return t};return BufferList}();if(a&&a.inspect&&a.inspect.custom){e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e}}},2604:(e,t,r)=>{"use strict";var s=r(9182);function destroy(e,t){var r=this;var a=this._readableState&&this._readableState.destroyed;var o=this._writableState&&this._writableState.destroyed;if(a||o){if(t){t(e)}else if(e&&(!this._writableState||!this._writableState.errorEmitted)){s.nextTick(emitErrorNT,this,e)}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){s.nextTick(emitErrorNT,r,e);if(r._writableState){r._writableState.errorEmitted=true}}else if(t){t(e)}}));return this}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.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy}},2641:(e,t,r)=>{e.exports=r(2781)},8511:(e,t,r)=>{var s=r(2781);if(process.env.READABLE_STREAM==="disable"&&s){e.exports=s;t=e.exports=s.Readable;t.Readable=s.Readable;t.Writable=s.Writable;t.Duplex=s.Duplex;t.Transform=s.Transform;t.PassThrough=s.PassThrough;t.Stream=s}else{t=e.exports=r(7355);t.Stream=s||t;t.Readable=t;t.Writable=r(3517);t.Duplex=r(4928);t.Transform=r(2162);t.PassThrough=r(9924)}},2382:(e,t,r)=>{"use strict";const s=r(1017);const a=r(8188);const o=r(7147);const resolveFrom=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=o.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=s.resolve(e)}else if(r){return}else{throw t}}const u=s.join(e,"noop.js");const resolveFileName=()=>a._resolveFilename(t,{id:u,filename:u,paths:a._nodeModulePaths(e)});if(r){try{return resolveFileName()}catch(e){return}}return resolveFileName()};e.exports=(e,t)=>resolveFrom(e,t);e.exports.silent=(e,t)=>resolveFrom(e,t,true)},4700:(e,t,r)=>{const s=r(9491);const a=r(1017);const o=r(7147);let u=undefined;try{u=r(3535)}catch(e){}const c={nosort:true,silent:true};let f=0;const d=process.platform==="win32";const defaults=e=>{const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((t=>{e[t]=e[t]||o[t];t=t+"Sync";e[t]=e[t]||o[t]}));e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}if(e.disableGlob!==true&&u===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}e.disableGlob=e.disableGlob||false;e.glob=e.glob||c};const rimraf=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}s(e,"rimraf: missing path");s.equal(typeof e,"string","rimraf: path should be a string");s.equal(typeof r,"function","rimraf: callback function required");s(t,"rimraf: invalid options argument provided");s.equal(typeof t,"object","rimraf: options should be object");defaults(t);let a=0;let o=null;let c=0;const next=e=>{o=o||e;if(--c===0)r(o)};const afterGlob=(e,s)=>{if(e)return r(e);c=s.length;if(c===0)return r();s.forEach((e=>{const CB=r=>{if(r){if((r.code==="EBUSY"||r.code==="ENOTEMPTY"||r.code==="EPERM")&&arimraf_(e,t,CB)),a*100)}if(r.code==="EMFILE"&&frimraf_(e,t,CB)),f++)}if(r.code==="ENOENT")r=null}f=0;next(r)};rimraf_(e,t,CB)}))};if(t.disableGlob||!u.hasMagic(e))return afterGlob(null,[e]);t.lstat(e,((r,s)=>{if(!r)return afterGlob(null,[e]);u(e,t.glob,afterGlob)}))};const rimraf_=(e,t,r)=>{s(e);s(t);s(typeof r==="function");t.lstat(e,((s,a)=>{if(s&&s.code==="ENOENT")return r(null);if(s&&s.code==="EPERM"&&d)fixWinEPERM(e,t,s,r);if(a&&a.isDirectory())return rmdir(e,t,s,r);t.unlink(e,(s=>{if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return d?fixWinEPERM(e,t,s,r):rmdir(e,t,s,r);if(s.code==="EISDIR")return rmdir(e,t,s,r)}return r(s)}))}))};const fixWinEPERM=(e,t,r,a)=>{s(e);s(t);s(typeof a==="function");t.chmod(e,438,(s=>{if(s)a(s.code==="ENOENT"?null:r);else t.stat(e,((s,o)=>{if(s)a(s.code==="ENOENT"?null:r);else if(o.isDirectory())rmdir(e,t,r,a);else t.unlink(e,a)}))}))};const fixWinEPERMSync=(e,t,r)=>{s(e);s(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT")return;else throw r}let a;try{a=t.statSync(e)}catch(e){if(e.code==="ENOENT")return;else throw r}if(a.isDirectory())rmdirSync(e,t,r);else t.unlinkSync(e)};const rmdir=(e,t,r,a)=>{s(e);s(t);s(typeof a==="function");t.rmdir(e,(s=>{if(s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM"))rmkids(e,t,a);else if(s&&s.code==="ENOTDIR")a(r);else a(s)}))};const rmkids=(e,t,r)=>{s(e);s(t);s(typeof r==="function");t.readdir(e,((s,o)=>{if(s)return r(s);let u=o.length;if(u===0)return t.rmdir(e,r);let c;o.forEach((s=>{rimraf(a.join(e,s),t,(s=>{if(c)return;if(s)return r(c=s);if(--u===0)t.rmdir(e,r)}))}))}))};const rimrafSync=(e,t)=>{t=t||{};defaults(t);s(e,"rimraf: missing path");s.equal(typeof e,"string","rimraf: path should be a string");s(t,"rimraf: missing options");s.equal(typeof t,"object","rimraf: options should be object");let r;if(t.disableGlob||!u.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(s){r=u.sync(e,t.glob)}}if(!r.length)return;for(let e=0;e{s(e);s(t);try{t.rmdirSync(e)}catch(s){if(s.code==="ENOENT")return;if(s.code==="ENOTDIR")throw r;if(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")rmkidsSync(e,t)}};const rmkidsSync=(e,t)=>{s(e);s(t);t.readdirSync(e).forEach((r=>rimrafSync(a.join(e,r),t)));const r=d?100:1;let o=0;do{let s=true;try{const a=t.rmdirSync(e,t);s=false;return a}finally{if(++o{var s=r(4300);var a=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return a(e,t,r)}copyProps(a,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return a(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=a(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return a(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},2656:e=>{e.exports=function(e){[process.stdout,process.stderr].forEach((function(t){if(t._handle&&t.isTTY&&typeof t._handle.setBlocking==="function"){t._handle.setBlocking(e)}}))}},7234:(e,t,r)=>{var s=global.process;const processOk=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!processOk(s)){e.exports=function(){return function(){}}}else{var a=r(9491);var o=r(6462);var u=/^win/i.test(s.platform);var c=r(2361);if(typeof c!=="function"){c=c.EventEmitter}var f;if(s.__signal_exit_emitter__){f=s.__signal_exit_emitter__}else{f=s.__signal_exit_emitter__=new c;f.count=0;f.emitted={}}if(!f.infinite){f.setMaxListeners(Infinity);f.infinite=true}e.exports=function(e,t){if(!processOk(global.process)){return function(){}}a.equal(typeof e,"function","a callback must be provided for exit handler");if(v===false){D()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var remove=function(){f.removeListener(r,e);if(f.listeners("exit").length===0&&f.listeners("afterexit").length===0){d()}};f.on(r,e);return remove};var d=function unload(){if(!v||!processOk(global.process)){return}v=false;o.forEach((function(e){try{s.removeListener(e,h[e])}catch(e){}}));s.emit=m;s.reallyExit=g;f.count-=1};e.exports.unload=d;var p=function emit(e,t,r){if(f.emitted[e]){return}f.emitted[e]=true;f.emit(e,t,r)};var h={};o.forEach((function(e){h[e]=function listener(){if(!processOk(global.process)){return}var t=s.listeners(e);if(t.length===f.count){d();p("exit",null,e);p("afterexit",null,e);if(u&&e==="SIGHUP"){e="SIGINT"}s.kill(s.pid,e)}}}));e.exports.signals=function(){return o};var v=false;var D=function load(){if(v||!processOk(global.process)){return}v=true;f.count+=1;o=o.filter((function(e){try{s.on(e,h[e]);return true}catch(e){return false}}));s.emit=_;s.reallyExit=y};e.exports.load=D;var g=s.reallyExit;var y=function processReallyExit(e){if(!processOk(global.process)){return}s.exitCode=e||0;p("exit",s.exitCode,null);p("afterexit",s.exitCode,null);g.call(s,s.exitCode)};var m=s.emit;var _=function processEmit(e,t){if(e==="exit"&&processOk(global.process)){if(t!==undefined){s.exitCode=t}var r=m.apply(this,arguments);p("exit",s.exitCode,null);p("afterexit",s.exitCode,null);return r}else{return m.apply(this,arguments)}}}},6462:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},8321:(e,t,r)=>{"use strict";var s=r(7518);var a=r(8589);var o=r(3279);e.exports=function(e){if(typeof e!=="string"||e.length===0){return 0}var t=0;e=s(e);for(var r=0;r=127&&u<=159){continue}if(u>=65536){r++}if(o(u)){t+=2}else{t++}}return t}},5663:(e,t,r)=>{"use strict";const s=r(7518);const a=r(8502);const o=r(3876);const stringWidth=e=>{if(typeof e!=="string"||e.length===0){return 0}e=s(e);if(e.length===0){return 0}e=e.replace(o()," ");let t=0;for(let r=0;r=127&&s<=159){continue}if(s>=768&&s<=879){continue}if(s>65535){r++}t+=a(s)?2:1}return t};e.exports=stringWidth;e.exports["default"]=stringWidth},4426:(e,t,r)=>{"use strict";var s=r(291).Buffer;var a=s.isEncoding||function(e){e=""+e;switch(e&&e.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(e){if(!e)return"utf8";var t;while(true){switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(s.isEncoding===a||!a(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=s.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var s=t.length-1;if(s=0){if(a>0)e.lastNeed=a-1;return a}if(--s=0){if(a>0)e.lastNeed=a-2;return a}if(--s=0){if(a>0){if(a===2)a=0;else e.lastNeed=a-3}return a}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var s=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,s);return e.toString("utf8",t,s)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},6124:(e,t,r)=>{e.exports=r(3837).deprecate},1365:(e,t,r)=>{"use strict";var s=r(5663);t.center=alignCenter;t.left=alignLeft;t.right=alignRight;function createPadding(e){var t="";var r=" ";var s=e;do{if(s%2){t+=r}s=Math.floor(s/2);r+=r}while(s);return t}function alignLeft(e,t){var r=e.trimRight();if(r.length===0&&e.length>=t)return e;var a="";var o=s(r);if(o=t)return e;var a="";var o=s(r);if(o=t)return e;var a="";var o="";var u=s(r);if(u{module.exports=eval("require")("aws-sdk")},3930:module=>{module.exports=eval("require")("mock-aws-s3")},4997:module=>{module.exports=eval("require")("nock")},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},8188:e=>{"use strict";e.exports=require("module")},1988:e=>{"use strict";e.exports=require("next/dist/compiled/acorn")},5749:e=>{"use strict";e.exports=require("next/dist/compiled/async-sema")},3535:e=>{"use strict";e.exports=require("next/dist/compiled/glob")},2540:e=>{"use strict";e.exports=require("next/dist/compiled/micromatch")},7849:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},7518:e=>{"use strict";e.exports=require("next/dist/compiled/strip-ansi")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},8102:e=>{"use strict";e.exports=require("repl")},2781:e=>{"use strict";e.exports=require("stream")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(1017);var a=r(6251);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var o=_interopDefaultLegacy(a);const u=function addExtension(e,t=".js"){let r=`${e}`;if(!s.extname(e))r+=t;return r};class WalkerBase{constructor(){WalkerBase.prototype.__init.call(this);WalkerBase.prototype.__init2.call(this);WalkerBase.prototype.__init3.call(this);WalkerBase.prototype.__init4.call(this)}__init(){this.should_skip=false}__init2(){this.should_remove=false}__init3(){this.replacement=null}__init4(){this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:e=>this.replacement=e}}replace(e,t,r,s){if(e){if(r!==null){e[t][r]=s}else{e[t]=s}}}remove(e,t,r){if(e){if(r!==null){e[t].splice(r,1)}else{delete e[t]}}}}class SyncWalkerClass extends WalkerBase{constructor(e){super();this.enter=e.enter;this.leave=e.leave}visit(e,t,r,s,a,o){if(e){if(r){const s=this.should_skip;const u=this.should_remove;const c=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;r.call(this.context,e,t,a,o);if(this.replacement){e=this.replacement;this.replace(t,a,o,e)}if(this.should_remove){this.remove(t,a,o)}const f=this.should_skip;const d=this.should_remove;this.should_skip=s;this.should_remove=u;this.replacement=c;if(f)return e;if(d)return null}for(const t in e){const a=e[t];if(typeof a!=="object"){continue}else if(Array.isArray(a)){for(let o=0;o{f(e).forEach((e=>{this.declarations[e]=true}))}))}}addDeclaration(e,t,r){if(!t&&this.isBlockScope){this.parent.addDeclaration(e,t,r)}else if(e.id){f(e.id).forEach((e=>{this.declarations[e]=true}))}}contains(e){return this.declarations[e]||(this.parent?this.parent.contains(e):false)}}const p=function attachScopes(e,t="scope"){let r=new Scope;walk(e,{enter(e,s){const a=e;if(/(Function|Class)Declaration/.test(a.type)){r.addDeclaration(a,false,false)}if(a.type==="VariableDeclaration"){const{kind:e}=a;const t=d[e];a.declarations.forEach((e=>{r.addDeclaration(e,t,true)}))}let o;if(/Function/.test(a.type)){const e=a;o=new Scope({parent:r,block:false,params:e.params});if(e.type==="FunctionExpression"&&e.id){o.addDeclaration(e,false,false)}}if(/For(In|Of)?Statement/.test(a.type)){o=new Scope({parent:r,block:true})}if(a.type==="BlockStatement"&&!/Function/.test(s.type)){o=new Scope({parent:r,block:true})}if(a.type==="CatchClause"){o=new Scope({parent:r,params:a.param?[a.param]:[],block:true})}if(o){Object.defineProperty(a,t,{value:o,configurable:true});r=o}},leave(e){const s=e;if(s[t])r=r.parent}});return r};function isArray(e){return Array.isArray(e)}function ensureArray(e){if(isArray(e))return e;if(e==null)return[];return[e]}const h=function normalizePath(e){return e.split(s.win32.sep).join(s.posix.sep)};function getMatcherString(e,t){if(t===false||s.isAbsolute(e)||e.startsWith("*")){return h(e)}const r=h(s.resolve(t||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return s.posix.join(r,h(e))}const v=function createFilter(e,t,r){const s=r&&r.resolve;const getMatcher=e=>e instanceof RegExp?e:{test:t=>{const r=getMatcherString(e,s);const a=o["default"](r,{dot:true});const u=a(t);return u}};const a=ensureArray(e).map(getMatcher);const u=ensureArray(t).map(getMatcher);return function result(e){if(typeof e!=="string")return false;if(/\0/.test(e))return false;const t=h(e);for(let e=0;et.toUpperCase())).replace(/[^$_a-zA-Z0-9]/g,"_");if(/\d/.test(t[0])||y.has(t)){t=`_${t}`}return t||"_"};function stringify(e){return(JSON.stringify(e)||"undefined").replace(/[\u2028\u2029]/g,(e=>`\\u${`000${e.charCodeAt(0).toString(16)}`.slice(-4)}`))}function serializeArray(e,t,r){let s="[";const a=t?`\n${r}${t}`:"";for(let o=0;o0?",":""}${a}${serialize(u,t,r+t)}`}return`${s}${t?`\n${r}`:""}]`}function serializeObject(e,t,r){let s="{";const a=t?`\n${r}${t}`:"";const o=Object.entries(e);for(let e=0;e0?",":""}${a}${f}:${t?" ":""}${serialize(c,t,r+t)}`}return`${s}${t?`\n${r}`:""}}`}function serialize(e,t,r){if(typeof e==="object"&&e!==null){if(Array.isArray(e))return serializeArray(e,t,r);if(e instanceof Date)return`new Date(${e.getTime()})`;if(e instanceof RegExp)return e.toString();return serializeObject(e,t,r)}if(typeof e==="number"){if(e===Infinity)return"Infinity";if(e===-Infinity)return"-Infinity";if(e===0)return 1/e===Infinity?"0":"-0";if(e!==e)return"NaN"}if(typeof e==="symbol"){const t=Symbol.keyFor(e);if(t!==undefined)return`Symbol.for(${stringify(t)})`}if(typeof e==="bigint")return`${e}n`;return stringify(e)}const _=function dataToEsm(e,t={}){const r=t.compact?"":"indent"in t?t.indent:"\t";const s=t.compact?"":" ";const a=t.compact?"":"\n";const o=t.preferConst?"const":"var";if(t.namedExports===false||typeof e!=="object"||Array.isArray(e)||e instanceof Date||e instanceof RegExp||e===null){const a=serialize(e,t.compact?null:r,"");const o=s||(/^[{[\-\/]/.test(a)?"":" ");return`export default${o}${a};`}let u="";const c=[];for(const[f,d]of Object.entries(e)){if(f===m(f)){if(t.objectShorthand)c.push(f);else c.push(`${f}:${s}${f}`);u+=`export ${o} ${f}${s}=${s}${serialize(d,t.compact?null:r,"")};${a}`}else{c.push(`${stringify(f)}:${s}${serialize(d,t.compact?null:r,"")}`)}}return`${u}export default${s}{${a}${r}${c.join(`,${a}${r}`)}${a}};${a}`};var E={addExtension:u,attachScopes:p,createFilter:v,dataToEsm:_,extractAssignedNames:f,makeLegalIdentifier:m,normalizePath:h};t.addExtension=u;t.attachScopes=p;t.createFilter=v;t.dataToEsm=_;t["default"]=E;t.extractAssignedNames=f;t.makeLegalIdentifier=m;t.normalizePath=h},3982:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";class WalkerBase{constructor(){this.should_skip=false;this.should_remove=false;this.replacement=null;this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:e=>this.replacement=e}}replace(e,t,r,s){if(e){if(r!==null){e[t][r]=s}else{e[t]=s}}}remove(e,t,r){if(e){if(r!==null){e[t].splice(r,1)}else{delete e[t]}}}}class SyncWalker extends WalkerBase{constructor(e,t){super();this.enter=e;this.leave=t}visit(e,t,r,s){if(e){if(this.enter){const a=this.should_skip;const o=this.should_remove;const u=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;this.enter.call(this.context,e,t,r,s);if(this.replacement){e=this.replacement;this.replace(t,r,s,e)}if(this.should_remove){this.remove(t,r,s)}const c=this.should_skip;const f=this.should_remove;this.should_skip=a;this.should_remove=o;this.replacement=u;if(c)return e;if(f)return null}for(const t in e){const r=e[t];if(typeof r!=="object"){continue}else if(Array.isArray(r)){for(let s=0;s{"use strict";e.exports=JSON.parse('{"0.1.14":{"node_abi":null,"v8":"1.3"},"0.1.15":{"node_abi":null,"v8":"1.3"},"0.1.16":{"node_abi":null,"v8":"1.3"},"0.1.17":{"node_abi":null,"v8":"1.3"},"0.1.18":{"node_abi":null,"v8":"1.3"},"0.1.19":{"node_abi":null,"v8":"2.0"},"0.1.20":{"node_abi":null,"v8":"2.0"},"0.1.21":{"node_abi":null,"v8":"2.0"},"0.1.22":{"node_abi":null,"v8":"2.0"},"0.1.23":{"node_abi":null,"v8":"2.0"},"0.1.24":{"node_abi":null,"v8":"2.0"},"0.1.25":{"node_abi":null,"v8":"2.0"},"0.1.26":{"node_abi":null,"v8":"2.0"},"0.1.27":{"node_abi":null,"v8":"2.1"},"0.1.28":{"node_abi":null,"v8":"2.1"},"0.1.29":{"node_abi":null,"v8":"2.1"},"0.1.30":{"node_abi":null,"v8":"2.1"},"0.1.31":{"node_abi":null,"v8":"2.1"},"0.1.32":{"node_abi":null,"v8":"2.1"},"0.1.33":{"node_abi":null,"v8":"2.1"},"0.1.90":{"node_abi":null,"v8":"2.2"},"0.1.91":{"node_abi":null,"v8":"2.2"},"0.1.92":{"node_abi":null,"v8":"2.2"},"0.1.93":{"node_abi":null,"v8":"2.2"},"0.1.94":{"node_abi":null,"v8":"2.2"},"0.1.95":{"node_abi":null,"v8":"2.2"},"0.1.96":{"node_abi":null,"v8":"2.2"},"0.1.97":{"node_abi":null,"v8":"2.2"},"0.1.98":{"node_abi":null,"v8":"2.2"},"0.1.99":{"node_abi":null,"v8":"2.2"},"0.1.100":{"node_abi":null,"v8":"2.2"},"0.1.101":{"node_abi":null,"v8":"2.3"},"0.1.102":{"node_abi":null,"v8":"2.3"},"0.1.103":{"node_abi":null,"v8":"2.3"},"0.1.104":{"node_abi":null,"v8":"2.3"},"0.2.0":{"node_abi":1,"v8":"2.3"},"0.2.1":{"node_abi":1,"v8":"2.3"},"0.2.2":{"node_abi":1,"v8":"2.3"},"0.2.3":{"node_abi":1,"v8":"2.3"},"0.2.4":{"node_abi":1,"v8":"2.3"},"0.2.5":{"node_abi":1,"v8":"2.3"},"0.2.6":{"node_abi":1,"v8":"2.3"},"0.3.0":{"node_abi":1,"v8":"2.5"},"0.3.1":{"node_abi":1,"v8":"2.5"},"0.3.2":{"node_abi":1,"v8":"3.0"},"0.3.3":{"node_abi":1,"v8":"3.0"},"0.3.4":{"node_abi":1,"v8":"3.0"},"0.3.5":{"node_abi":1,"v8":"3.0"},"0.3.6":{"node_abi":1,"v8":"3.0"},"0.3.7":{"node_abi":1,"v8":"3.0"},"0.3.8":{"node_abi":1,"v8":"3.1"},"0.4.0":{"node_abi":1,"v8":"3.1"},"0.4.1":{"node_abi":1,"v8":"3.1"},"0.4.2":{"node_abi":1,"v8":"3.1"},"0.4.3":{"node_abi":1,"v8":"3.1"},"0.4.4":{"node_abi":1,"v8":"3.1"},"0.4.5":{"node_abi":1,"v8":"3.1"},"0.4.6":{"node_abi":1,"v8":"3.1"},"0.4.7":{"node_abi":1,"v8":"3.1"},"0.4.8":{"node_abi":1,"v8":"3.1"},"0.4.9":{"node_abi":1,"v8":"3.1"},"0.4.10":{"node_abi":1,"v8":"3.1"},"0.4.11":{"node_abi":1,"v8":"3.1"},"0.4.12":{"node_abi":1,"v8":"3.1"},"0.5.0":{"node_abi":1,"v8":"3.1"},"0.5.1":{"node_abi":1,"v8":"3.4"},"0.5.2":{"node_abi":1,"v8":"3.4"},"0.5.3":{"node_abi":1,"v8":"3.4"},"0.5.4":{"node_abi":1,"v8":"3.5"},"0.5.5":{"node_abi":1,"v8":"3.5"},"0.5.6":{"node_abi":1,"v8":"3.6"},"0.5.7":{"node_abi":1,"v8":"3.6"},"0.5.8":{"node_abi":1,"v8":"3.6"},"0.5.9":{"node_abi":1,"v8":"3.6"},"0.5.10":{"node_abi":1,"v8":"3.7"},"0.6.0":{"node_abi":1,"v8":"3.6"},"0.6.1":{"node_abi":1,"v8":"3.6"},"0.6.2":{"node_abi":1,"v8":"3.6"},"0.6.3":{"node_abi":1,"v8":"3.6"},"0.6.4":{"node_abi":1,"v8":"3.6"},"0.6.5":{"node_abi":1,"v8":"3.6"},"0.6.6":{"node_abi":1,"v8":"3.6"},"0.6.7":{"node_abi":1,"v8":"3.6"},"0.6.8":{"node_abi":1,"v8":"3.6"},"0.6.9":{"node_abi":1,"v8":"3.6"},"0.6.10":{"node_abi":1,"v8":"3.6"},"0.6.11":{"node_abi":1,"v8":"3.6"},"0.6.12":{"node_abi":1,"v8":"3.6"},"0.6.13":{"node_abi":1,"v8":"3.6"},"0.6.14":{"node_abi":1,"v8":"3.6"},"0.6.15":{"node_abi":1,"v8":"3.6"},"0.6.16":{"node_abi":1,"v8":"3.6"},"0.6.17":{"node_abi":1,"v8":"3.6"},"0.6.18":{"node_abi":1,"v8":"3.6"},"0.6.19":{"node_abi":1,"v8":"3.6"},"0.6.20":{"node_abi":1,"v8":"3.6"},"0.6.21":{"node_abi":1,"v8":"3.6"},"0.7.0":{"node_abi":1,"v8":"3.8"},"0.7.1":{"node_abi":1,"v8":"3.8"},"0.7.2":{"node_abi":1,"v8":"3.8"},"0.7.3":{"node_abi":1,"v8":"3.9"},"0.7.4":{"node_abi":1,"v8":"3.9"},"0.7.5":{"node_abi":1,"v8":"3.9"},"0.7.6":{"node_abi":1,"v8":"3.9"},"0.7.7":{"node_abi":1,"v8":"3.9"},"0.7.8":{"node_abi":1,"v8":"3.9"},"0.7.9":{"node_abi":1,"v8":"3.11"},"0.7.10":{"node_abi":1,"v8":"3.9"},"0.7.11":{"node_abi":1,"v8":"3.11"},"0.7.12":{"node_abi":1,"v8":"3.11"},"0.8.0":{"node_abi":1,"v8":"3.11"},"0.8.1":{"node_abi":1,"v8":"3.11"},"0.8.2":{"node_abi":1,"v8":"3.11"},"0.8.3":{"node_abi":1,"v8":"3.11"},"0.8.4":{"node_abi":1,"v8":"3.11"},"0.8.5":{"node_abi":1,"v8":"3.11"},"0.8.6":{"node_abi":1,"v8":"3.11"},"0.8.7":{"node_abi":1,"v8":"3.11"},"0.8.8":{"node_abi":1,"v8":"3.11"},"0.8.9":{"node_abi":1,"v8":"3.11"},"0.8.10":{"node_abi":1,"v8":"3.11"},"0.8.11":{"node_abi":1,"v8":"3.11"},"0.8.12":{"node_abi":1,"v8":"3.11"},"0.8.13":{"node_abi":1,"v8":"3.11"},"0.8.14":{"node_abi":1,"v8":"3.11"},"0.8.15":{"node_abi":1,"v8":"3.11"},"0.8.16":{"node_abi":1,"v8":"3.11"},"0.8.17":{"node_abi":1,"v8":"3.11"},"0.8.18":{"node_abi":1,"v8":"3.11"},"0.8.19":{"node_abi":1,"v8":"3.11"},"0.8.20":{"node_abi":1,"v8":"3.11"},"0.8.21":{"node_abi":1,"v8":"3.11"},"0.8.22":{"node_abi":1,"v8":"3.11"},"0.8.23":{"node_abi":1,"v8":"3.11"},"0.8.24":{"node_abi":1,"v8":"3.11"},"0.8.25":{"node_abi":1,"v8":"3.11"},"0.8.26":{"node_abi":1,"v8":"3.11"},"0.8.27":{"node_abi":1,"v8":"3.11"},"0.8.28":{"node_abi":1,"v8":"3.11"},"0.9.0":{"node_abi":1,"v8":"3.11"},"0.9.1":{"node_abi":10,"v8":"3.11"},"0.9.2":{"node_abi":10,"v8":"3.11"},"0.9.3":{"node_abi":10,"v8":"3.13"},"0.9.4":{"node_abi":10,"v8":"3.13"},"0.9.5":{"node_abi":10,"v8":"3.13"},"0.9.6":{"node_abi":10,"v8":"3.15"},"0.9.7":{"node_abi":10,"v8":"3.15"},"0.9.8":{"node_abi":10,"v8":"3.15"},"0.9.9":{"node_abi":11,"v8":"3.15"},"0.9.10":{"node_abi":11,"v8":"3.15"},"0.9.11":{"node_abi":11,"v8":"3.14"},"0.9.12":{"node_abi":11,"v8":"3.14"},"0.10.0":{"node_abi":11,"v8":"3.14"},"0.10.1":{"node_abi":11,"v8":"3.14"},"0.10.2":{"node_abi":11,"v8":"3.14"},"0.10.3":{"node_abi":11,"v8":"3.14"},"0.10.4":{"node_abi":11,"v8":"3.14"},"0.10.5":{"node_abi":11,"v8":"3.14"},"0.10.6":{"node_abi":11,"v8":"3.14"},"0.10.7":{"node_abi":11,"v8":"3.14"},"0.10.8":{"node_abi":11,"v8":"3.14"},"0.10.9":{"node_abi":11,"v8":"3.14"},"0.10.10":{"node_abi":11,"v8":"3.14"},"0.10.11":{"node_abi":11,"v8":"3.14"},"0.10.12":{"node_abi":11,"v8":"3.14"},"0.10.13":{"node_abi":11,"v8":"3.14"},"0.10.14":{"node_abi":11,"v8":"3.14"},"0.10.15":{"node_abi":11,"v8":"3.14"},"0.10.16":{"node_abi":11,"v8":"3.14"},"0.10.17":{"node_abi":11,"v8":"3.14"},"0.10.18":{"node_abi":11,"v8":"3.14"},"0.10.19":{"node_abi":11,"v8":"3.14"},"0.10.20":{"node_abi":11,"v8":"3.14"},"0.10.21":{"node_abi":11,"v8":"3.14"},"0.10.22":{"node_abi":11,"v8":"3.14"},"0.10.23":{"node_abi":11,"v8":"3.14"},"0.10.24":{"node_abi":11,"v8":"3.14"},"0.10.25":{"node_abi":11,"v8":"3.14"},"0.10.26":{"node_abi":11,"v8":"3.14"},"0.10.27":{"node_abi":11,"v8":"3.14"},"0.10.28":{"node_abi":11,"v8":"3.14"},"0.10.29":{"node_abi":11,"v8":"3.14"},"0.10.30":{"node_abi":11,"v8":"3.14"},"0.10.31":{"node_abi":11,"v8":"3.14"},"0.10.32":{"node_abi":11,"v8":"3.14"},"0.10.33":{"node_abi":11,"v8":"3.14"},"0.10.34":{"node_abi":11,"v8":"3.14"},"0.10.35":{"node_abi":11,"v8":"3.14"},"0.10.36":{"node_abi":11,"v8":"3.14"},"0.10.37":{"node_abi":11,"v8":"3.14"},"0.10.38":{"node_abi":11,"v8":"3.14"},"0.10.39":{"node_abi":11,"v8":"3.14"},"0.10.40":{"node_abi":11,"v8":"3.14"},"0.10.41":{"node_abi":11,"v8":"3.14"},"0.10.42":{"node_abi":11,"v8":"3.14"},"0.10.43":{"node_abi":11,"v8":"3.14"},"0.10.44":{"node_abi":11,"v8":"3.14"},"0.10.45":{"node_abi":11,"v8":"3.14"},"0.10.46":{"node_abi":11,"v8":"3.14"},"0.10.47":{"node_abi":11,"v8":"3.14"},"0.10.48":{"node_abi":11,"v8":"3.14"},"0.11.0":{"node_abi":12,"v8":"3.17"},"0.11.1":{"node_abi":12,"v8":"3.18"},"0.11.2":{"node_abi":12,"v8":"3.19"},"0.11.3":{"node_abi":12,"v8":"3.19"},"0.11.4":{"node_abi":12,"v8":"3.20"},"0.11.5":{"node_abi":12,"v8":"3.20"},"0.11.6":{"node_abi":12,"v8":"3.20"},"0.11.7":{"node_abi":12,"v8":"3.20"},"0.11.8":{"node_abi":13,"v8":"3.21"},"0.11.9":{"node_abi":13,"v8":"3.22"},"0.11.10":{"node_abi":13,"v8":"3.22"},"0.11.11":{"node_abi":14,"v8":"3.22"},"0.11.12":{"node_abi":14,"v8":"3.22"},"0.11.13":{"node_abi":14,"v8":"3.25"},"0.11.14":{"node_abi":14,"v8":"3.26"},"0.11.15":{"node_abi":14,"v8":"3.28"},"0.11.16":{"node_abi":14,"v8":"3.28"},"0.12.0":{"node_abi":14,"v8":"3.28"},"0.12.1":{"node_abi":14,"v8":"3.28"},"0.12.2":{"node_abi":14,"v8":"3.28"},"0.12.3":{"node_abi":14,"v8":"3.28"},"0.12.4":{"node_abi":14,"v8":"3.28"},"0.12.5":{"node_abi":14,"v8":"3.28"},"0.12.6":{"node_abi":14,"v8":"3.28"},"0.12.7":{"node_abi":14,"v8":"3.28"},"0.12.8":{"node_abi":14,"v8":"3.28"},"0.12.9":{"node_abi":14,"v8":"3.28"},"0.12.10":{"node_abi":14,"v8":"3.28"},"0.12.11":{"node_abi":14,"v8":"3.28"},"0.12.12":{"node_abi":14,"v8":"3.28"},"0.12.13":{"node_abi":14,"v8":"3.28"},"0.12.14":{"node_abi":14,"v8":"3.28"},"0.12.15":{"node_abi":14,"v8":"3.28"},"0.12.16":{"node_abi":14,"v8":"3.28"},"0.12.17":{"node_abi":14,"v8":"3.28"},"0.12.18":{"node_abi":14,"v8":"3.28"},"1.0.0":{"node_abi":42,"v8":"3.31"},"1.0.1":{"node_abi":42,"v8":"3.31"},"1.0.2":{"node_abi":42,"v8":"3.31"},"1.0.3":{"node_abi":42,"v8":"4.1"},"1.0.4":{"node_abi":42,"v8":"4.1"},"1.1.0":{"node_abi":43,"v8":"4.1"},"1.2.0":{"node_abi":43,"v8":"4.1"},"1.3.0":{"node_abi":43,"v8":"4.1"},"1.4.1":{"node_abi":43,"v8":"4.1"},"1.4.2":{"node_abi":43,"v8":"4.1"},"1.4.3":{"node_abi":43,"v8":"4.1"},"1.5.0":{"node_abi":43,"v8":"4.1"},"1.5.1":{"node_abi":43,"v8":"4.1"},"1.6.0":{"node_abi":43,"v8":"4.1"},"1.6.1":{"node_abi":43,"v8":"4.1"},"1.6.2":{"node_abi":43,"v8":"4.1"},"1.6.3":{"node_abi":43,"v8":"4.1"},"1.6.4":{"node_abi":43,"v8":"4.1"},"1.7.1":{"node_abi":43,"v8":"4.1"},"1.8.1":{"node_abi":43,"v8":"4.1"},"1.8.2":{"node_abi":43,"v8":"4.1"},"1.8.3":{"node_abi":43,"v8":"4.1"},"1.8.4":{"node_abi":43,"v8":"4.1"},"2.0.0":{"node_abi":44,"v8":"4.2"},"2.0.1":{"node_abi":44,"v8":"4.2"},"2.0.2":{"node_abi":44,"v8":"4.2"},"2.1.0":{"node_abi":44,"v8":"4.2"},"2.2.0":{"node_abi":44,"v8":"4.2"},"2.2.1":{"node_abi":44,"v8":"4.2"},"2.3.0":{"node_abi":44,"v8":"4.2"},"2.3.1":{"node_abi":44,"v8":"4.2"},"2.3.2":{"node_abi":44,"v8":"4.2"},"2.3.3":{"node_abi":44,"v8":"4.2"},"2.3.4":{"node_abi":44,"v8":"4.2"},"2.4.0":{"node_abi":44,"v8":"4.2"},"2.5.0":{"node_abi":44,"v8":"4.2"},"3.0.0":{"node_abi":45,"v8":"4.4"},"3.1.0":{"node_abi":45,"v8":"4.4"},"3.2.0":{"node_abi":45,"v8":"4.4"},"3.3.0":{"node_abi":45,"v8":"4.4"},"3.3.1":{"node_abi":45,"v8":"4.4"},"4.0.0":{"node_abi":46,"v8":"4.5"},"4.1.0":{"node_abi":46,"v8":"4.5"},"4.1.1":{"node_abi":46,"v8":"4.5"},"4.1.2":{"node_abi":46,"v8":"4.5"},"4.2.0":{"node_abi":46,"v8":"4.5"},"4.2.1":{"node_abi":46,"v8":"4.5"},"4.2.2":{"node_abi":46,"v8":"4.5"},"4.2.3":{"node_abi":46,"v8":"4.5"},"4.2.4":{"node_abi":46,"v8":"4.5"},"4.2.5":{"node_abi":46,"v8":"4.5"},"4.2.6":{"node_abi":46,"v8":"4.5"},"4.3.0":{"node_abi":46,"v8":"4.5"},"4.3.1":{"node_abi":46,"v8":"4.5"},"4.3.2":{"node_abi":46,"v8":"4.5"},"4.4.0":{"node_abi":46,"v8":"4.5"},"4.4.1":{"node_abi":46,"v8":"4.5"},"4.4.2":{"node_abi":46,"v8":"4.5"},"4.4.3":{"node_abi":46,"v8":"4.5"},"4.4.4":{"node_abi":46,"v8":"4.5"},"4.4.5":{"node_abi":46,"v8":"4.5"},"4.4.6":{"node_abi":46,"v8":"4.5"},"4.4.7":{"node_abi":46,"v8":"4.5"},"4.5.0":{"node_abi":46,"v8":"4.5"},"4.6.0":{"node_abi":46,"v8":"4.5"},"4.6.1":{"node_abi":46,"v8":"4.5"},"4.6.2":{"node_abi":46,"v8":"4.5"},"4.7.0":{"node_abi":46,"v8":"4.5"},"4.7.1":{"node_abi":46,"v8":"4.5"},"4.7.2":{"node_abi":46,"v8":"4.5"},"4.7.3":{"node_abi":46,"v8":"4.5"},"4.8.0":{"node_abi":46,"v8":"4.5"},"4.8.1":{"node_abi":46,"v8":"4.5"},"4.8.2":{"node_abi":46,"v8":"4.5"},"4.8.3":{"node_abi":46,"v8":"4.5"},"4.8.4":{"node_abi":46,"v8":"4.5"},"4.8.5":{"node_abi":46,"v8":"4.5"},"4.8.6":{"node_abi":46,"v8":"4.5"},"4.8.7":{"node_abi":46,"v8":"4.5"},"4.9.0":{"node_abi":46,"v8":"4.5"},"4.9.1":{"node_abi":46,"v8":"4.5"},"5.0.0":{"node_abi":47,"v8":"4.6"},"5.1.0":{"node_abi":47,"v8":"4.6"},"5.1.1":{"node_abi":47,"v8":"4.6"},"5.2.0":{"node_abi":47,"v8":"4.6"},"5.3.0":{"node_abi":47,"v8":"4.6"},"5.4.0":{"node_abi":47,"v8":"4.6"},"5.4.1":{"node_abi":47,"v8":"4.6"},"5.5.0":{"node_abi":47,"v8":"4.6"},"5.6.0":{"node_abi":47,"v8":"4.6"},"5.7.0":{"node_abi":47,"v8":"4.6"},"5.7.1":{"node_abi":47,"v8":"4.6"},"5.8.0":{"node_abi":47,"v8":"4.6"},"5.9.0":{"node_abi":47,"v8":"4.6"},"5.9.1":{"node_abi":47,"v8":"4.6"},"5.10.0":{"node_abi":47,"v8":"4.6"},"5.10.1":{"node_abi":47,"v8":"4.6"},"5.11.0":{"node_abi":47,"v8":"4.6"},"5.11.1":{"node_abi":47,"v8":"4.6"},"5.12.0":{"node_abi":47,"v8":"4.6"},"6.0.0":{"node_abi":48,"v8":"5.0"},"6.1.0":{"node_abi":48,"v8":"5.0"},"6.2.0":{"node_abi":48,"v8":"5.0"},"6.2.1":{"node_abi":48,"v8":"5.0"},"6.2.2":{"node_abi":48,"v8":"5.0"},"6.3.0":{"node_abi":48,"v8":"5.0"},"6.3.1":{"node_abi":48,"v8":"5.0"},"6.4.0":{"node_abi":48,"v8":"5.0"},"6.5.0":{"node_abi":48,"v8":"5.1"},"6.6.0":{"node_abi":48,"v8":"5.1"},"6.7.0":{"node_abi":48,"v8":"5.1"},"6.8.0":{"node_abi":48,"v8":"5.1"},"6.8.1":{"node_abi":48,"v8":"5.1"},"6.9.0":{"node_abi":48,"v8":"5.1"},"6.9.1":{"node_abi":48,"v8":"5.1"},"6.9.2":{"node_abi":48,"v8":"5.1"},"6.9.3":{"node_abi":48,"v8":"5.1"},"6.9.4":{"node_abi":48,"v8":"5.1"},"6.9.5":{"node_abi":48,"v8":"5.1"},"6.10.0":{"node_abi":48,"v8":"5.1"},"6.10.1":{"node_abi":48,"v8":"5.1"},"6.10.2":{"node_abi":48,"v8":"5.1"},"6.10.3":{"node_abi":48,"v8":"5.1"},"6.11.0":{"node_abi":48,"v8":"5.1"},"6.11.1":{"node_abi":48,"v8":"5.1"},"6.11.2":{"node_abi":48,"v8":"5.1"},"6.11.3":{"node_abi":48,"v8":"5.1"},"6.11.4":{"node_abi":48,"v8":"5.1"},"6.11.5":{"node_abi":48,"v8":"5.1"},"6.12.0":{"node_abi":48,"v8":"5.1"},"6.12.1":{"node_abi":48,"v8":"5.1"},"6.12.2":{"node_abi":48,"v8":"5.1"},"6.12.3":{"node_abi":48,"v8":"5.1"},"6.13.0":{"node_abi":48,"v8":"5.1"},"6.13.1":{"node_abi":48,"v8":"5.1"},"6.14.0":{"node_abi":48,"v8":"5.1"},"6.14.1":{"node_abi":48,"v8":"5.1"},"6.14.2":{"node_abi":48,"v8":"5.1"},"6.14.3":{"node_abi":48,"v8":"5.1"},"6.14.4":{"node_abi":48,"v8":"5.1"},"6.15.0":{"node_abi":48,"v8":"5.1"},"6.15.1":{"node_abi":48,"v8":"5.1"},"6.16.0":{"node_abi":48,"v8":"5.1"},"6.17.0":{"node_abi":48,"v8":"5.1"},"6.17.1":{"node_abi":48,"v8":"5.1"},"7.0.0":{"node_abi":51,"v8":"5.4"},"7.1.0":{"node_abi":51,"v8":"5.4"},"7.2.0":{"node_abi":51,"v8":"5.4"},"7.2.1":{"node_abi":51,"v8":"5.4"},"7.3.0":{"node_abi":51,"v8":"5.4"},"7.4.0":{"node_abi":51,"v8":"5.4"},"7.5.0":{"node_abi":51,"v8":"5.4"},"7.6.0":{"node_abi":51,"v8":"5.5"},"7.7.0":{"node_abi":51,"v8":"5.5"},"7.7.1":{"node_abi":51,"v8":"5.5"},"7.7.2":{"node_abi":51,"v8":"5.5"},"7.7.3":{"node_abi":51,"v8":"5.5"},"7.7.4":{"node_abi":51,"v8":"5.5"},"7.8.0":{"node_abi":51,"v8":"5.5"},"7.9.0":{"node_abi":51,"v8":"5.5"},"7.10.0":{"node_abi":51,"v8":"5.5"},"7.10.1":{"node_abi":51,"v8":"5.5"},"8.0.0":{"node_abi":57,"v8":"5.8"},"8.1.0":{"node_abi":57,"v8":"5.8"},"8.1.1":{"node_abi":57,"v8":"5.8"},"8.1.2":{"node_abi":57,"v8":"5.8"},"8.1.3":{"node_abi":57,"v8":"5.8"},"8.1.4":{"node_abi":57,"v8":"5.8"},"8.2.0":{"node_abi":57,"v8":"5.8"},"8.2.1":{"node_abi":57,"v8":"5.8"},"8.3.0":{"node_abi":57,"v8":"6.0"},"8.4.0":{"node_abi":57,"v8":"6.0"},"8.5.0":{"node_abi":57,"v8":"6.0"},"8.6.0":{"node_abi":57,"v8":"6.0"},"8.7.0":{"node_abi":57,"v8":"6.1"},"8.8.0":{"node_abi":57,"v8":"6.1"},"8.8.1":{"node_abi":57,"v8":"6.1"},"8.9.0":{"node_abi":57,"v8":"6.1"},"8.9.1":{"node_abi":57,"v8":"6.1"},"8.9.2":{"node_abi":57,"v8":"6.1"},"8.9.3":{"node_abi":57,"v8":"6.1"},"8.9.4":{"node_abi":57,"v8":"6.1"},"8.10.0":{"node_abi":57,"v8":"6.2"},"8.11.0":{"node_abi":57,"v8":"6.2"},"8.11.1":{"node_abi":57,"v8":"6.2"},"8.11.2":{"node_abi":57,"v8":"6.2"},"8.11.3":{"node_abi":57,"v8":"6.2"},"8.11.4":{"node_abi":57,"v8":"6.2"},"8.12.0":{"node_abi":57,"v8":"6.2"},"8.13.0":{"node_abi":57,"v8":"6.2"},"8.14.0":{"node_abi":57,"v8":"6.2"},"8.14.1":{"node_abi":57,"v8":"6.2"},"8.15.0":{"node_abi":57,"v8":"6.2"},"8.15.1":{"node_abi":57,"v8":"6.2"},"8.16.0":{"node_abi":57,"v8":"6.2"},"8.16.1":{"node_abi":57,"v8":"6.2"},"8.16.2":{"node_abi":57,"v8":"6.2"},"8.17.0":{"node_abi":57,"v8":"6.2"},"9.0.0":{"node_abi":59,"v8":"6.2"},"9.1.0":{"node_abi":59,"v8":"6.2"},"9.2.0":{"node_abi":59,"v8":"6.2"},"9.2.1":{"node_abi":59,"v8":"6.2"},"9.3.0":{"node_abi":59,"v8":"6.2"},"9.4.0":{"node_abi":59,"v8":"6.2"},"9.5.0":{"node_abi":59,"v8":"6.2"},"9.6.0":{"node_abi":59,"v8":"6.2"},"9.6.1":{"node_abi":59,"v8":"6.2"},"9.7.0":{"node_abi":59,"v8":"6.2"},"9.7.1":{"node_abi":59,"v8":"6.2"},"9.8.0":{"node_abi":59,"v8":"6.2"},"9.9.0":{"node_abi":59,"v8":"6.2"},"9.10.0":{"node_abi":59,"v8":"6.2"},"9.10.1":{"node_abi":59,"v8":"6.2"},"9.11.0":{"node_abi":59,"v8":"6.2"},"9.11.1":{"node_abi":59,"v8":"6.2"},"9.11.2":{"node_abi":59,"v8":"6.2"},"10.0.0":{"node_abi":64,"v8":"6.6"},"10.1.0":{"node_abi":64,"v8":"6.6"},"10.2.0":{"node_abi":64,"v8":"6.6"},"10.2.1":{"node_abi":64,"v8":"6.6"},"10.3.0":{"node_abi":64,"v8":"6.6"},"10.4.0":{"node_abi":64,"v8":"6.7"},"10.4.1":{"node_abi":64,"v8":"6.7"},"10.5.0":{"node_abi":64,"v8":"6.7"},"10.6.0":{"node_abi":64,"v8":"6.7"},"10.7.0":{"node_abi":64,"v8":"6.7"},"10.8.0":{"node_abi":64,"v8":"6.7"},"10.9.0":{"node_abi":64,"v8":"6.8"},"10.10.0":{"node_abi":64,"v8":"6.8"},"10.11.0":{"node_abi":64,"v8":"6.8"},"10.12.0":{"node_abi":64,"v8":"6.8"},"10.13.0":{"node_abi":64,"v8":"6.8"},"10.14.0":{"node_abi":64,"v8":"6.8"},"10.14.1":{"node_abi":64,"v8":"6.8"},"10.14.2":{"node_abi":64,"v8":"6.8"},"10.15.0":{"node_abi":64,"v8":"6.8"},"10.15.1":{"node_abi":64,"v8":"6.8"},"10.15.2":{"node_abi":64,"v8":"6.8"},"10.15.3":{"node_abi":64,"v8":"6.8"},"10.16.0":{"node_abi":64,"v8":"6.8"},"10.16.1":{"node_abi":64,"v8":"6.8"},"10.16.2":{"node_abi":64,"v8":"6.8"},"10.16.3":{"node_abi":64,"v8":"6.8"},"10.17.0":{"node_abi":64,"v8":"6.8"},"10.18.0":{"node_abi":64,"v8":"6.8"},"10.18.1":{"node_abi":64,"v8":"6.8"},"10.19.0":{"node_abi":64,"v8":"6.8"},"10.20.0":{"node_abi":64,"v8":"6.8"},"10.20.1":{"node_abi":64,"v8":"6.8"},"10.21.0":{"node_abi":64,"v8":"6.8"},"10.22.0":{"node_abi":64,"v8":"6.8"},"10.22.1":{"node_abi":64,"v8":"6.8"},"10.23.0":{"node_abi":64,"v8":"6.8"},"10.23.1":{"node_abi":64,"v8":"6.8"},"10.23.2":{"node_abi":64,"v8":"6.8"},"10.23.3":{"node_abi":64,"v8":"6.8"},"10.24.0":{"node_abi":64,"v8":"6.8"},"10.24.1":{"node_abi":64,"v8":"6.8"},"11.0.0":{"node_abi":67,"v8":"7.0"},"11.1.0":{"node_abi":67,"v8":"7.0"},"11.2.0":{"node_abi":67,"v8":"7.0"},"11.3.0":{"node_abi":67,"v8":"7.0"},"11.4.0":{"node_abi":67,"v8":"7.0"},"11.5.0":{"node_abi":67,"v8":"7.0"},"11.6.0":{"node_abi":67,"v8":"7.0"},"11.7.0":{"node_abi":67,"v8":"7.0"},"11.8.0":{"node_abi":67,"v8":"7.0"},"11.9.0":{"node_abi":67,"v8":"7.0"},"11.10.0":{"node_abi":67,"v8":"7.0"},"11.10.1":{"node_abi":67,"v8":"7.0"},"11.11.0":{"node_abi":67,"v8":"7.0"},"11.12.0":{"node_abi":67,"v8":"7.0"},"11.13.0":{"node_abi":67,"v8":"7.0"},"11.14.0":{"node_abi":67,"v8":"7.0"},"11.15.0":{"node_abi":67,"v8":"7.0"},"12.0.0":{"node_abi":72,"v8":"7.4"},"12.1.0":{"node_abi":72,"v8":"7.4"},"12.2.0":{"node_abi":72,"v8":"7.4"},"12.3.0":{"node_abi":72,"v8":"7.4"},"12.3.1":{"node_abi":72,"v8":"7.4"},"12.4.0":{"node_abi":72,"v8":"7.4"},"12.5.0":{"node_abi":72,"v8":"7.5"},"12.6.0":{"node_abi":72,"v8":"7.5"},"12.7.0":{"node_abi":72,"v8":"7.5"},"12.8.0":{"node_abi":72,"v8":"7.5"},"12.8.1":{"node_abi":72,"v8":"7.5"},"12.9.0":{"node_abi":72,"v8":"7.6"},"12.9.1":{"node_abi":72,"v8":"7.6"},"12.10.0":{"node_abi":72,"v8":"7.6"},"12.11.0":{"node_abi":72,"v8":"7.7"},"12.11.1":{"node_abi":72,"v8":"7.7"},"12.12.0":{"node_abi":72,"v8":"7.7"},"12.13.0":{"node_abi":72,"v8":"7.7"},"12.13.1":{"node_abi":72,"v8":"7.7"},"12.14.0":{"node_abi":72,"v8":"7.7"},"12.14.1":{"node_abi":72,"v8":"7.7"},"12.15.0":{"node_abi":72,"v8":"7.7"},"12.16.0":{"node_abi":72,"v8":"7.8"},"12.16.1":{"node_abi":72,"v8":"7.8"},"12.16.2":{"node_abi":72,"v8":"7.8"},"12.16.3":{"node_abi":72,"v8":"7.8"},"12.17.0":{"node_abi":72,"v8":"7.8"},"12.18.0":{"node_abi":72,"v8":"7.8"},"12.18.1":{"node_abi":72,"v8":"7.8"},"12.18.2":{"node_abi":72,"v8":"7.8"},"12.18.3":{"node_abi":72,"v8":"7.8"},"12.18.4":{"node_abi":72,"v8":"7.8"},"12.19.0":{"node_abi":72,"v8":"7.8"},"12.19.1":{"node_abi":72,"v8":"7.8"},"12.20.0":{"node_abi":72,"v8":"7.8"},"12.20.1":{"node_abi":72,"v8":"7.8"},"12.20.2":{"node_abi":72,"v8":"7.8"},"12.21.0":{"node_abi":72,"v8":"7.8"},"12.22.0":{"node_abi":72,"v8":"7.8"},"12.22.1":{"node_abi":72,"v8":"7.8"},"13.0.0":{"node_abi":79,"v8":"7.8"},"13.0.1":{"node_abi":79,"v8":"7.8"},"13.1.0":{"node_abi":79,"v8":"7.8"},"13.2.0":{"node_abi":79,"v8":"7.9"},"13.3.0":{"node_abi":79,"v8":"7.9"},"13.4.0":{"node_abi":79,"v8":"7.9"},"13.5.0":{"node_abi":79,"v8":"7.9"},"13.6.0":{"node_abi":79,"v8":"7.9"},"13.7.0":{"node_abi":79,"v8":"7.9"},"13.8.0":{"node_abi":79,"v8":"7.9"},"13.9.0":{"node_abi":79,"v8":"7.9"},"13.10.0":{"node_abi":79,"v8":"7.9"},"13.10.1":{"node_abi":79,"v8":"7.9"},"13.11.0":{"node_abi":79,"v8":"7.9"},"13.12.0":{"node_abi":79,"v8":"7.9"},"13.13.0":{"node_abi":79,"v8":"7.9"},"13.14.0":{"node_abi":79,"v8":"7.9"},"14.0.0":{"node_abi":83,"v8":"8.1"},"14.1.0":{"node_abi":83,"v8":"8.1"},"14.2.0":{"node_abi":83,"v8":"8.1"},"14.3.0":{"node_abi":83,"v8":"8.1"},"14.4.0":{"node_abi":83,"v8":"8.1"},"14.5.0":{"node_abi":83,"v8":"8.3"},"14.6.0":{"node_abi":83,"v8":"8.4"},"14.7.0":{"node_abi":83,"v8":"8.4"},"14.8.0":{"node_abi":83,"v8":"8.4"},"14.9.0":{"node_abi":83,"v8":"8.4"},"14.10.0":{"node_abi":83,"v8":"8.4"},"14.10.1":{"node_abi":83,"v8":"8.4"},"14.11.0":{"node_abi":83,"v8":"8.4"},"14.12.0":{"node_abi":83,"v8":"8.4"},"14.13.0":{"node_abi":83,"v8":"8.4"},"14.13.1":{"node_abi":83,"v8":"8.4"},"14.14.0":{"node_abi":83,"v8":"8.4"},"14.15.0":{"node_abi":83,"v8":"8.4"},"14.15.1":{"node_abi":83,"v8":"8.4"},"14.15.2":{"node_abi":83,"v8":"8.4"},"14.15.3":{"node_abi":83,"v8":"8.4"},"14.15.4":{"node_abi":83,"v8":"8.4"},"14.15.5":{"node_abi":83,"v8":"8.4"},"14.16.0":{"node_abi":83,"v8":"8.4"},"14.16.1":{"node_abi":83,"v8":"8.4"},"15.0.0":{"node_abi":88,"v8":"8.6"},"15.0.1":{"node_abi":88,"v8":"8.6"},"15.1.0":{"node_abi":88,"v8":"8.6"},"15.2.0":{"node_abi":88,"v8":"8.6"},"15.2.1":{"node_abi":88,"v8":"8.6"},"15.3.0":{"node_abi":88,"v8":"8.6"},"15.4.0":{"node_abi":88,"v8":"8.6"},"15.5.0":{"node_abi":88,"v8":"8.6"},"15.5.1":{"node_abi":88,"v8":"8.6"},"15.6.0":{"node_abi":88,"v8":"8.6"},"15.7.0":{"node_abi":88,"v8":"8.6"},"15.8.0":{"node_abi":88,"v8":"8.6"},"15.9.0":{"node_abi":88,"v8":"8.6"},"15.10.0":{"node_abi":88,"v8":"8.6"},"15.11.0":{"node_abi":88,"v8":"8.6"},"15.12.0":{"node_abi":88,"v8":"8.6"},"15.13.0":{"node_abi":88,"v8":"8.6"},"15.14.0":{"node_abi":88,"v8":"8.6"},"16.0.0":{"node_abi":93,"v8":"9.0"}}')},7399:e=>{"use strict";e.exports=JSON.parse('{"name":"@mapbox/node-pre-gyp","description":"Node.js native addon binary install tool","version":"1.0.5","keywords":["native","addon","module","c","c++","bindings","binary"],"license":"BSD-3-Clause","author":"Dane Springmeyer ","repository":{"type":"git","url":"git://github.com/mapbox/node-pre-gyp.git"},"bin":"./bin/node-pre-gyp","main":"./lib/node-pre-gyp.js","dependencies":{"detect-libc":"^1.0.3","https-proxy-agent":"^5.0.0","make-dir":"^3.1.0","node-fetch":"^2.6.1","nopt":"^5.0.0","npmlog":"^4.1.2","rimraf":"^3.0.2","semver":"^7.3.4","tar":"^6.1.0"},"devDependencies":{"@mapbox/cloudfriend":"^4.6.0","@mapbox/eslint-config-mapbox":"^3.0.0","action-walk":"^2.2.0","aws-sdk":"^2.840.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-plugin-node":"^11.1.0","mock-aws-s3":"^4.0.1","nock":"^12.0.3","node-addon-api":"^3.1.0","nyc":"^15.1.0","tape":"^5.2.2","tar-fs":"^2.1.1"},"nyc":{"all":true,"skip-full":false,"exclude":["test/**"]},"scripts":{"coverage":"nyc --all --include index.js --include lib/ npm test","upload-coverage":"nyc report --reporter json && codecov --clear --flags=unit --file=./coverage/coverage-final.json","lint":"eslint bin/node-pre-gyp lib/*js lib/util/*js test/*js scripts/*js","fix":"npm run lint -- --fix","update-crosswalk":"node scripts/abi_crosswalk.js","test":"tape test/*test.js"}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var s=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);s=false}finally{if(s)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(6223);module.exports=__webpack_exports__})(); \ No newline at end of file +*/var t=Object.getOwnPropertySymbols;var r=Object.prototype.hasOwnProperty;var s=Object.prototype.propertyIsEnumerable;function toObject(e){if(e===null||e===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(e)}function shouldUseNative(){try{if(!Object.assign){return false}var e=new String("abc");e[5]="de";if(Object.getOwnPropertyNames(e)[0]==="5"){return false}var t={};for(var r=0;r<10;r++){t["_"+String.fromCharCode(r)]=r}var s=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if(s.join("")!=="0123456789"){return false}var a={};"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e}));if(Object.keys(Object.assign({},a)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(e){return false}}e.exports=shouldUseNative()?Object.assign:function(e,a){var o;var u=toObject(e);var c;for(var f=1;f{"use strict";e.exports=r(7250)},7798:(e,t,r)=>{"use strict";const s=r(1017);const a="\\\\/";const o=`[^${a}]`;const u="\\.";const c="\\+";const f="\\?";const d="\\/";const p="(?=.)";const h="[^/]";const v=`(?:${d}|$)`;const D=`(?:^|${d})`;const g=`${u}{1,2}${v}`;const y=`(?!${u})`;const m=`(?!${D}${g})`;const _=`(?!${u}{0,1}${v})`;const E=`(?!${g})`;const w=`[^.${d}]`;const x=`${h}*?`;const F={DOT_LITERAL:u,PLUS_LITERAL:c,QMARK_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:p,QMARK:h,END_ANCHOR:v,DOTS_SLASH:g,NO_DOT:y,NO_DOTS:m,NO_DOT_SLASH:_,NO_DOTS_SLASH:E,QMARK_NO_DOT:w,STAR:x,START_ANCHOR:D};const C={...F,SLASH_LITERAL:`[${a}]`,QMARK:o,STAR:`${o}*?`,DOTS_SLASH:`${u}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${u})`,NO_DOTS:`(?!(?:^|[${a}])${u}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${u}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${u}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`};const S={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:S,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?C:F}}},3632:(e,t,r)=>{"use strict";const s=r(7798);const a=r(5502);const{MAX_LENGTH:o,POSIX_REGEX_SOURCE:u,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:d}=s;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>a.escapeRegex(e))).join("..")}return r};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=d[e]||e;const r={...t};const p=typeof r.maxLength==="number"?Math.min(o,r.maxLength):o;let h=e.length;if(h>p){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${p}`)}const v={type:"bos",value:"",output:r.prepend||""};const D=[v];const g=r.capture?"":"?:";const y=a.isWindows(t);const m=s.globChars(y);const _=s.extglobChars(m);const{DOT_LITERAL:E,PLUS_LITERAL:w,SLASH_LITERAL:x,ONE_CHAR:F,DOTS_SLASH:C,NO_DOT:S,NO_DOT_SLASH:k,NO_DOTS_SLASH:A,QMARK:R,QMARK_NO_DOT:O,STAR:T,START_ANCHOR:j}=m;const globstar=e=>`(${g}(?:(?!${j}${e.dot?C:E}).)*?)`;const B=r.dot?"":S;const L=r.dot?R:O;let N=r.bash===true?globstar(r):T;if(r.capture){N=`(${N})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const I={input:e,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:D};e=a.removePrefix(e,I);h=e.length;const P=[];const W=[];const M=[];let $=v;let q;const eos=()=>I.index===h-1;const U=I.peek=(t=1)=>e[I.index+t];const G=I.advance=()=>e[++I.index]||"";const remaining=()=>e.slice(I.index+1);const consume=(e="",t=0)=>{I.consumed+=e;I.index+=t};const append=e=>{I.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while(U()==="!"&&(U(2)!=="("||U(3)==="?")){G();I.start++;e++}if(e%2===0){return false}I.negated=true;I.start++;return true};const increment=e=>{I[e]++;M.push(e)};const decrement=e=>{I[e]--;M.pop()};const push=e=>{if($.type==="globstar"){const t=I.braces>0&&(e.type==="comma"||e.type==="brace");const r=e.extglob===true||P.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!r){I.output=I.output.slice(0,-$.output.length);$.type="star";$.value="*";$.output=N;I.output+=$.output}}if(P.length&&e.type!=="paren"){P[P.length-1].inner+=e.value}if(e.value||e.output)append(e);if($&&$.type==="text"&&e.type==="text"){$.value+=e.value;$.output=($.output||"")+e.value;return}e.prev=$;D.push(e);$=e};const extglobOpen=(e,t)=>{const s={..._[t],conditions:1,inner:""};s.prev=$;s.parens=I.parens;s.output=I.output;const a=(r.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:I.output?"":F});push({type:"paren",extglob:true,value:G(),output:a});P.push(s)};const extglobClose=e=>{let s=e.close+(r.capture?")":"");let a;if(e.type==="negate"){let o=N;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){o=globstar(r)}if(o!==N||eos()||/^\)+$/.test(remaining())){s=e.close=`)$))${o}`}if(e.inner.includes("*")&&(a=remaining())&&/^\.[^\\/.]+$/.test(a)){const r=parse(a,{...t,fastpaths:false}).output;s=e.close=`)${r})${o})`}if(e.prev.type==="bos"){I.negatedExtglob=true}}push({type:"paren",extglob:true,value:q,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let o=e.replace(f,((e,t,r,a,o,u)=>{if(a==="\\"){s=true;return e}if(a==="?"){if(t){return t+a+(o?R.repeat(o.length):"")}if(u===0){return L+(o?R.repeat(o.length):"")}return R.repeat(r.length)}if(a==="."){return E.repeat(r.length)}if(a==="*"){if(t){return t+a+(o?N:"")}return N}return t?e:`\\${e}`}));if(s===true){if(r.unescape===true){o=o.replace(/\\/g,"")}else{o=o.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(o===e&&r.contains===true){I.output=e;return I}I.output=a.wrapOutput(o,I,t);return I}while(!eos()){q=G();if(q==="\0"){continue}if(q==="\\"){const e=U();if(e==="/"&&r.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){q+="\\";push({type:"text",value:q});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;I.index+=s;if(s%2!==0){q+="\\"}}if(r.unescape===true){q=G()}else{q+=G()}if(I.brackets===0){push({type:"text",value:q});continue}}if(I.brackets>0&&(q!=="]"||$.value==="["||$.value==="[^")){if(r.posix!==false&&q===":"){const e=$.value.slice(1);if(e.includes("[")){$.posix=true;if(e.includes(":")){const e=$.value.lastIndexOf("[");const t=$.value.slice(0,e);const r=$.value.slice(e+2);const s=u[r];if(s){$.value=t+s;I.backtrack=true;G();if(!v.output&&D.indexOf($)===1){v.output=F}continue}}}}if(q==="["&&U()!==":"||q==="-"&&U()==="]"){q=`\\${q}`}if(q==="]"&&($.value==="["||$.value==="[^")){q=`\\${q}`}if(r.posix===true&&q==="!"&&$.value==="["){q="^"}$.value+=q;append({value:q});continue}if(I.quotes===1&&q!=='"'){q=a.escapeRegex(q);$.value+=q;append({value:q});continue}if(q==='"'){I.quotes=I.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:q})}continue}if(q==="("){increment("parens");push({type:"paren",value:q});continue}if(q===")"){if(I.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=P[P.length-1];if(e&&I.parens===e.parens+1){extglobClose(P.pop());continue}push({type:"paren",value:q,output:I.parens?")":"\\)"});decrement("parens");continue}if(q==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}q=`\\${q}`}else{increment("brackets")}push({type:"bracket",value:q});continue}if(q==="]"){if(r.nobracket===true||$&&$.type==="bracket"&&$.value.length===1){push({type:"text",value:q,output:`\\${q}`});continue}if(I.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:q,output:`\\${q}`});continue}decrement("brackets");const e=$.value.slice(1);if($.posix!==true&&e[0]==="^"&&!e.includes("/")){q=`/${q}`}$.value+=q;append({value:q});if(r.literalBrackets===false||a.hasRegexChars(e)){continue}const t=a.escapeRegex($.value);I.output=I.output.slice(0,-$.value.length);if(r.literalBrackets===true){I.output+=t;$.value=t;continue}$.value=`(${g}${t}|${$.value})`;I.output+=$.value;continue}if(q==="{"&&r.nobrace!==true){increment("braces");const e={type:"brace",value:q,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};W.push(e);push(e);continue}if(q==="}"){const e=W[W.length-1];if(r.nobrace===true||!e){push({type:"text",value:q,output:q});continue}let t=")";if(e.dots===true){const e=D.slice();const s=[];for(let t=e.length-1;t>=0;t--){D.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,r);I.backtrack=true}if(e.comma!==true&&e.dots!==true){const r=I.output.slice(0,e.outputIndex);const s=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{";q=t="\\}";I.output=r;for(const e of s){I.output+=e.output||e.value}}push({type:"brace",value:q,output:t});decrement("braces");W.pop();continue}if(q==="|"){if(P.length>0){P[P.length-1].conditions++}push({type:"text",value:q});continue}if(q===","){let e=q;const t=W[W.length-1];if(t&&M[M.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:q,output:e});continue}if(q==="/"){if($.type==="dot"&&I.index===I.start+1){I.start=I.index+1;I.consumed="";I.output="";D.pop();$=v;continue}push({type:"slash",value:q,output:x});continue}if(q==="."){if(I.braces>0&&$.type==="dot"){if($.value===".")$.output=E;const e=W[W.length-1];$.type="dots";$.output+=q;$.value+=q;e.dots=true;continue}if(I.braces+I.parens===0&&$.type!=="bos"&&$.type!=="slash"){push({type:"text",value:q,output:E});continue}push({type:"dot",value:q,output:E});continue}if(q==="?"){const e=$&&$.value==="(";if(!e&&r.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("qmark",q);continue}if($&&$.type==="paren"){const e=U();let t=q;if(e==="<"&&!a.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if($.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${q}`}push({type:"text",value:q,output:t});continue}if(r.dot!==true&&($.type==="slash"||$.type==="bos")){push({type:"qmark",value:q,output:O});continue}push({type:"qmark",value:q,output:R});continue}if(q==="!"){if(r.noextglob!==true&&U()==="("){if(U(2)!=="?"||!/[!=<:]/.test(U(3))){extglobOpen("negate",q);continue}}if(r.nonegate!==true&&I.index===0){negate();continue}}if(q==="+"){if(r.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("plus",q);continue}if($&&$.value==="("||r.regex===false){push({type:"plus",value:q,output:w});continue}if($&&($.type==="bracket"||$.type==="paren"||$.type==="brace")||I.parens>0){push({type:"plus",value:q});continue}push({type:"plus",value:w});continue}if(q==="@"){if(r.noextglob!==true&&U()==="("&&U(2)!=="?"){push({type:"at",extglob:true,value:q,output:""});continue}push({type:"text",value:q});continue}if(q!=="*"){if(q==="$"||q==="^"){q=`\\${q}`}const e=c.exec(remaining());if(e){q+=e[0];I.index+=e[0].length}push({type:"text",value:q});continue}if($&&($.type==="globstar"||$.star===true)){$.type="star";$.star=true;$.value+=q;$.output=N;I.backtrack=true;I.globstar=true;consume(q);continue}let t=remaining();if(r.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",q);continue}if($.type==="star"){if(r.noglobstar===true){consume(q);continue}const s=$.prev;const a=s.prev;const o=s.type==="slash"||s.type==="bos";const u=a&&(a.type==="star"||a.type==="globstar");if(r.bash===true&&(!o||t[0]&&t[0]!=="/")){push({type:"star",value:q,output:""});continue}const c=I.braces>0&&(s.type==="comma"||s.type==="brace");const f=P.length&&(s.type==="pipe"||s.type==="paren");if(!o&&s.type!=="paren"&&!c&&!f){push({type:"star",value:q,output:""});continue}while(t.slice(0,3)==="/**"){const r=e[I.index+4];if(r&&r!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){$.type="globstar";$.value+=q;$.output=globstar(r);I.output=$.output;I.globstar=true;consume(q);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!u&&eos()){I.output=I.output.slice(0,-(s.output+$.output).length);s.output=`(?:${s.output}`;$.type="globstar";$.output=globstar(r)+(r.strictSlashes?")":"|$)");$.value+=q;I.globstar=true;I.output+=s.output+$.output;consume(q);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";I.output=I.output.slice(0,-(s.output+$.output).length);s.output=`(?:${s.output}`;$.type="globstar";$.output=`${globstar(r)}${x}|${x}${e})`;$.value+=q;I.output+=s.output+$.output;I.globstar=true;consume(q+G());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){$.type="globstar";$.value+=q;$.output=`(?:^|${x}|${globstar(r)}${x})`;I.output=$.output;I.globstar=true;consume(q+G());push({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-$.output.length);$.type="globstar";$.output=globstar(r);$.value+=q;I.output+=$.output;I.globstar=true;consume(q);continue}const s={type:"star",value:q,output:N};if(r.bash===true){s.output=".*?";if($.type==="bos"||$.type==="slash"){s.output=B+s.output}push(s);continue}if($&&($.type==="bracket"||$.type==="paren")&&r.regex===true){s.output=q;push(s);continue}if(I.index===I.start||$.type==="slash"||$.type==="dot"){if($.type==="dot"){I.output+=k;$.output+=k}else if(r.dot===true){I.output+=A;$.output+=A}else{I.output+=B;$.output+=B}if(U()!=="*"){I.output+=F;$.output+=F}}push(s)}while(I.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));I.output=a.escapeLast(I.output,"[");decrement("brackets")}while(I.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));I.output=a.escapeLast(I.output,"(");decrement("parens")}while(I.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));I.output=a.escapeLast(I.output,"{");decrement("braces")}if(r.strictSlashes!==true&&($.type==="star"||$.type==="bracket")){push({type:"maybe_slash",value:"",output:`${x}?`})}if(I.backtrack===true){I.output="";for(const e of I.tokens){I.output+=e.output!=null?e.output:e.value;if(e.suffix){I.output+=e.suffix}}}return I};parse.fastpaths=(e,t)=>{const r={...t};const u=typeof r.maxLength==="number"?Math.min(o,r.maxLength):o;const c=e.length;if(c>u){throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${u}`)}e=d[e]||e;const f=a.isWindows(t);const{DOT_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:v,DOTS_SLASH:D,NO_DOT:g,NO_DOTS:y,NO_DOTS_SLASH:m,STAR:_,START_ANCHOR:E}=s.globChars(f);const w=r.dot?y:g;const x=r.dot?m:g;const F=r.capture?"":"?:";const C={negated:false,prefix:""};let S=r.bash===true?".*?":_;if(r.capture){S=`(${S})`}const globstar=e=>{if(e.noglobstar===true)return S;return`(${F}(?:(?!${E}${e.dot?D:p}).)*?)`};const create=e=>{switch(e){case"*":return`${w}${v}${S}`;case".*":return`${p}${v}${S}`;case"*.*":return`${w}${S}${p}${v}${S}`;case"*/*":return`${w}${S}${h}${v}${x}${S}`;case"**":return w+globstar(r);case"**/*":return`(?:${w}${globstar(r)}${h})?${x}${v}${S}`;case"**/*.*":return`(?:${w}${globstar(r)}${h})?${x}${S}${p}${v}${S}`;case"**/.*":return`(?:${w}${globstar(r)}${h})?${p}${v}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=create(t[1]);if(!r)return;return r+p+t[2]}}};const k=a.removePrefix(e,C);let A=create(k);if(A&&r.strictSlashes!==true){A+=`${h}?`}return A};e.exports=parse},7250:(e,t,r)=>{"use strict";const s=r(1017);const a=r(2964);const o=r(3632);const u=r(5502);const c=r(7798);const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,r=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch(e,t,r)));const arrayMatcher=e=>{for(const t of s){const r=t(e);if(r)return r}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const a=t||{};const o=u.isWindows(t);const c=s?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const f=c.state;delete c.state;let isIgnored=()=>false;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(a.ignore,e,r)}const matcher=(r,s=false)=>{const{isMatch:u,match:d,output:p}=picomatch.test(r,c,t,{glob:e,posix:o});const h={glob:e,state:f,regex:c,posix:o,input:r,output:p,match:d,isMatch:u};if(typeof a.onResult==="function"){a.onResult(h)}if(u===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof a.onIgnore==="function"){a.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof a.onMatch==="function"){a.onMatch(h)}return s?h:true};if(r){matcher.state=f}return matcher};picomatch.test=(e,t,r,{glob:s,posix:a}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const o=r||{};const c=o.format||(a?u.toPosixSlashes:null);let f=e===s;let d=f&&c?c(e):e;if(f===false){d=c?c(e):e;f=d===s}if(f===false||o.capture===true){if(o.matchBase===true||o.basename===true){f=picomatch.matchBase(e,t,r,a)}else{f=t.exec(d)}}return{isMatch:Boolean(f),match:f,output:d}};picomatch.matchBase=(e,t,r,a=u.isWindows(r))=>{const o=t instanceof RegExp?t:picomatch.makeRe(t,r);return o.test(s.basename(e))};picomatch.isMatch=(e,t,r)=>picomatch(t,r)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return o(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>a(e,t);picomatch.compileRe=(e,t,r=false,s=false)=>{if(r===true){return e.output}const a=t||{};const o=a.contains?"":"^";const u=a.contains?"":"$";let c=`${o}(?:${e.output})${u}`;if(e&&e.negated===true){c=`^(?!${c}).*$`}const f=picomatch.toRegex(c,t);if(s===true){f.state=e}return f};picomatch.makeRe=(e,t={},r=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let a={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){a.output=o.fastpaths(e,t)}if(!a.output){a=o(e,t)}return picomatch.compileRe(a,t,r,s)};picomatch.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=c;e.exports=picomatch},2964:(e,t,r)=>{"use strict";const s=r(5502);const{CHAR_ASTERISK:a,CHAR_AT:o,CHAR_BACKWARD_SLASH:u,CHAR_COMMA:c,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:d,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:D,CHAR_PLUS:g,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:E}=r(7798);const isPathSeparator=e=>e===p||e===u;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan=(e,t)=>{const r=t||{};const w=e.length-1;const x=r.parts===true||r.scanToEnd===true;const F=[];const C=[];const S=[];let k=e;let A=-1;let R=0;let O=0;let T=false;let j=false;let B=false;let L=false;let N=false;let I=false;let P=false;let W=false;let M=false;let $=false;let q=0;let U;let G;let H={value:"",depth:0,isGlob:false};const eos=()=>A>=w;const peek=()=>k.charCodeAt(A+1);const advance=()=>{U=G;return k.charCodeAt(++A)};while(A0){z=k.slice(0,R);k=k.slice(R);O-=R}if(K&&B===true&&O>0){K=k.slice(0,O);V=k.slice(O)}else if(B===true){K="";V=k}else{K=k}if(K&&K!==""&&K!=="/"&&K!==k){if(isPathSeparator(K.charCodeAt(K.length-1))){K=K.slice(0,-1)}}if(r.unescape===true){if(V)V=s.removeBackslashes(V);if(K&&P===true){K=s.removeBackslashes(K)}}const Y={prefix:z,input:e,start:R,base:K,glob:V,isBrace:T,isBracket:j,isGlob:B,isExtglob:L,isGlobstar:N,negated:W,negatedExtglob:M};if(r.tokens===true){Y.maxDepth=0;if(!isPathSeparator(G)){C.push(H)}Y.tokens=C}if(r.parts===true||r.tokens===true){let t;for(let s=0;s{"use strict";const s=r(1017);const a=process.platform==="win32";const{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:f}=r(7798);t.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);t.hasRegexChars=e=>c.test(e);t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e);t.escapeRegex=e=>e.replace(f,"\\$1");t.toPosixSlashes=e=>e.replace(o,"/");t.removeBackslashes=e=>e.replace(u,(e=>e==="\\"?"":e));t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};t.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return a===true||s.sep==="\\"};t.escapeLast=(e,r,s)=>{const a=e.lastIndexOf(r,s);if(a===-1)return e;if(e[a-1]==="\\")return t.escapeLast(e,r,a-1);return`${e.slice(0,a)}\\${e.slice(a)}`};t.removePrefix=(e,t={})=>{let r=e;if(r.startsWith("./")){r=r.slice(2);t.prefix="./"}return r};t.wrapOutput=(e,t={},r={})=>{const s=r.contains?"":"^";const a=r.contains?"":"$";let o=`${s}(?:${e})${a}`;if(t.negated===true){o=`(?:^(?!${o}).*$)`}return o}},9182:e=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,s){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var a=arguments.length;var o,u;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function afterTickOne(){e.call(null,t)}));case 3:return process.nextTick((function afterTickTwo(){e.call(null,t,r)}));case 4:return process.nextTick((function afterTickThree(){e.call(null,t,r,s)}));default:o=new Array(a-1);u=0;while(u{"use strict";var s=r(9182);var a=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var o=Object.create(r(1504));o.inherits=r(2842);var u=r(7355);var c=r(3517);o.inherits(Duplex,u);{var f=a(c.prototype);for(var d=0;d{"use strict";e.exports=PassThrough;var s=r(2162);var a=Object.create(r(1504));a.inherits=r(2842);a.inherits(PassThrough,s);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);s.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},7355:(e,t,r)=>{"use strict";var s=r(9182);e.exports=Readable;var a=r(1551);var o;Readable.ReadableState=ReadableState;var u=r(2361).EventEmitter;var EElistenerCount=function(e,t){return e.listeners(t).length};var c=r(2641);var f=r(291).Buffer;var d=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return f.from(e)}function _isUint8Array(e){return f.isBuffer(e)||e instanceof d}var p=Object.create(r(1504));p.inherits=r(2842);var h=r(3837);var v=void 0;if(h&&h.debuglog){v=h.debuglog("stream")}else{v=function(){}}var D=r(4865);var g=r(2604);var y;p.inherits(Readable,c);var m=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(a(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t){o=o||r(4928);e=e||{};var s=t instanceof o;this.objectMode=!!e.objectMode;if(s)this.objectMode=this.objectMode||!!e.readableObjectMode;var a=e.highWaterMark;var u=e.readableHighWaterMark;var c=this.objectMode?16:16*1024;if(a||a===0)this.highWaterMark=a;else if(s&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=c;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new D;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!y)y=r(4426).s;this.decoder=new y(e.encoding);this.encoding=e.encoding}}function Readable(e){o=o||r(4928);if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}c.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=g.destroy;Readable.prototype._undestroy=g.undestroy;Readable.prototype._destroy=function(e,t){this.push(null);t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var s;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=f.from(e,t);t=""}s=true}}else{s=true}return readableAddChunk(this,e,t,false,s)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,s,a){var o=e._readableState;if(t===null){o.reading=false;onEofChunk(e,o)}else{var u;if(!a)u=chunkInvalid(o,t);if(u){e.emit("error",u)}else if(o.objectMode||t&&t.length>0){if(typeof t!=="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==f.prototype){t=_uint8ArrayToBuffer(t)}if(s){if(o.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,o,t,true)}else if(o.ended){e.emit("error",new Error("stream.push() after EOF"))}else{o.reading=false;if(o.decoder&&!r){t=o.decoder.write(t);if(o.objectMode||t.length!==0)addChunk(e,o,t,false);else maybeReadMore(e,o)}else{addChunk(e,o,t,false)}}}else if(!s){o.reading=false}}return needMoreData(o)}function addChunk(e,t,r,s){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(s)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=_){e=_}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){v("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){v("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var s=t.needReadable;v("need readable",s);if(t.length===0||t.length-e0)a=fromList(e,t);else a=null;if(a===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(a!==null)this.emit("data",a);return a};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){v("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)s.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){v("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;s.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(a.pipes,e)!==-1)&&!f){v("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;d=true}r.pause()}}function onerror(t){v("onerror",t);unpipe();e.removeListener("error",onerror);if(EElistenerCount(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){v("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){v("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!a.flowing){v("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;v("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&EElistenerCount(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var s=t.pipes;var a=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var o=0;o=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var s;if(eo.length?o.length:e;if(u===o.length)a+=o;else a+=o.slice(0,e);e-=u;if(e===0){if(u===o.length){++s;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=o.slice(u)}break}++s}t.length-=s;return a}function copyFromBuffer(e,t){var r=f.allocUnsafe(e);var s=t.head;var a=1;s.data.copy(r);e-=s.data.length;while(s=s.next){var o=s.data;var u=e>o.length?o.length:e;o.copy(r,r.length-e,0,u);e-=u;if(e===0){if(u===o.length){++a;if(s.next)t.head=s.next;else t.head=t.tail=null}else{t.head=s;s.data=o.slice(u)}break}++a}t.length-=a;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;s.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,s=e.length;r{"use strict";e.exports=Transform;var s=r(4928);var a=Object.create(r(1504));a.inherits=r(2842);a.inherits(Transform,s);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var s=r.writecb;if(!s){return this.emit("error",new Error("write callback called multiple times"))}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);s(e);var a=this._readableState;a.reading=false;if(a.needReadable||a.length{"use strict";var s=r(9182);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:s.nextTick;var o;Writable.WritableState=WritableState;var u=Object.create(r(1504));u.inherits=r(2842);var c={deprecate:r(6124)};var f=r(2641);var d=r(291).Buffer;var p=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return d.from(e)}function _isUint8Array(e){return d.isBuffer(e)||e instanceof p}var h=r(2604);u.inherits(Writable,f);function nop(){}function WritableState(e,t){o=o||r(4928);e=e||{};var s=t instanceof o;this.objectMode=!!e.objectMode;if(s)this.objectMode=this.objectMode||!!e.writableObjectMode;var a=e.highWaterMark;var u=e.writableHighWaterMark;var c=this.objectMode?16:16*1024;if(a||a===0)this.highWaterMark=a;else if(s&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=c;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var f=e.decodeStrings===false;this.decodeStrings=!f;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var v;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){v=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(v.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{v=function(e){return e instanceof this}}function Writable(e){o=o||r(4928);if(!v.call(Writable,this)&&!(this instanceof o)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}f.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);s.nextTick(t,r)}function validChunk(e,t,r,a){var o=true;var u=false;if(r===null){u=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){e.emit("error",u);s.nextTick(a,u);o=false}return o}Writable.prototype.write=function(e,t,r){var s=this._writableState;var a=false;var o=!s.objectMode&&_isUint8Array(e);if(o&&!d.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(o)t="buffer";else if(!t)t=s.defaultEncoding;if(typeof r!=="function")r=nop;if(s.ended)writeAfterEnd(this,r);else if(o||validChunk(this,s,e,r)){s.pendingcb++;a=writeOrBuffer(this,s,o,e,t,r)}return a};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=d.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,s,a,o){if(!r){var u=decodeChunk(t,s,a);if(s!==u){r=true;a="buffer";s=u}}var c=t.objectMode?1:s.length;t.length+=c;var f=t.length{"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var s=r(291).Buffer;var a=r(3837);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return s.alloc(0);if(this.length===1)return this.head.data;var t=s.allocUnsafe(e>>>0);var r=this.head;var a=0;while(r){copyBuffer(r.data,t,a);a+=r.data.length;r=r.next}return t};return BufferList}();if(a&&a.inspect&&a.inspect.custom){e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e}}},2604:(e,t,r)=>{"use strict";var s=r(9182);function destroy(e,t){var r=this;var a=this._readableState&&this._readableState.destroyed;var o=this._writableState&&this._writableState.destroyed;if(a||o){if(t){t(e)}else if(e&&(!this._writableState||!this._writableState.errorEmitted)){s.nextTick(emitErrorNT,this,e)}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){s.nextTick(emitErrorNT,r,e);if(r._writableState){r._writableState.errorEmitted=true}}else if(t){t(e)}}));return this}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.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy}},2641:(e,t,r)=>{e.exports=r(2781)},8511:(e,t,r)=>{var s=r(2781);if(process.env.READABLE_STREAM==="disable"&&s){e.exports=s;t=e.exports=s.Readable;t.Readable=s.Readable;t.Writable=s.Writable;t.Duplex=s.Duplex;t.Transform=s.Transform;t.PassThrough=s.PassThrough;t.Stream=s}else{t=e.exports=r(7355);t.Stream=s||t;t.Readable=t;t.Writable=r(3517);t.Duplex=r(4928);t.Transform=r(2162);t.PassThrough=r(9924)}},2382:(e,t,r)=>{"use strict";const s=r(1017);const a=r(8188);const o=r(7147);const resolveFrom=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=o.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=s.resolve(e)}else if(r){return}else{throw t}}const u=s.join(e,"noop.js");const resolveFileName=()=>a._resolveFilename(t,{id:u,filename:u,paths:a._nodeModulePaths(e)});if(r){try{return resolveFileName()}catch(e){return}}return resolveFileName()};e.exports=(e,t)=>resolveFrom(e,t);e.exports.silent=(e,t)=>resolveFrom(e,t,true)},4700:(e,t,r)=>{const s=r(9491);const a=r(1017);const o=r(7147);let u=undefined;try{u=r(3535)}catch(e){}const c={nosort:true,silent:true};let f=0;const d=process.platform==="win32";const defaults=e=>{const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((t=>{e[t]=e[t]||o[t];t=t+"Sync";e[t]=e[t]||o[t]}));e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}if(e.disableGlob!==true&&u===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}e.disableGlob=e.disableGlob||false;e.glob=e.glob||c};const rimraf=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}s(e,"rimraf: missing path");s.equal(typeof e,"string","rimraf: path should be a string");s.equal(typeof r,"function","rimraf: callback function required");s(t,"rimraf: invalid options argument provided");s.equal(typeof t,"object","rimraf: options should be object");defaults(t);let a=0;let o=null;let c=0;const next=e=>{o=o||e;if(--c===0)r(o)};const afterGlob=(e,s)=>{if(e)return r(e);c=s.length;if(c===0)return r();s.forEach((e=>{const CB=r=>{if(r){if((r.code==="EBUSY"||r.code==="ENOTEMPTY"||r.code==="EPERM")&&arimraf_(e,t,CB)),a*100)}if(r.code==="EMFILE"&&frimraf_(e,t,CB)),f++)}if(r.code==="ENOENT")r=null}f=0;next(r)};rimraf_(e,t,CB)}))};if(t.disableGlob||!u.hasMagic(e))return afterGlob(null,[e]);t.lstat(e,((r,s)=>{if(!r)return afterGlob(null,[e]);u(e,t.glob,afterGlob)}))};const rimraf_=(e,t,r)=>{s(e);s(t);s(typeof r==="function");t.lstat(e,((s,a)=>{if(s&&s.code==="ENOENT")return r(null);if(s&&s.code==="EPERM"&&d)fixWinEPERM(e,t,s,r);if(a&&a.isDirectory())return rmdir(e,t,s,r);t.unlink(e,(s=>{if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return d?fixWinEPERM(e,t,s,r):rmdir(e,t,s,r);if(s.code==="EISDIR")return rmdir(e,t,s,r)}return r(s)}))}))};const fixWinEPERM=(e,t,r,a)=>{s(e);s(t);s(typeof a==="function");t.chmod(e,438,(s=>{if(s)a(s.code==="ENOENT"?null:r);else t.stat(e,((s,o)=>{if(s)a(s.code==="ENOENT"?null:r);else if(o.isDirectory())rmdir(e,t,r,a);else t.unlink(e,a)}))}))};const fixWinEPERMSync=(e,t,r)=>{s(e);s(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT")return;else throw r}let a;try{a=t.statSync(e)}catch(e){if(e.code==="ENOENT")return;else throw r}if(a.isDirectory())rmdirSync(e,t,r);else t.unlinkSync(e)};const rmdir=(e,t,r,a)=>{s(e);s(t);s(typeof a==="function");t.rmdir(e,(s=>{if(s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM"))rmkids(e,t,a);else if(s&&s.code==="ENOTDIR")a(r);else a(s)}))};const rmkids=(e,t,r)=>{s(e);s(t);s(typeof r==="function");t.readdir(e,((s,o)=>{if(s)return r(s);let u=o.length;if(u===0)return t.rmdir(e,r);let c;o.forEach((s=>{rimraf(a.join(e,s),t,(s=>{if(c)return;if(s)return r(c=s);if(--u===0)t.rmdir(e,r)}))}))}))};const rimrafSync=(e,t)=>{t=t||{};defaults(t);s(e,"rimraf: missing path");s.equal(typeof e,"string","rimraf: path should be a string");s(t,"rimraf: missing options");s.equal(typeof t,"object","rimraf: options should be object");let r;if(t.disableGlob||!u.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(s){r=u.sync(e,t.glob)}}if(!r.length)return;for(let e=0;e{s(e);s(t);try{t.rmdirSync(e)}catch(s){if(s.code==="ENOENT")return;if(s.code==="ENOTDIR")throw r;if(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")rmkidsSync(e,t)}};const rmkidsSync=(e,t)=>{s(e);s(t);t.readdirSync(e).forEach((r=>rimrafSync(a.join(e,r),t)));const r=d?100:1;let o=0;do{let s=true;try{const a=t.rmdirSync(e,t);s=false;return a}finally{if(++o{var s=r(4300);var a=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return a(e,t,r)}copyProps(a,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return a(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=a(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return a(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},2656:e=>{e.exports=function(e){[process.stdout,process.stderr].forEach((function(t){if(t._handle&&t.isTTY&&typeof t._handle.setBlocking==="function"){t._handle.setBlocking(e)}}))}},7234:(e,t,r)=>{var s=global.process;const processOk=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!processOk(s)){e.exports=function(){return function(){}}}else{var a=r(9491);var o=r(6462);var u=/^win/i.test(s.platform);var c=r(2361);if(typeof c!=="function"){c=c.EventEmitter}var f;if(s.__signal_exit_emitter__){f=s.__signal_exit_emitter__}else{f=s.__signal_exit_emitter__=new c;f.count=0;f.emitted={}}if(!f.infinite){f.setMaxListeners(Infinity);f.infinite=true}e.exports=function(e,t){if(!processOk(global.process)){return function(){}}a.equal(typeof e,"function","a callback must be provided for exit handler");if(v===false){D()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var remove=function(){f.removeListener(r,e);if(f.listeners("exit").length===0&&f.listeners("afterexit").length===0){d()}};f.on(r,e);return remove};var d=function unload(){if(!v||!processOk(global.process)){return}v=false;o.forEach((function(e){try{s.removeListener(e,h[e])}catch(e){}}));s.emit=m;s.reallyExit=g;f.count-=1};e.exports.unload=d;var p=function emit(e,t,r){if(f.emitted[e]){return}f.emitted[e]=true;f.emit(e,t,r)};var h={};o.forEach((function(e){h[e]=function listener(){if(!processOk(global.process)){return}var t=s.listeners(e);if(t.length===f.count){d();p("exit",null,e);p("afterexit",null,e);if(u&&e==="SIGHUP"){e="SIGINT"}s.kill(s.pid,e)}}}));e.exports.signals=function(){return o};var v=false;var D=function load(){if(v||!processOk(global.process)){return}v=true;f.count+=1;o=o.filter((function(e){try{s.on(e,h[e]);return true}catch(e){return false}}));s.emit=_;s.reallyExit=y};e.exports.load=D;var g=s.reallyExit;var y=function processReallyExit(e){if(!processOk(global.process)){return}s.exitCode=e||0;p("exit",s.exitCode,null);p("afterexit",s.exitCode,null);g.call(s,s.exitCode)};var m=s.emit;var _=function processEmit(e,t){if(e==="exit"&&processOk(global.process)){if(t!==undefined){s.exitCode=t}var r=m.apply(this,arguments);p("exit",s.exitCode,null);p("afterexit",s.exitCode,null);return r}else{return m.apply(this,arguments)}}}},6462:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},8321:(e,t,r)=>{"use strict";var s=r(7518);var a=r(8589);var o=r(3279);e.exports=function(e){if(typeof e!=="string"||e.length===0){return 0}var t=0;e=s(e);for(var r=0;r=127&&u<=159){continue}if(u>=65536){r++}if(o(u)){t+=2}else{t++}}return t}},5663:(e,t,r)=>{"use strict";const s=r(7518);const a=r(8502);const o=r(3876);const stringWidth=e=>{if(typeof e!=="string"||e.length===0){return 0}e=s(e);if(e.length===0){return 0}e=e.replace(o()," ");let t=0;for(let r=0;r=127&&s<=159){continue}if(s>=768&&s<=879){continue}if(s>65535){r++}t+=a(s)?2:1}return t};e.exports=stringWidth;e.exports["default"]=stringWidth},4426:(e,t,r)=>{"use strict";var s=r(291).Buffer;var a=s.isEncoding||function(e){e=""+e;switch(e&&e.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(e){if(!e)return"utf8";var t;while(true){switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(s.isEncoding===a||!a(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=s.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var s=t.length-1;if(s=0){if(a>0)e.lastNeed=a-1;return a}if(--s=0){if(a>0)e.lastNeed=a-2;return a}if(--s=0){if(a>0){if(a===2)a=0;else e.lastNeed=a-3}return a}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var s=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,s);return e.toString("utf8",t,s)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},6124:(e,t,r)=>{e.exports=r(3837).deprecate},1365:(e,t,r)=>{"use strict";var s=r(5663);t.center=alignCenter;t.left=alignLeft;t.right=alignRight;function createPadding(e){var t="";var r=" ";var s=e;do{if(s%2){t+=r}s=Math.floor(s/2);r+=r}while(s);return t}function alignLeft(e,t){var r=e.trimRight();if(r.length===0&&e.length>=t)return e;var a="";var o=s(r);if(o=t)return e;var a="";var o=s(r);if(o=t)return e;var a="";var o="";var u=s(r);if(u{module.exports=eval("require")("aws-sdk")},3930:module=>{module.exports=eval("require")("mock-aws-s3")},4997:module=>{module.exports=eval("require")("nock")},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},8188:e=>{"use strict";e.exports=require("module")},1988:e=>{"use strict";e.exports=require("next/dist/compiled/acorn")},5749:e=>{"use strict";e.exports=require("next/dist/compiled/async-sema")},3535:e=>{"use strict";e.exports=require("next/dist/compiled/glob")},2540:e=>{"use strict";e.exports=require("next/dist/compiled/micromatch")},7849:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},7518:e=>{"use strict";e.exports=require("next/dist/compiled/strip-ansi")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},8102:e=>{"use strict";e.exports=require("repl")},2781:e=>{"use strict";e.exports=require("stream")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(1017);var a=r(3846);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var o=_interopDefaultLegacy(a);const u=function addExtension(e,t=".js"){let r=`${e}`;if(!s.extname(e))r+=t;return r};class WalkerBase{constructor(){WalkerBase.prototype.__init.call(this);WalkerBase.prototype.__init2.call(this);WalkerBase.prototype.__init3.call(this);WalkerBase.prototype.__init4.call(this)}__init(){this.should_skip=false}__init2(){this.should_remove=false}__init3(){this.replacement=null}__init4(){this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:e=>this.replacement=e}}replace(e,t,r,s){if(e){if(r!==null){e[t][r]=s}else{e[t]=s}}}remove(e,t,r){if(e){if(r!==null){e[t].splice(r,1)}else{delete e[t]}}}}class SyncWalkerClass extends WalkerBase{constructor(e){super();this.enter=e.enter;this.leave=e.leave}visit(e,t,r,s,a,o){if(e){if(r){const s=this.should_skip;const u=this.should_remove;const c=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;r.call(this.context,e,t,a,o);if(this.replacement){e=this.replacement;this.replace(t,a,o,e)}if(this.should_remove){this.remove(t,a,o)}const f=this.should_skip;const d=this.should_remove;this.should_skip=s;this.should_remove=u;this.replacement=c;if(f)return e;if(d)return null}for(const t in e){const a=e[t];if(typeof a!=="object"){continue}else if(Array.isArray(a)){for(let o=0;o{f(e).forEach((e=>{this.declarations[e]=true}))}))}}addDeclaration(e,t,r){if(!t&&this.isBlockScope){this.parent.addDeclaration(e,t,r)}else if(e.id){f(e.id).forEach((e=>{this.declarations[e]=true}))}}contains(e){return this.declarations[e]||(this.parent?this.parent.contains(e):false)}}const p=function attachScopes(e,t="scope"){let r=new Scope;walk(e,{enter(e,s){const a=e;if(/(Function|Class)Declaration/.test(a.type)){r.addDeclaration(a,false,false)}if(a.type==="VariableDeclaration"){const{kind:e}=a;const t=d[e];a.declarations.forEach((e=>{r.addDeclaration(e,t,true)}))}let o;if(/Function/.test(a.type)){const e=a;o=new Scope({parent:r,block:false,params:e.params});if(e.type==="FunctionExpression"&&e.id){o.addDeclaration(e,false,false)}}if(/For(In|Of)?Statement/.test(a.type)){o=new Scope({parent:r,block:true})}if(a.type==="BlockStatement"&&!/Function/.test(s.type)){o=new Scope({parent:r,block:true})}if(a.type==="CatchClause"){o=new Scope({parent:r,params:a.param?[a.param]:[],block:true})}if(o){Object.defineProperty(a,t,{value:o,configurable:true});r=o}},leave(e){const s=e;if(s[t])r=r.parent}});return r};function isArray(e){return Array.isArray(e)}function ensureArray(e){if(isArray(e))return e;if(e==null)return[];return[e]}const h=function normalizePath(e){return e.split(s.win32.sep).join(s.posix.sep)};function getMatcherString(e,t){if(t===false||s.isAbsolute(e)||e.startsWith("*")){return h(e)}const r=h(s.resolve(t||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return s.posix.join(r,h(e))}const v=function createFilter(e,t,r){const s=r&&r.resolve;const getMatcher=e=>e instanceof RegExp?e:{test:t=>{const r=getMatcherString(e,s);const a=o["default"](r,{dot:true});const u=a(t);return u}};const a=ensureArray(e).map(getMatcher);const u=ensureArray(t).map(getMatcher);return function result(e){if(typeof e!=="string")return false;if(/\0/.test(e))return false;const t=h(e);for(let e=0;et.toUpperCase())).replace(/[^$_a-zA-Z0-9]/g,"_");if(/\d/.test(t[0])||y.has(t)){t=`_${t}`}return t||"_"};function stringify(e){return(JSON.stringify(e)||"undefined").replace(/[\u2028\u2029]/g,(e=>`\\u${`000${e.charCodeAt(0).toString(16)}`.slice(-4)}`))}function serializeArray(e,t,r){let s="[";const a=t?`\n${r}${t}`:"";for(let o=0;o0?",":""}${a}${serialize(u,t,r+t)}`}return`${s}${t?`\n${r}`:""}]`}function serializeObject(e,t,r){let s="{";const a=t?`\n${r}${t}`:"";const o=Object.entries(e);for(let e=0;e0?",":""}${a}${f}:${t?" ":""}${serialize(c,t,r+t)}`}return`${s}${t?`\n${r}`:""}}`}function serialize(e,t,r){if(typeof e==="object"&&e!==null){if(Array.isArray(e))return serializeArray(e,t,r);if(e instanceof Date)return`new Date(${e.getTime()})`;if(e instanceof RegExp)return e.toString();return serializeObject(e,t,r)}if(typeof e==="number"){if(e===Infinity)return"Infinity";if(e===-Infinity)return"-Infinity";if(e===0)return 1/e===Infinity?"0":"-0";if(e!==e)return"NaN"}if(typeof e==="symbol"){const t=Symbol.keyFor(e);if(t!==undefined)return`Symbol.for(${stringify(t)})`}if(typeof e==="bigint")return`${e}n`;return stringify(e)}const _=function dataToEsm(e,t={}){const r=t.compact?"":"indent"in t?t.indent:"\t";const s=t.compact?"":" ";const a=t.compact?"":"\n";const o=t.preferConst?"const":"var";if(t.namedExports===false||typeof e!=="object"||Array.isArray(e)||e instanceof Date||e instanceof RegExp||e===null){const a=serialize(e,t.compact?null:r,"");const o=s||(/^[{[\-\/]/.test(a)?"":" ");return`export default${o}${a};`}let u="";const c=[];for(const[f,d]of Object.entries(e)){if(f===m(f)){if(t.objectShorthand)c.push(f);else c.push(`${f}:${s}${f}`);u+=`export ${o} ${f}${s}=${s}${serialize(d,t.compact?null:r,"")};${a}`}else{c.push(`${stringify(f)}:${s}${serialize(d,t.compact?null:r,"")}`)}}return`${u}export default${s}{${a}${r}${c.join(`,${a}${r}`)}${a}};${a}`};var E={addExtension:u,attachScopes:p,createFilter:v,dataToEsm:_,extractAssignedNames:f,makeLegalIdentifier:m,normalizePath:h};t.addExtension=u;t.attachScopes=p;t.createFilter=v;t.dataToEsm=_;t["default"]=E;t.extractAssignedNames=f;t.makeLegalIdentifier=m;t.normalizePath=h},3982:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";class WalkerBase{constructor(){this.should_skip=false;this.should_remove=false;this.replacement=null;this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:e=>this.replacement=e}}replace(e,t,r,s){if(e){if(r!==null){e[t][r]=s}else{e[t]=s}}}remove(e,t,r){if(e){if(r!==null){e[t].splice(r,1)}else{delete e[t]}}}}class SyncWalker extends WalkerBase{constructor(e,t){super();this.enter=e;this.leave=t}visit(e,t,r,s){if(e){if(this.enter){const a=this.should_skip;const o=this.should_remove;const u=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;this.enter.call(this.context,e,t,r,s);if(this.replacement){e=this.replacement;this.replace(t,r,s,e)}if(this.should_remove){this.remove(t,r,s)}const c=this.should_skip;const f=this.should_remove;this.should_skip=a;this.should_remove=o;this.replacement=u;if(c)return e;if(f)return null}for(const t in e){const r=e[t];if(typeof r!=="object"){continue}else if(Array.isArray(r)){for(let s=0;s{"use strict";e.exports=JSON.parse('{"0.1.14":{"node_abi":null,"v8":"1.3"},"0.1.15":{"node_abi":null,"v8":"1.3"},"0.1.16":{"node_abi":null,"v8":"1.3"},"0.1.17":{"node_abi":null,"v8":"1.3"},"0.1.18":{"node_abi":null,"v8":"1.3"},"0.1.19":{"node_abi":null,"v8":"2.0"},"0.1.20":{"node_abi":null,"v8":"2.0"},"0.1.21":{"node_abi":null,"v8":"2.0"},"0.1.22":{"node_abi":null,"v8":"2.0"},"0.1.23":{"node_abi":null,"v8":"2.0"},"0.1.24":{"node_abi":null,"v8":"2.0"},"0.1.25":{"node_abi":null,"v8":"2.0"},"0.1.26":{"node_abi":null,"v8":"2.0"},"0.1.27":{"node_abi":null,"v8":"2.1"},"0.1.28":{"node_abi":null,"v8":"2.1"},"0.1.29":{"node_abi":null,"v8":"2.1"},"0.1.30":{"node_abi":null,"v8":"2.1"},"0.1.31":{"node_abi":null,"v8":"2.1"},"0.1.32":{"node_abi":null,"v8":"2.1"},"0.1.33":{"node_abi":null,"v8":"2.1"},"0.1.90":{"node_abi":null,"v8":"2.2"},"0.1.91":{"node_abi":null,"v8":"2.2"},"0.1.92":{"node_abi":null,"v8":"2.2"},"0.1.93":{"node_abi":null,"v8":"2.2"},"0.1.94":{"node_abi":null,"v8":"2.2"},"0.1.95":{"node_abi":null,"v8":"2.2"},"0.1.96":{"node_abi":null,"v8":"2.2"},"0.1.97":{"node_abi":null,"v8":"2.2"},"0.1.98":{"node_abi":null,"v8":"2.2"},"0.1.99":{"node_abi":null,"v8":"2.2"},"0.1.100":{"node_abi":null,"v8":"2.2"},"0.1.101":{"node_abi":null,"v8":"2.3"},"0.1.102":{"node_abi":null,"v8":"2.3"},"0.1.103":{"node_abi":null,"v8":"2.3"},"0.1.104":{"node_abi":null,"v8":"2.3"},"0.2.0":{"node_abi":1,"v8":"2.3"},"0.2.1":{"node_abi":1,"v8":"2.3"},"0.2.2":{"node_abi":1,"v8":"2.3"},"0.2.3":{"node_abi":1,"v8":"2.3"},"0.2.4":{"node_abi":1,"v8":"2.3"},"0.2.5":{"node_abi":1,"v8":"2.3"},"0.2.6":{"node_abi":1,"v8":"2.3"},"0.3.0":{"node_abi":1,"v8":"2.5"},"0.3.1":{"node_abi":1,"v8":"2.5"},"0.3.2":{"node_abi":1,"v8":"3.0"},"0.3.3":{"node_abi":1,"v8":"3.0"},"0.3.4":{"node_abi":1,"v8":"3.0"},"0.3.5":{"node_abi":1,"v8":"3.0"},"0.3.6":{"node_abi":1,"v8":"3.0"},"0.3.7":{"node_abi":1,"v8":"3.0"},"0.3.8":{"node_abi":1,"v8":"3.1"},"0.4.0":{"node_abi":1,"v8":"3.1"},"0.4.1":{"node_abi":1,"v8":"3.1"},"0.4.2":{"node_abi":1,"v8":"3.1"},"0.4.3":{"node_abi":1,"v8":"3.1"},"0.4.4":{"node_abi":1,"v8":"3.1"},"0.4.5":{"node_abi":1,"v8":"3.1"},"0.4.6":{"node_abi":1,"v8":"3.1"},"0.4.7":{"node_abi":1,"v8":"3.1"},"0.4.8":{"node_abi":1,"v8":"3.1"},"0.4.9":{"node_abi":1,"v8":"3.1"},"0.4.10":{"node_abi":1,"v8":"3.1"},"0.4.11":{"node_abi":1,"v8":"3.1"},"0.4.12":{"node_abi":1,"v8":"3.1"},"0.5.0":{"node_abi":1,"v8":"3.1"},"0.5.1":{"node_abi":1,"v8":"3.4"},"0.5.2":{"node_abi":1,"v8":"3.4"},"0.5.3":{"node_abi":1,"v8":"3.4"},"0.5.4":{"node_abi":1,"v8":"3.5"},"0.5.5":{"node_abi":1,"v8":"3.5"},"0.5.6":{"node_abi":1,"v8":"3.6"},"0.5.7":{"node_abi":1,"v8":"3.6"},"0.5.8":{"node_abi":1,"v8":"3.6"},"0.5.9":{"node_abi":1,"v8":"3.6"},"0.5.10":{"node_abi":1,"v8":"3.7"},"0.6.0":{"node_abi":1,"v8":"3.6"},"0.6.1":{"node_abi":1,"v8":"3.6"},"0.6.2":{"node_abi":1,"v8":"3.6"},"0.6.3":{"node_abi":1,"v8":"3.6"},"0.6.4":{"node_abi":1,"v8":"3.6"},"0.6.5":{"node_abi":1,"v8":"3.6"},"0.6.6":{"node_abi":1,"v8":"3.6"},"0.6.7":{"node_abi":1,"v8":"3.6"},"0.6.8":{"node_abi":1,"v8":"3.6"},"0.6.9":{"node_abi":1,"v8":"3.6"},"0.6.10":{"node_abi":1,"v8":"3.6"},"0.6.11":{"node_abi":1,"v8":"3.6"},"0.6.12":{"node_abi":1,"v8":"3.6"},"0.6.13":{"node_abi":1,"v8":"3.6"},"0.6.14":{"node_abi":1,"v8":"3.6"},"0.6.15":{"node_abi":1,"v8":"3.6"},"0.6.16":{"node_abi":1,"v8":"3.6"},"0.6.17":{"node_abi":1,"v8":"3.6"},"0.6.18":{"node_abi":1,"v8":"3.6"},"0.6.19":{"node_abi":1,"v8":"3.6"},"0.6.20":{"node_abi":1,"v8":"3.6"},"0.6.21":{"node_abi":1,"v8":"3.6"},"0.7.0":{"node_abi":1,"v8":"3.8"},"0.7.1":{"node_abi":1,"v8":"3.8"},"0.7.2":{"node_abi":1,"v8":"3.8"},"0.7.3":{"node_abi":1,"v8":"3.9"},"0.7.4":{"node_abi":1,"v8":"3.9"},"0.7.5":{"node_abi":1,"v8":"3.9"},"0.7.6":{"node_abi":1,"v8":"3.9"},"0.7.7":{"node_abi":1,"v8":"3.9"},"0.7.8":{"node_abi":1,"v8":"3.9"},"0.7.9":{"node_abi":1,"v8":"3.11"},"0.7.10":{"node_abi":1,"v8":"3.9"},"0.7.11":{"node_abi":1,"v8":"3.11"},"0.7.12":{"node_abi":1,"v8":"3.11"},"0.8.0":{"node_abi":1,"v8":"3.11"},"0.8.1":{"node_abi":1,"v8":"3.11"},"0.8.2":{"node_abi":1,"v8":"3.11"},"0.8.3":{"node_abi":1,"v8":"3.11"},"0.8.4":{"node_abi":1,"v8":"3.11"},"0.8.5":{"node_abi":1,"v8":"3.11"},"0.8.6":{"node_abi":1,"v8":"3.11"},"0.8.7":{"node_abi":1,"v8":"3.11"},"0.8.8":{"node_abi":1,"v8":"3.11"},"0.8.9":{"node_abi":1,"v8":"3.11"},"0.8.10":{"node_abi":1,"v8":"3.11"},"0.8.11":{"node_abi":1,"v8":"3.11"},"0.8.12":{"node_abi":1,"v8":"3.11"},"0.8.13":{"node_abi":1,"v8":"3.11"},"0.8.14":{"node_abi":1,"v8":"3.11"},"0.8.15":{"node_abi":1,"v8":"3.11"},"0.8.16":{"node_abi":1,"v8":"3.11"},"0.8.17":{"node_abi":1,"v8":"3.11"},"0.8.18":{"node_abi":1,"v8":"3.11"},"0.8.19":{"node_abi":1,"v8":"3.11"},"0.8.20":{"node_abi":1,"v8":"3.11"},"0.8.21":{"node_abi":1,"v8":"3.11"},"0.8.22":{"node_abi":1,"v8":"3.11"},"0.8.23":{"node_abi":1,"v8":"3.11"},"0.8.24":{"node_abi":1,"v8":"3.11"},"0.8.25":{"node_abi":1,"v8":"3.11"},"0.8.26":{"node_abi":1,"v8":"3.11"},"0.8.27":{"node_abi":1,"v8":"3.11"},"0.8.28":{"node_abi":1,"v8":"3.11"},"0.9.0":{"node_abi":1,"v8":"3.11"},"0.9.1":{"node_abi":10,"v8":"3.11"},"0.9.2":{"node_abi":10,"v8":"3.11"},"0.9.3":{"node_abi":10,"v8":"3.13"},"0.9.4":{"node_abi":10,"v8":"3.13"},"0.9.5":{"node_abi":10,"v8":"3.13"},"0.9.6":{"node_abi":10,"v8":"3.15"},"0.9.7":{"node_abi":10,"v8":"3.15"},"0.9.8":{"node_abi":10,"v8":"3.15"},"0.9.9":{"node_abi":11,"v8":"3.15"},"0.9.10":{"node_abi":11,"v8":"3.15"},"0.9.11":{"node_abi":11,"v8":"3.14"},"0.9.12":{"node_abi":11,"v8":"3.14"},"0.10.0":{"node_abi":11,"v8":"3.14"},"0.10.1":{"node_abi":11,"v8":"3.14"},"0.10.2":{"node_abi":11,"v8":"3.14"},"0.10.3":{"node_abi":11,"v8":"3.14"},"0.10.4":{"node_abi":11,"v8":"3.14"},"0.10.5":{"node_abi":11,"v8":"3.14"},"0.10.6":{"node_abi":11,"v8":"3.14"},"0.10.7":{"node_abi":11,"v8":"3.14"},"0.10.8":{"node_abi":11,"v8":"3.14"},"0.10.9":{"node_abi":11,"v8":"3.14"},"0.10.10":{"node_abi":11,"v8":"3.14"},"0.10.11":{"node_abi":11,"v8":"3.14"},"0.10.12":{"node_abi":11,"v8":"3.14"},"0.10.13":{"node_abi":11,"v8":"3.14"},"0.10.14":{"node_abi":11,"v8":"3.14"},"0.10.15":{"node_abi":11,"v8":"3.14"},"0.10.16":{"node_abi":11,"v8":"3.14"},"0.10.17":{"node_abi":11,"v8":"3.14"},"0.10.18":{"node_abi":11,"v8":"3.14"},"0.10.19":{"node_abi":11,"v8":"3.14"},"0.10.20":{"node_abi":11,"v8":"3.14"},"0.10.21":{"node_abi":11,"v8":"3.14"},"0.10.22":{"node_abi":11,"v8":"3.14"},"0.10.23":{"node_abi":11,"v8":"3.14"},"0.10.24":{"node_abi":11,"v8":"3.14"},"0.10.25":{"node_abi":11,"v8":"3.14"},"0.10.26":{"node_abi":11,"v8":"3.14"},"0.10.27":{"node_abi":11,"v8":"3.14"},"0.10.28":{"node_abi":11,"v8":"3.14"},"0.10.29":{"node_abi":11,"v8":"3.14"},"0.10.30":{"node_abi":11,"v8":"3.14"},"0.10.31":{"node_abi":11,"v8":"3.14"},"0.10.32":{"node_abi":11,"v8":"3.14"},"0.10.33":{"node_abi":11,"v8":"3.14"},"0.10.34":{"node_abi":11,"v8":"3.14"},"0.10.35":{"node_abi":11,"v8":"3.14"},"0.10.36":{"node_abi":11,"v8":"3.14"},"0.10.37":{"node_abi":11,"v8":"3.14"},"0.10.38":{"node_abi":11,"v8":"3.14"},"0.10.39":{"node_abi":11,"v8":"3.14"},"0.10.40":{"node_abi":11,"v8":"3.14"},"0.10.41":{"node_abi":11,"v8":"3.14"},"0.10.42":{"node_abi":11,"v8":"3.14"},"0.10.43":{"node_abi":11,"v8":"3.14"},"0.10.44":{"node_abi":11,"v8":"3.14"},"0.10.45":{"node_abi":11,"v8":"3.14"},"0.10.46":{"node_abi":11,"v8":"3.14"},"0.10.47":{"node_abi":11,"v8":"3.14"},"0.10.48":{"node_abi":11,"v8":"3.14"},"0.11.0":{"node_abi":12,"v8":"3.17"},"0.11.1":{"node_abi":12,"v8":"3.18"},"0.11.2":{"node_abi":12,"v8":"3.19"},"0.11.3":{"node_abi":12,"v8":"3.19"},"0.11.4":{"node_abi":12,"v8":"3.20"},"0.11.5":{"node_abi":12,"v8":"3.20"},"0.11.6":{"node_abi":12,"v8":"3.20"},"0.11.7":{"node_abi":12,"v8":"3.20"},"0.11.8":{"node_abi":13,"v8":"3.21"},"0.11.9":{"node_abi":13,"v8":"3.22"},"0.11.10":{"node_abi":13,"v8":"3.22"},"0.11.11":{"node_abi":14,"v8":"3.22"},"0.11.12":{"node_abi":14,"v8":"3.22"},"0.11.13":{"node_abi":14,"v8":"3.25"},"0.11.14":{"node_abi":14,"v8":"3.26"},"0.11.15":{"node_abi":14,"v8":"3.28"},"0.11.16":{"node_abi":14,"v8":"3.28"},"0.12.0":{"node_abi":14,"v8":"3.28"},"0.12.1":{"node_abi":14,"v8":"3.28"},"0.12.2":{"node_abi":14,"v8":"3.28"},"0.12.3":{"node_abi":14,"v8":"3.28"},"0.12.4":{"node_abi":14,"v8":"3.28"},"0.12.5":{"node_abi":14,"v8":"3.28"},"0.12.6":{"node_abi":14,"v8":"3.28"},"0.12.7":{"node_abi":14,"v8":"3.28"},"0.12.8":{"node_abi":14,"v8":"3.28"},"0.12.9":{"node_abi":14,"v8":"3.28"},"0.12.10":{"node_abi":14,"v8":"3.28"},"0.12.11":{"node_abi":14,"v8":"3.28"},"0.12.12":{"node_abi":14,"v8":"3.28"},"0.12.13":{"node_abi":14,"v8":"3.28"},"0.12.14":{"node_abi":14,"v8":"3.28"},"0.12.15":{"node_abi":14,"v8":"3.28"},"0.12.16":{"node_abi":14,"v8":"3.28"},"0.12.17":{"node_abi":14,"v8":"3.28"},"0.12.18":{"node_abi":14,"v8":"3.28"},"1.0.0":{"node_abi":42,"v8":"3.31"},"1.0.1":{"node_abi":42,"v8":"3.31"},"1.0.2":{"node_abi":42,"v8":"3.31"},"1.0.3":{"node_abi":42,"v8":"4.1"},"1.0.4":{"node_abi":42,"v8":"4.1"},"1.1.0":{"node_abi":43,"v8":"4.1"},"1.2.0":{"node_abi":43,"v8":"4.1"},"1.3.0":{"node_abi":43,"v8":"4.1"},"1.4.1":{"node_abi":43,"v8":"4.1"},"1.4.2":{"node_abi":43,"v8":"4.1"},"1.4.3":{"node_abi":43,"v8":"4.1"},"1.5.0":{"node_abi":43,"v8":"4.1"},"1.5.1":{"node_abi":43,"v8":"4.1"},"1.6.0":{"node_abi":43,"v8":"4.1"},"1.6.1":{"node_abi":43,"v8":"4.1"},"1.6.2":{"node_abi":43,"v8":"4.1"},"1.6.3":{"node_abi":43,"v8":"4.1"},"1.6.4":{"node_abi":43,"v8":"4.1"},"1.7.1":{"node_abi":43,"v8":"4.1"},"1.8.1":{"node_abi":43,"v8":"4.1"},"1.8.2":{"node_abi":43,"v8":"4.1"},"1.8.3":{"node_abi":43,"v8":"4.1"},"1.8.4":{"node_abi":43,"v8":"4.1"},"2.0.0":{"node_abi":44,"v8":"4.2"},"2.0.1":{"node_abi":44,"v8":"4.2"},"2.0.2":{"node_abi":44,"v8":"4.2"},"2.1.0":{"node_abi":44,"v8":"4.2"},"2.2.0":{"node_abi":44,"v8":"4.2"},"2.2.1":{"node_abi":44,"v8":"4.2"},"2.3.0":{"node_abi":44,"v8":"4.2"},"2.3.1":{"node_abi":44,"v8":"4.2"},"2.3.2":{"node_abi":44,"v8":"4.2"},"2.3.3":{"node_abi":44,"v8":"4.2"},"2.3.4":{"node_abi":44,"v8":"4.2"},"2.4.0":{"node_abi":44,"v8":"4.2"},"2.5.0":{"node_abi":44,"v8":"4.2"},"3.0.0":{"node_abi":45,"v8":"4.4"},"3.1.0":{"node_abi":45,"v8":"4.4"},"3.2.0":{"node_abi":45,"v8":"4.4"},"3.3.0":{"node_abi":45,"v8":"4.4"},"3.3.1":{"node_abi":45,"v8":"4.4"},"4.0.0":{"node_abi":46,"v8":"4.5"},"4.1.0":{"node_abi":46,"v8":"4.5"},"4.1.1":{"node_abi":46,"v8":"4.5"},"4.1.2":{"node_abi":46,"v8":"4.5"},"4.2.0":{"node_abi":46,"v8":"4.5"},"4.2.1":{"node_abi":46,"v8":"4.5"},"4.2.2":{"node_abi":46,"v8":"4.5"},"4.2.3":{"node_abi":46,"v8":"4.5"},"4.2.4":{"node_abi":46,"v8":"4.5"},"4.2.5":{"node_abi":46,"v8":"4.5"},"4.2.6":{"node_abi":46,"v8":"4.5"},"4.3.0":{"node_abi":46,"v8":"4.5"},"4.3.1":{"node_abi":46,"v8":"4.5"},"4.3.2":{"node_abi":46,"v8":"4.5"},"4.4.0":{"node_abi":46,"v8":"4.5"},"4.4.1":{"node_abi":46,"v8":"4.5"},"4.4.2":{"node_abi":46,"v8":"4.5"},"4.4.3":{"node_abi":46,"v8":"4.5"},"4.4.4":{"node_abi":46,"v8":"4.5"},"4.4.5":{"node_abi":46,"v8":"4.5"},"4.4.6":{"node_abi":46,"v8":"4.5"},"4.4.7":{"node_abi":46,"v8":"4.5"},"4.5.0":{"node_abi":46,"v8":"4.5"},"4.6.0":{"node_abi":46,"v8":"4.5"},"4.6.1":{"node_abi":46,"v8":"4.5"},"4.6.2":{"node_abi":46,"v8":"4.5"},"4.7.0":{"node_abi":46,"v8":"4.5"},"4.7.1":{"node_abi":46,"v8":"4.5"},"4.7.2":{"node_abi":46,"v8":"4.5"},"4.7.3":{"node_abi":46,"v8":"4.5"},"4.8.0":{"node_abi":46,"v8":"4.5"},"4.8.1":{"node_abi":46,"v8":"4.5"},"4.8.2":{"node_abi":46,"v8":"4.5"},"4.8.3":{"node_abi":46,"v8":"4.5"},"4.8.4":{"node_abi":46,"v8":"4.5"},"4.8.5":{"node_abi":46,"v8":"4.5"},"4.8.6":{"node_abi":46,"v8":"4.5"},"4.8.7":{"node_abi":46,"v8":"4.5"},"4.9.0":{"node_abi":46,"v8":"4.5"},"4.9.1":{"node_abi":46,"v8":"4.5"},"5.0.0":{"node_abi":47,"v8":"4.6"},"5.1.0":{"node_abi":47,"v8":"4.6"},"5.1.1":{"node_abi":47,"v8":"4.6"},"5.2.0":{"node_abi":47,"v8":"4.6"},"5.3.0":{"node_abi":47,"v8":"4.6"},"5.4.0":{"node_abi":47,"v8":"4.6"},"5.4.1":{"node_abi":47,"v8":"4.6"},"5.5.0":{"node_abi":47,"v8":"4.6"},"5.6.0":{"node_abi":47,"v8":"4.6"},"5.7.0":{"node_abi":47,"v8":"4.6"},"5.7.1":{"node_abi":47,"v8":"4.6"},"5.8.0":{"node_abi":47,"v8":"4.6"},"5.9.0":{"node_abi":47,"v8":"4.6"},"5.9.1":{"node_abi":47,"v8":"4.6"},"5.10.0":{"node_abi":47,"v8":"4.6"},"5.10.1":{"node_abi":47,"v8":"4.6"},"5.11.0":{"node_abi":47,"v8":"4.6"},"5.11.1":{"node_abi":47,"v8":"4.6"},"5.12.0":{"node_abi":47,"v8":"4.6"},"6.0.0":{"node_abi":48,"v8":"5.0"},"6.1.0":{"node_abi":48,"v8":"5.0"},"6.2.0":{"node_abi":48,"v8":"5.0"},"6.2.1":{"node_abi":48,"v8":"5.0"},"6.2.2":{"node_abi":48,"v8":"5.0"},"6.3.0":{"node_abi":48,"v8":"5.0"},"6.3.1":{"node_abi":48,"v8":"5.0"},"6.4.0":{"node_abi":48,"v8":"5.0"},"6.5.0":{"node_abi":48,"v8":"5.1"},"6.6.0":{"node_abi":48,"v8":"5.1"},"6.7.0":{"node_abi":48,"v8":"5.1"},"6.8.0":{"node_abi":48,"v8":"5.1"},"6.8.1":{"node_abi":48,"v8":"5.1"},"6.9.0":{"node_abi":48,"v8":"5.1"},"6.9.1":{"node_abi":48,"v8":"5.1"},"6.9.2":{"node_abi":48,"v8":"5.1"},"6.9.3":{"node_abi":48,"v8":"5.1"},"6.9.4":{"node_abi":48,"v8":"5.1"},"6.9.5":{"node_abi":48,"v8":"5.1"},"6.10.0":{"node_abi":48,"v8":"5.1"},"6.10.1":{"node_abi":48,"v8":"5.1"},"6.10.2":{"node_abi":48,"v8":"5.1"},"6.10.3":{"node_abi":48,"v8":"5.1"},"6.11.0":{"node_abi":48,"v8":"5.1"},"6.11.1":{"node_abi":48,"v8":"5.1"},"6.11.2":{"node_abi":48,"v8":"5.1"},"6.11.3":{"node_abi":48,"v8":"5.1"},"6.11.4":{"node_abi":48,"v8":"5.1"},"6.11.5":{"node_abi":48,"v8":"5.1"},"6.12.0":{"node_abi":48,"v8":"5.1"},"6.12.1":{"node_abi":48,"v8":"5.1"},"6.12.2":{"node_abi":48,"v8":"5.1"},"6.12.3":{"node_abi":48,"v8":"5.1"},"6.13.0":{"node_abi":48,"v8":"5.1"},"6.13.1":{"node_abi":48,"v8":"5.1"},"6.14.0":{"node_abi":48,"v8":"5.1"},"6.14.1":{"node_abi":48,"v8":"5.1"},"6.14.2":{"node_abi":48,"v8":"5.1"},"6.14.3":{"node_abi":48,"v8":"5.1"},"6.14.4":{"node_abi":48,"v8":"5.1"},"6.15.0":{"node_abi":48,"v8":"5.1"},"6.15.1":{"node_abi":48,"v8":"5.1"},"6.16.0":{"node_abi":48,"v8":"5.1"},"6.17.0":{"node_abi":48,"v8":"5.1"},"6.17.1":{"node_abi":48,"v8":"5.1"},"7.0.0":{"node_abi":51,"v8":"5.4"},"7.1.0":{"node_abi":51,"v8":"5.4"},"7.2.0":{"node_abi":51,"v8":"5.4"},"7.2.1":{"node_abi":51,"v8":"5.4"},"7.3.0":{"node_abi":51,"v8":"5.4"},"7.4.0":{"node_abi":51,"v8":"5.4"},"7.5.0":{"node_abi":51,"v8":"5.4"},"7.6.0":{"node_abi":51,"v8":"5.5"},"7.7.0":{"node_abi":51,"v8":"5.5"},"7.7.1":{"node_abi":51,"v8":"5.5"},"7.7.2":{"node_abi":51,"v8":"5.5"},"7.7.3":{"node_abi":51,"v8":"5.5"},"7.7.4":{"node_abi":51,"v8":"5.5"},"7.8.0":{"node_abi":51,"v8":"5.5"},"7.9.0":{"node_abi":51,"v8":"5.5"},"7.10.0":{"node_abi":51,"v8":"5.5"},"7.10.1":{"node_abi":51,"v8":"5.5"},"8.0.0":{"node_abi":57,"v8":"5.8"},"8.1.0":{"node_abi":57,"v8":"5.8"},"8.1.1":{"node_abi":57,"v8":"5.8"},"8.1.2":{"node_abi":57,"v8":"5.8"},"8.1.3":{"node_abi":57,"v8":"5.8"},"8.1.4":{"node_abi":57,"v8":"5.8"},"8.2.0":{"node_abi":57,"v8":"5.8"},"8.2.1":{"node_abi":57,"v8":"5.8"},"8.3.0":{"node_abi":57,"v8":"6.0"},"8.4.0":{"node_abi":57,"v8":"6.0"},"8.5.0":{"node_abi":57,"v8":"6.0"},"8.6.0":{"node_abi":57,"v8":"6.0"},"8.7.0":{"node_abi":57,"v8":"6.1"},"8.8.0":{"node_abi":57,"v8":"6.1"},"8.8.1":{"node_abi":57,"v8":"6.1"},"8.9.0":{"node_abi":57,"v8":"6.1"},"8.9.1":{"node_abi":57,"v8":"6.1"},"8.9.2":{"node_abi":57,"v8":"6.1"},"8.9.3":{"node_abi":57,"v8":"6.1"},"8.9.4":{"node_abi":57,"v8":"6.1"},"8.10.0":{"node_abi":57,"v8":"6.2"},"8.11.0":{"node_abi":57,"v8":"6.2"},"8.11.1":{"node_abi":57,"v8":"6.2"},"8.11.2":{"node_abi":57,"v8":"6.2"},"8.11.3":{"node_abi":57,"v8":"6.2"},"8.11.4":{"node_abi":57,"v8":"6.2"},"8.12.0":{"node_abi":57,"v8":"6.2"},"8.13.0":{"node_abi":57,"v8":"6.2"},"8.14.0":{"node_abi":57,"v8":"6.2"},"8.14.1":{"node_abi":57,"v8":"6.2"},"8.15.0":{"node_abi":57,"v8":"6.2"},"8.15.1":{"node_abi":57,"v8":"6.2"},"8.16.0":{"node_abi":57,"v8":"6.2"},"8.16.1":{"node_abi":57,"v8":"6.2"},"8.16.2":{"node_abi":57,"v8":"6.2"},"8.17.0":{"node_abi":57,"v8":"6.2"},"9.0.0":{"node_abi":59,"v8":"6.2"},"9.1.0":{"node_abi":59,"v8":"6.2"},"9.2.0":{"node_abi":59,"v8":"6.2"},"9.2.1":{"node_abi":59,"v8":"6.2"},"9.3.0":{"node_abi":59,"v8":"6.2"},"9.4.0":{"node_abi":59,"v8":"6.2"},"9.5.0":{"node_abi":59,"v8":"6.2"},"9.6.0":{"node_abi":59,"v8":"6.2"},"9.6.1":{"node_abi":59,"v8":"6.2"},"9.7.0":{"node_abi":59,"v8":"6.2"},"9.7.1":{"node_abi":59,"v8":"6.2"},"9.8.0":{"node_abi":59,"v8":"6.2"},"9.9.0":{"node_abi":59,"v8":"6.2"},"9.10.0":{"node_abi":59,"v8":"6.2"},"9.10.1":{"node_abi":59,"v8":"6.2"},"9.11.0":{"node_abi":59,"v8":"6.2"},"9.11.1":{"node_abi":59,"v8":"6.2"},"9.11.2":{"node_abi":59,"v8":"6.2"},"10.0.0":{"node_abi":64,"v8":"6.6"},"10.1.0":{"node_abi":64,"v8":"6.6"},"10.2.0":{"node_abi":64,"v8":"6.6"},"10.2.1":{"node_abi":64,"v8":"6.6"},"10.3.0":{"node_abi":64,"v8":"6.6"},"10.4.0":{"node_abi":64,"v8":"6.7"},"10.4.1":{"node_abi":64,"v8":"6.7"},"10.5.0":{"node_abi":64,"v8":"6.7"},"10.6.0":{"node_abi":64,"v8":"6.7"},"10.7.0":{"node_abi":64,"v8":"6.7"},"10.8.0":{"node_abi":64,"v8":"6.7"},"10.9.0":{"node_abi":64,"v8":"6.8"},"10.10.0":{"node_abi":64,"v8":"6.8"},"10.11.0":{"node_abi":64,"v8":"6.8"},"10.12.0":{"node_abi":64,"v8":"6.8"},"10.13.0":{"node_abi":64,"v8":"6.8"},"10.14.0":{"node_abi":64,"v8":"6.8"},"10.14.1":{"node_abi":64,"v8":"6.8"},"10.14.2":{"node_abi":64,"v8":"6.8"},"10.15.0":{"node_abi":64,"v8":"6.8"},"10.15.1":{"node_abi":64,"v8":"6.8"},"10.15.2":{"node_abi":64,"v8":"6.8"},"10.15.3":{"node_abi":64,"v8":"6.8"},"10.16.0":{"node_abi":64,"v8":"6.8"},"10.16.1":{"node_abi":64,"v8":"6.8"},"10.16.2":{"node_abi":64,"v8":"6.8"},"10.16.3":{"node_abi":64,"v8":"6.8"},"10.17.0":{"node_abi":64,"v8":"6.8"},"10.18.0":{"node_abi":64,"v8":"6.8"},"10.18.1":{"node_abi":64,"v8":"6.8"},"10.19.0":{"node_abi":64,"v8":"6.8"},"10.20.0":{"node_abi":64,"v8":"6.8"},"10.20.1":{"node_abi":64,"v8":"6.8"},"10.21.0":{"node_abi":64,"v8":"6.8"},"10.22.0":{"node_abi":64,"v8":"6.8"},"10.22.1":{"node_abi":64,"v8":"6.8"},"10.23.0":{"node_abi":64,"v8":"6.8"},"10.23.1":{"node_abi":64,"v8":"6.8"},"10.23.2":{"node_abi":64,"v8":"6.8"},"10.23.3":{"node_abi":64,"v8":"6.8"},"10.24.0":{"node_abi":64,"v8":"6.8"},"10.24.1":{"node_abi":64,"v8":"6.8"},"11.0.0":{"node_abi":67,"v8":"7.0"},"11.1.0":{"node_abi":67,"v8":"7.0"},"11.2.0":{"node_abi":67,"v8":"7.0"},"11.3.0":{"node_abi":67,"v8":"7.0"},"11.4.0":{"node_abi":67,"v8":"7.0"},"11.5.0":{"node_abi":67,"v8":"7.0"},"11.6.0":{"node_abi":67,"v8":"7.0"},"11.7.0":{"node_abi":67,"v8":"7.0"},"11.8.0":{"node_abi":67,"v8":"7.0"},"11.9.0":{"node_abi":67,"v8":"7.0"},"11.10.0":{"node_abi":67,"v8":"7.0"},"11.10.1":{"node_abi":67,"v8":"7.0"},"11.11.0":{"node_abi":67,"v8":"7.0"},"11.12.0":{"node_abi":67,"v8":"7.0"},"11.13.0":{"node_abi":67,"v8":"7.0"},"11.14.0":{"node_abi":67,"v8":"7.0"},"11.15.0":{"node_abi":67,"v8":"7.0"},"12.0.0":{"node_abi":72,"v8":"7.4"},"12.1.0":{"node_abi":72,"v8":"7.4"},"12.2.0":{"node_abi":72,"v8":"7.4"},"12.3.0":{"node_abi":72,"v8":"7.4"},"12.3.1":{"node_abi":72,"v8":"7.4"},"12.4.0":{"node_abi":72,"v8":"7.4"},"12.5.0":{"node_abi":72,"v8":"7.5"},"12.6.0":{"node_abi":72,"v8":"7.5"},"12.7.0":{"node_abi":72,"v8":"7.5"},"12.8.0":{"node_abi":72,"v8":"7.5"},"12.8.1":{"node_abi":72,"v8":"7.5"},"12.9.0":{"node_abi":72,"v8":"7.6"},"12.9.1":{"node_abi":72,"v8":"7.6"},"12.10.0":{"node_abi":72,"v8":"7.6"},"12.11.0":{"node_abi":72,"v8":"7.7"},"12.11.1":{"node_abi":72,"v8":"7.7"},"12.12.0":{"node_abi":72,"v8":"7.7"},"12.13.0":{"node_abi":72,"v8":"7.7"},"12.13.1":{"node_abi":72,"v8":"7.7"},"12.14.0":{"node_abi":72,"v8":"7.7"},"12.14.1":{"node_abi":72,"v8":"7.7"},"12.15.0":{"node_abi":72,"v8":"7.7"},"12.16.0":{"node_abi":72,"v8":"7.8"},"12.16.1":{"node_abi":72,"v8":"7.8"},"12.16.2":{"node_abi":72,"v8":"7.8"},"12.16.3":{"node_abi":72,"v8":"7.8"},"12.17.0":{"node_abi":72,"v8":"7.8"},"12.18.0":{"node_abi":72,"v8":"7.8"},"12.18.1":{"node_abi":72,"v8":"7.8"},"12.18.2":{"node_abi":72,"v8":"7.8"},"12.18.3":{"node_abi":72,"v8":"7.8"},"12.18.4":{"node_abi":72,"v8":"7.8"},"12.19.0":{"node_abi":72,"v8":"7.8"},"12.19.1":{"node_abi":72,"v8":"7.8"},"12.20.0":{"node_abi":72,"v8":"7.8"},"12.20.1":{"node_abi":72,"v8":"7.8"},"12.20.2":{"node_abi":72,"v8":"7.8"},"12.21.0":{"node_abi":72,"v8":"7.8"},"12.22.0":{"node_abi":72,"v8":"7.8"},"12.22.1":{"node_abi":72,"v8":"7.8"},"13.0.0":{"node_abi":79,"v8":"7.8"},"13.0.1":{"node_abi":79,"v8":"7.8"},"13.1.0":{"node_abi":79,"v8":"7.8"},"13.2.0":{"node_abi":79,"v8":"7.9"},"13.3.0":{"node_abi":79,"v8":"7.9"},"13.4.0":{"node_abi":79,"v8":"7.9"},"13.5.0":{"node_abi":79,"v8":"7.9"},"13.6.0":{"node_abi":79,"v8":"7.9"},"13.7.0":{"node_abi":79,"v8":"7.9"},"13.8.0":{"node_abi":79,"v8":"7.9"},"13.9.0":{"node_abi":79,"v8":"7.9"},"13.10.0":{"node_abi":79,"v8":"7.9"},"13.10.1":{"node_abi":79,"v8":"7.9"},"13.11.0":{"node_abi":79,"v8":"7.9"},"13.12.0":{"node_abi":79,"v8":"7.9"},"13.13.0":{"node_abi":79,"v8":"7.9"},"13.14.0":{"node_abi":79,"v8":"7.9"},"14.0.0":{"node_abi":83,"v8":"8.1"},"14.1.0":{"node_abi":83,"v8":"8.1"},"14.2.0":{"node_abi":83,"v8":"8.1"},"14.3.0":{"node_abi":83,"v8":"8.1"},"14.4.0":{"node_abi":83,"v8":"8.1"},"14.5.0":{"node_abi":83,"v8":"8.3"},"14.6.0":{"node_abi":83,"v8":"8.4"},"14.7.0":{"node_abi":83,"v8":"8.4"},"14.8.0":{"node_abi":83,"v8":"8.4"},"14.9.0":{"node_abi":83,"v8":"8.4"},"14.10.0":{"node_abi":83,"v8":"8.4"},"14.10.1":{"node_abi":83,"v8":"8.4"},"14.11.0":{"node_abi":83,"v8":"8.4"},"14.12.0":{"node_abi":83,"v8":"8.4"},"14.13.0":{"node_abi":83,"v8":"8.4"},"14.13.1":{"node_abi":83,"v8":"8.4"},"14.14.0":{"node_abi":83,"v8":"8.4"},"14.15.0":{"node_abi":83,"v8":"8.4"},"14.15.1":{"node_abi":83,"v8":"8.4"},"14.15.2":{"node_abi":83,"v8":"8.4"},"14.15.3":{"node_abi":83,"v8":"8.4"},"14.15.4":{"node_abi":83,"v8":"8.4"},"14.15.5":{"node_abi":83,"v8":"8.4"},"14.16.0":{"node_abi":83,"v8":"8.4"},"14.16.1":{"node_abi":83,"v8":"8.4"},"15.0.0":{"node_abi":88,"v8":"8.6"},"15.0.1":{"node_abi":88,"v8":"8.6"},"15.1.0":{"node_abi":88,"v8":"8.6"},"15.2.0":{"node_abi":88,"v8":"8.6"},"15.2.1":{"node_abi":88,"v8":"8.6"},"15.3.0":{"node_abi":88,"v8":"8.6"},"15.4.0":{"node_abi":88,"v8":"8.6"},"15.5.0":{"node_abi":88,"v8":"8.6"},"15.5.1":{"node_abi":88,"v8":"8.6"},"15.6.0":{"node_abi":88,"v8":"8.6"},"15.7.0":{"node_abi":88,"v8":"8.6"},"15.8.0":{"node_abi":88,"v8":"8.6"},"15.9.0":{"node_abi":88,"v8":"8.6"},"15.10.0":{"node_abi":88,"v8":"8.6"},"15.11.0":{"node_abi":88,"v8":"8.6"},"15.12.0":{"node_abi":88,"v8":"8.6"},"15.13.0":{"node_abi":88,"v8":"8.6"},"15.14.0":{"node_abi":88,"v8":"8.6"},"16.0.0":{"node_abi":93,"v8":"9.0"}}')},7399:e=>{"use strict";e.exports=JSON.parse('{"name":"@mapbox/node-pre-gyp","description":"Node.js native addon binary install tool","version":"1.0.5","keywords":["native","addon","module","c","c++","bindings","binary"],"license":"BSD-3-Clause","author":"Dane Springmeyer ","repository":{"type":"git","url":"git://github.com/mapbox/node-pre-gyp.git"},"bin":"./bin/node-pre-gyp","main":"./lib/node-pre-gyp.js","dependencies":{"detect-libc":"^1.0.3","https-proxy-agent":"^5.0.0","make-dir":"^3.1.0","node-fetch":"^2.6.1","nopt":"^5.0.0","npmlog":"^4.1.2","rimraf":"^3.0.2","semver":"^7.3.4","tar":"^6.1.0"},"devDependencies":{"@mapbox/cloudfriend":"^4.6.0","@mapbox/eslint-config-mapbox":"^3.0.0","action-walk":"^2.2.0","aws-sdk":"^2.840.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-plugin-node":"^11.1.0","mock-aws-s3":"^4.0.1","nock":"^12.0.3","node-addon-api":"^3.1.0","nyc":"^15.1.0","tape":"^5.2.2","tar-fs":"^2.1.1"},"nyc":{"all":true,"skip-full":false,"exclude":["test/**"]},"scripts":{"coverage":"nyc --all --include index.js --include lib/ npm test","upload-coverage":"nyc report --reporter json && codecov --clear --flags=unit --file=./coverage/coverage-final.json","lint":"eslint bin/node-pre-gyp lib/*js lib/util/*js test/*js scripts/*js","fix":"npm run lint -- --fix","update-crosswalk":"node scripts/abi_crosswalk.js","test":"tape test/*test.js"}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var s=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);s=false}finally{if(s)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(6223);module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/packages/next/src/compiled/babel-packages/packages-bundle.js b/packages/next/src/compiled/babel-packages/packages-bundle.js index 511094b011223..029f64664e926 100644 --- a/packages/next/src/compiled/babel-packages/packages-bundle.js +++ b/packages/next/src/compiled/babel-packages/packages-bundle.js @@ -220,7 +220,7 @@ } `}else{n=o.template.ast` var ${r.name} = ${t}; - `}}n.loc=r.loc;l.push(n);l.push(...(0,a.buildNamespaceInitStatements)(i,r,j))}(0,a.ensureStatementsHoisted)(l);e.unshiftContainer("body",l);e.get("body").forEach((e=>{if(l.indexOf(e.node)===-1)return;if(e.isVariableDeclaration()){e.scope.registerDeclaration(e)}}))}}}}}));t["default"]=l},5185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.getExportSpecifierName=getExportSpecifierName;var s=r(6454);var a=r(3959);var n=r(8304);var o=r(9261);var i=r(108);var l=r(7239);const c=n.template.statement(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n "use strict";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n`);const u=n.template.statement(`\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`);const p=`WARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n`;const d=null&&`ERROR: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8\n no longer transforms import() without using that plugin.\n`;function getExportSpecifierName(e,t){if(e.type==="Identifier"){return e.name}else if(e.type==="StringLiteral"){const r=e.value;if(!(0,l.isIdentifierName)(r)){t.add(r)}return r}else{throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${e.type}`)}}function constructExportCall(e,t,r,s,a,o){const i=[];if(!a){if(r.length===1){i.push(n.types.expressionStatement(n.types.callExpression(t,[n.types.stringLiteral(r[0]),s[0]])))}else{const e=[];for(let t=0;t{e.assertVersion(7);const{systemGlobal:r="System",allowTopLevelThis:s=false}=t;const l=new WeakSet;const u={"AssignmentExpression|UpdateExpression"(e){if(l.has(e.node))return;l.add(e.node);const t=e.isAssignmentExpression()?e.get("left"):e.get("argument");if(t.isObjectPattern()||t.isArrayPattern()){const r=[e.node];for(const s of Object.keys(t.getBindingIdentifiers())){if(this.scope.getBinding(s)!==e.scope.getBinding(s)){return}const t=this.exports[s];if(!t)return;for(const e of t){r.push(this.buildCall(e,n.types.identifier(s)).expression)}}e.replaceWith(n.types.sequenceExpression(r));return}if(!t.isIdentifier())return;const r=t.node.name;if(this.scope.getBinding(r)!==e.scope.getBinding(r))return;const s=this.exports[r];if(!s)return;let a=e.node;const o=n.types.isUpdateExpression(a,{prefix:false});if(o){a=n.types.binaryExpression(a.operator[0],n.types.unaryExpression("+",n.types.cloneNode(a.argument)),n.types.numericLiteral(1))}for(const e of s){a=this.buildCall(e,a).expression}if(o){a=n.types.sequenceExpression([a,e.node])}e.replaceWith(a)}};return{name:"transform-modules-systemjs",pre(){this.file.set("@babel/plugin-transform-modules-*","systemjs")},visitor:{CallExpression(e,t){if(n.types.isImport(e.node.callee)){if(!this.file.has("@babel/plugin-proposal-dynamic-import")){{console.warn(p)}}e.replaceWith(n.types.callExpression(n.types.memberExpression(n.types.identifier(t.contextIdent),n.types.identifier("import")),[(0,o.getImportSource)(n.types,e.node)]))}},MetaProperty(e,t){if(e.node.meta.name==="import"&&e.node.property.name==="meta"){e.replaceWith(n.types.memberExpression(n.types.identifier(t.contextIdent),n.types.identifier("meta")))}},ReferencedIdentifier(e,t){if(e.node.name==="__moduleName"&&!e.scope.hasBinding("__moduleName")){e.replaceWith(n.types.memberExpression(n.types.identifier(t.contextIdent),n.types.identifier("id")))}},Program:{enter(e,t){t.contextIdent=e.scope.generateUid("context");t.stringSpecifiers=new Set;if(!s){(0,i.rewriteThis)(e)}},exit(e,s){const o=e.scope;const l=o.generateUid("export");const{contextIdent:p,stringSpecifiers:d}=s;const f=Object.create(null);const y=[];const g=[];const h=[];const b=[];const x=[];const v=[];function addExportName(e,t){f[e]=f[e]||[];f[e].push(t)}function pushModule(e,t,r){let s;y.forEach((function(t){if(t.key===e){s=t}}));if(!s){y.push(s={key:e,imports:[],exports:[]})}s[t]=s[t].concat(r)}function buildExportCall(e,t){return n.types.expressionStatement(n.types.callExpression(n.types.identifier(l),[n.types.stringLiteral(e),t]))}const j=[];const E=[];const w=e.get("body");for(const e of w){if(e.isFunctionDeclaration()){g.push(e.node);v.push(e)}else if(e.isClassDeclaration()){x.push(n.types.cloneNode(e.node.id));e.replaceWith(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.cloneNode(e.node.id),n.types.toExpression(e.node))))}else if(e.isVariableDeclaration()){e.node.kind="var"}else if(e.isImportDeclaration()){const t=e.node.source.value;pushModule(t,"imports",e.node.specifiers);for(const t of Object.keys(e.getBindingIdentifiers())){o.removeBinding(t);x.push(n.types.identifier(t))}e.remove()}else if(e.isExportAllDeclaration()){pushModule(e.node.source.value,"exports",e.node);e.remove()}else if(e.isExportDefaultDeclaration()){const t=e.get("declaration");if(t.isClassDeclaration()){const r=t.node.id;if(r){j.push("default");E.push(o.buildUndefinedNode());x.push(n.types.cloneNode(r));addExportName(r.name,"default");e.replaceWith(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.cloneNode(r),n.types.toExpression(t.node))))}else{j.push("default");E.push(n.types.toExpression(t.node));v.push(e)}}else if(t.isFunctionDeclaration()){const r=t.node.id;if(r){g.push(t.node);j.push("default");E.push(n.types.cloneNode(r));addExportName(r.name,"default")}else{j.push("default");E.push(n.types.toExpression(t.node))}v.push(e)}else{e.replaceWith(buildExportCall("default",t.node))}}else if(e.isExportNamedDeclaration()){const t=e.get("declaration");if(t.node){e.replaceWith(t);if(t.isFunction()){const r=t.node;const s=r.id.name;addExportName(s,s);g.push(r);j.push(s);E.push(n.types.cloneNode(r.id));v.push(e)}else if(t.isClass()){const r=t.node.id.name;j.push(r);E.push(o.buildUndefinedNode());x.push(n.types.cloneNode(t.node.id));e.replaceWith(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.cloneNode(t.node.id),n.types.toExpression(t.node))));addExportName(r,r)}else{if(t.isVariableDeclaration()){t.node.kind="var"}for(const e of Object.keys(t.getBindingIdentifiers())){addExportName(e,e)}}}else{const t=e.node.specifiers;if(t!=null&&t.length){if(e.node.source){pushModule(e.node.source.value,"exports",t);e.remove()}else{const r=[];for(const e of t){const{local:t,exported:s}=e;const a=o.getBinding(t.name);const i=getExportSpecifierName(s,d);if(a&&n.types.isFunctionDeclaration(a.path.node)){j.push(i);E.push(n.types.cloneNode(t))}else if(!a){r.push(buildExportCall(i,t))}addExportName(t.name,i)}e.replaceWithMultiple(r)}}else{e.remove()}}}}y.forEach((function(t){const r=[];const s=o.generateUid(t.key);for(let e of t.imports){if(n.types.isImportNamespaceSpecifier(e)){r.push(n.types.expressionStatement(n.types.assignmentExpression("=",e.local,n.types.identifier(s))))}else if(n.types.isImportDefaultSpecifier(e)){e=n.types.importSpecifier(e.local,n.types.identifier("default"))}if(n.types.isImportSpecifier(e)){const{imported:t}=e;r.push(n.types.expressionStatement(n.types.assignmentExpression("=",e.local,n.types.memberExpression(n.types.identifier(s),e.imported,t.type==="StringLiteral"))))}}if(t.exports.length){const a=[];const o=[];let i=false;for(const e of t.exports){if(n.types.isExportAllDeclaration(e)){i=true}else if(n.types.isExportSpecifier(e)){const t=getExportSpecifierName(e.exported,d);a.push(t);o.push(n.types.memberExpression(n.types.identifier(s),e.local,n.types.isStringLiteral(e.local)))}else{}}r.push(...constructExportCall(e,n.types.identifier(l),a,o,i?n.types.identifier(s):null,d))}b.push(n.types.stringLiteral(t.key));h.push(n.types.functionExpression(null,[n.types.identifier(s)],n.types.blockStatement(r)))}));let _=(0,i.getModuleName)(this.file.opts,t);if(_)_=n.types.stringLiteral(_);(0,a.default)(e,((e,t,r)=>{x.push(e);if(!r&&t in f){for(const e of f[t]){j.push(e);E.push(o.buildUndefinedNode())}}}));if(x.length){g.unshift(n.types.variableDeclaration("var",x.map((e=>n.types.variableDeclarator(e)))))}if(j.length){g.push(...constructExportCall(e,n.types.identifier(l),j,E,null,d))}e.traverse(u,{exports:f,buildCall:buildExportCall,scope:o});for(const e of v){e.remove()}let S=false;e.traverse({AwaitExpression(e){S=true;e.stop()},Function(e){e.skip()},noScope:true});e.node.body=[c({SYSTEM_REGISTER:n.types.memberExpression(n.types.identifier(r),n.types.identifier("register")),BEFORE_BODY:g,MODULE_NAME:_,SETTERS:n.types.arrayExpression(h),EXECUTE:n.types.functionExpression(null,[],n.types.blockStatement(e.node.body),false,S),SOURCES:n.types.arrayExpression(b),EXPORT_IDENTIFIER:n.types.identifier(l),CONTEXT_IDENTIFIER:n.types.identifier(p)})]}}}}}));t["default"]=f},272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(1017);var n=r(108);var o=r(8304);const i=(0,o.template)(`\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n`);const l=(0,o.template)(`\n (function (global, factory) {\n if (typeof define === "function" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== "undefined") {\n factory(COMMONJS_ARGUMENTS);\n } else {\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n\n GLOBAL_TO_ASSIGN;\n }\n })(\n typeof globalThis !== "undefined" ? globalThis\n : typeof self !== "undefined" ? self\n : this,\n function(IMPORT_NAMES) {\n })\n`);var c=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const{globals:c,exactGlobals:u,allowTopLevelThis:p,strict:d,strictMode:f,noInterop:y,importInterop:g}=t;const h=(r=e.assumption("constantReexports"))!=null?r:t.loose;const b=(s=e.assumption("enumerableModuleMeta"))!=null?s:t.loose;function buildBrowserInit(e,t,r,s){const n=s?s.value:(0,a.basename)(r,(0,a.extname)(r));let l=o.types.memberExpression(o.types.identifier("global"),o.types.identifier(o.types.toIdentifier(n)));let c=[];if(t){const t=e[n];if(t){c=[];const e=t.split(".");l=e.slice(1).reduce(((e,t)=>{c.push(i({GLOBAL_REFERENCE:o.types.cloneNode(e)}));return o.types.memberExpression(e,o.types.identifier(t))}),o.types.memberExpression(o.types.identifier("global"),o.types.identifier(e[0])))}}c.push(o.types.expressionStatement(o.types.assignmentExpression("=",l,o.types.memberExpression(o.types.identifier("mod"),o.types.identifier("exports")))));return c}function buildBrowserArg(e,t,r){let s;if(t){const t=e[r];if(t){s=t.split(".").reduce(((e,t)=>o.types.memberExpression(e,o.types.identifier(t))),o.types.identifier("global"))}else{s=o.types.memberExpression(o.types.identifier("global"),o.types.identifier(o.types.toIdentifier(r)))}}else{const t=(0,a.basename)(r,(0,a.extname)(r));const n=e[t]||t;s=o.types.memberExpression(o.types.identifier("global"),o.types.identifier(o.types.toIdentifier(n)))}return s}return{name:"transform-modules-umd",visitor:{Program:{exit(e){if(!(0,n.isModule)(e))return;const r=c||{};let s=(0,n.getModuleName)(this.file.opts,t);if(s)s=o.types.stringLiteral(s);const{meta:a,headers:i}=(0,n.rewriteModuleStatementsAndPrepareHeader)(e,{constantReexports:h,enumerableModuleMeta:b,strict:d,strictMode:f,allowTopLevelThis:p,noInterop:y,importInterop:g,filename:this.file.opts.filename});const x=[];const v=[];const j=[];const E=[];if((0,n.hasExports)(a)){x.push(o.types.stringLiteral("exports"));v.push(o.types.identifier("exports"));j.push(o.types.memberExpression(o.types.identifier("mod"),o.types.identifier("exports")));E.push(o.types.identifier(a.exportName))}for(const[t,s]of a.source){x.push(o.types.stringLiteral(t));v.push(o.types.callExpression(o.types.identifier("require"),[o.types.stringLiteral(t)]));j.push(buildBrowserArg(r,u,t));E.push(o.types.identifier(s.name));if(!(0,n.isSideEffectImport)(s)){const t=(0,n.wrapInterop)(e,o.types.identifier(s.name),s.interop);if(t){const e=o.types.expressionStatement(o.types.assignmentExpression("=",o.types.identifier(s.name),t));e.loc=a.loc;i.push(e)}}i.push(...(0,n.buildNamespaceInitStatements)(a,s,h))}(0,n.ensureStatementsHoisted)(i);e.unshiftContainer("body",i);const{body:w,directives:_}=e.node;e.node.directives=[];e.node.body=[];const S=e.pushContainer("body",[l({MODULE_NAME:s,AMD_ARGUMENTS:o.types.arrayExpression(x),COMMONJS_ARGUMENTS:v,BROWSER_ARGUMENTS:j,IMPORT_NAMES:E,GLOBAL_TO_ASSIGN:buildBrowserInit(r,u,this.filename||"unknown",s)})])[0];const k=S.get("expression.arguments")[1].get("body");k.pushContainer("directives",_);k.pushContainer("body",w)}}}}}));t["default"]=c},1570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(2449);var a=r(6454);var n=(0,a.declare)(((e,t)=>{const{runtime:r=true}=t;if(typeof r!=="boolean"){throw new Error("The 'runtime' option must be boolean")}return(0,s.createRegExpFeaturePlugin)({name:"transform-named-capturing-groups-regex",feature:"namedCaptureGroups",options:{runtime:r}})}));t["default"]=n},7429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-new-target",visitor:{MetaProperty(e){const t=e.get("meta");const r=e.get("property");const{scope:s}=e;if(t.isIdentifier({name:"new"})&&r.isIdentifier({name:"target"})){const t=e.findParent((e=>{if(e.isClass())return true;if(e.isFunction()&&!e.isArrowFunctionExpression()){if(e.isClassMethod({kind:"constructor"})){return false}return true}return false}));if(!t){throw e.buildCodeFrameError("new.target must be under a (non-arrow) function or a class.")}const{node:r}=t;if(a.types.isMethod(r)){e.replaceWith(s.buildUndefinedNode());return}if(!r.id){r.id=s.generateUidIdentifier("target")}const n=a.types.memberExpression(a.types.thisExpression(),a.types.identifier("constructor"));if(t.isClass()){e.replaceWith(n);return}e.replaceWith(a.types.conditionalExpression(a.types.binaryExpression("instanceof",a.types.thisExpression(),a.types.cloneNode(r.id)),n,s.buildUndefinedNode()))}}}}}));t["default"]=n},3403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(7328);var n=r(8304);function replacePropertySuper(e,t,r){const s=new a.default({getObjectRef:t,methodPath:e,file:r});s.replace()}var o=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-object-super",visitor:{ObjectExpression(e,t){let r;const getObjectRef=()=>r=r||e.scope.generateUidIdentifier("obj");e.get("properties").forEach((e=>{if(!e.isMethod())return;replacePropertySuper(e,getObjectRef,t)}));if(r){e.scope.push({id:n.types.cloneNode(r)});e.replaceWith(n.types.assignmentExpression("=",n.types.cloneNode(r),e.node))}}}}}));t["default"]=o},4141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"convertFunctionParams",{enumerable:true,get:function(){return a.default}});t["default"]=void 0;var s=r(6454);var a=r(6650);var n=r(1839);var o=(0,s.declare)(((e,t)=>{var r;e.assertVersion(7);const s=(r=e.assumption("ignoreFunctionLength"))!=null?r:t.loose;const o=e.assumption("noNewArrows");return{name:"transform-parameters",visitor:{Function(e){if(e.isArrowFunctionExpression()&&e.get("params").some((e=>e.isRestElement()||e.isAssignmentPattern()))){e.arrowFunctionToExpression({noNewArrows:o})}const t=(0,n.default)(e);const r=(0,a.default)(e,s);if(t||r){e.scope.crawl()}}}}}));t["default"]=o},6650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionParams;var s=r(8304);const a=(0,s.template)(`\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n`);const n=(0,s.template)(`\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n`);const o=(0,s.template)(`\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);const i=(0,s.template)(`\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);const l={"ReferencedIdentifier|BindingIdentifier"(e,t){const{scope:r,node:s}=e;const{name:a}=s;if(a==="eval"||r.getBinding(a)===t.scope.parent.getBinding(a)&&t.scope.hasOwnBinding(a)){t.needsOuterBinding=true;e.stop()}},"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration":e=>e.skip()};function convertFunctionParams(e,t,r,c){const u=e.get("params");const p=u.every((e=>e.isIdentifier()));if(p)return false;const{node:d,scope:f}=e;const y={stop:false,needsOuterBinding:false,scope:f};const g=[];const h=new Set;for(const e of u){for(const t of Object.keys(e.getBindingIdentifiers())){var b;const e=(b=f.bindings[t])==null?void 0:b.constantViolations;if(e){for(const r of e){const e=r.node;switch(e.type){case"VariableDeclarator":{if(e.init===null){const e=r.parentPath;if(!e.parentPath.isFor()||e.parentPath.get("body")===e){r.remove();break}}h.add(t);break}case"FunctionDeclaration":h.add(t);break}}}}}if(h.size===0){for(const e of u){if(!e.isIdentifier())e.traverse(l,y);if(y.needsOuterBinding)break}}let x=null;for(let l=0;l0){g.push(buildScopeIIFE(h,e.get("body").node));e.set("body",s.types.blockStatement(g));const t=e.get("body.body");const r=t[t.length-1].get("argument.callee");r.arrowFunctionToExpression();r.node.generator=e.node.generator;r.node.async=e.node.async;e.node.generator=false}else{e.get("body").unshiftContainer("body",g)}return true}function buildScopeIIFE(e,t){const r=[];const a=[];for(const t of e){r.push(s.types.identifier(t));a.push(s.types.identifier(t))}return s.types.returnStatement(s.types.callExpression(s.types.arrowFunctionExpression(a,t),r))}},1839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionRest;var s=r(8304);const a=(0,s.template)(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);const n=(0,s.template)(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);const o=(0,s.template)(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);const i=(0,s.template)(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);function referencesRest(e,t){if(e.node.name===t.name){return e.scope.bindingIdentifierEquals(t.name,t.outerBinding)}return false}const l={Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.name,t.outerBinding)){e.skip()}},Flow(e){if(e.isTypeCastExpression())return;e.skip()},Function(e,t){const r=t.noOptimise;t.noOptimise=true;e.traverse(l,t);t.noOptimise=r;e.skip()},ReferencedIdentifier(e,t){const{node:r}=e;if(r.name==="arguments"){t.deopted=true}if(!referencesRest(e,t))return;if(t.noOptimise){t.deopted=true}else{const{parentPath:s}=e;if(s.listKey==="params"&&s.key0&&s.types.isIdentifier(e.params[0],{name:"this"})){t-=1}return t}function hasRest(e){const t=e.params.length;return t>0&&s.types.isRestElement(e.params[t-1])}function optimiseIndexGetter(e,t,r){const a=s.types.numericLiteral(r);let i;if(s.types.isNumericLiteral(e.parent.property)){i=s.types.numericLiteral(e.parent.property.value+r)}else if(r===0){i=e.parent.property}else{i=s.types.binaryExpression("+",e.parent.property,s.types.cloneNode(a))}const{scope:l}=e;if(!l.isPure(i)){const r=l.generateUidIdentifierBasedOnNode(i);l.push({id:r,kind:"var"});e.parentPath.replaceWith(o({ARGUMENTS:t,OFFSET:a,INDEX:i,REF:s.types.cloneNode(r)}))}else{const r=e.parentPath;r.replaceWith(n({ARGUMENTS:t,OFFSET:a,INDEX:i}));const s=r.get("test").get("left");const o=s.evaluate();if(o.confident){if(o.value===true){r.replaceWith(r.scope.buildUndefinedNode())}else{r.get("test").replaceWith(r.get("test").get("right"))}}}}function optimiseLengthGetter(e,t,r){if(r){e.parentPath.replaceWith(i({ARGUMENTS:t,OFFSET:s.types.numericLiteral(r)}))}else{e.replaceWith(t)}}function convertFunctionRest(e){const{node:t,scope:r}=e;if(!hasRest(t))return false;let n=t.params.pop().argument;const o=s.types.identifier("arguments");if(s.types.isPattern(n)){const e=n;n=r.generateUidIdentifier("ref");const a=s.types.variableDeclaration("let",[s.types.variableDeclarator(e,n)]);t.body.body.unshift(a)}const i=getParamsCount(t);const c={references:[],offset:i,argumentsNode:o,outerBinding:r.getBindingIdentifier(n.name),candidates:[],name:n.name,deopted:false};e.traverse(l,c);if(!c.deopted&&!c.references.length){for(const{path:e,cause:t}of c.candidates){const r=s.types.cloneNode(o);switch(t){case"indexGetter":optimiseIndexGetter(e,r,c.offset);break;case"lengthGetter":optimiseLengthGetter(e,r,c.offset);break;default:e.replaceWith(r)}}return true}c.references=c.references.concat(c.candidates.map((({path:e})=>e)));const u=s.types.numericLiteral(i);const p=r.generateUidIdentifier("key");const d=r.generateUidIdentifier("len");let f,y;if(i){f=s.types.binaryExpression("-",s.types.cloneNode(p),s.types.cloneNode(u));y=s.types.conditionalExpression(s.types.binaryExpression(">",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.binaryExpression("-",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.numericLiteral(0))}else{f=s.types.identifier(p.name);y=s.types.identifier(d.name)}const g=a({ARGUMENTS:o,ARRAY_KEY:f,ARRAY_LEN:y,START:u,ARRAY:n,KEY:p,LEN:d});if(c.deopted){t.body.body.unshift(g)}else{let t=e.getEarliestCommonAncestorFrom(c.references).getStatementParent();t.findParent((e=>{if(e.isLoop()){t=e}else{return e.isFunction()}}));t.insertBefore(g)}return true}},4013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"convertFunctionParams",{enumerable:true,get:function(){return a.default}});t["default"]=void 0;var s=r(6454);var a=r(5960);var n=r(9748);var o=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const o=(r=e.assumption("ignoreFunctionLength"))!=null?r:t.loose;const i=(s=e.assumption("noNewArrows"))!=null?s:true;return{name:"transform-parameters",visitor:{Function(e){if(e.isArrowFunctionExpression()&&e.get("params").some((e=>e.isRestElement()||e.isAssignmentPattern()))){e.arrowFunctionToExpression({noNewArrows:i});if(!e.isFunctionExpression())return}const t=(0,n.default)(e);const r=(0,a.default)(e,o);if(t||r){e.scope.crawl()}}}}}));t["default"]=o},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionParams;var s=r(8304);const a=(0,s.template)(`\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n`);const n=(0,s.template)(`\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n`);const o=(0,s.template)(`\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);const i=(0,s.template)(`\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);const l={"ReferencedIdentifier|BindingIdentifier"(e,t){const{scope:r,node:s}=e;const{name:a}=s;if(a==="eval"||r.getBinding(a)===t.scope.parent.getBinding(a)&&t.scope.hasOwnBinding(a)){t.needsOuterBinding=true;e.stop()}},"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration":e=>e.skip()};function convertFunctionParams(e,t,r,c){const u=e.get("params");const p=u.every((e=>e.isIdentifier()));if(p)return false;const{node:d,scope:f}=e;const y={stop:false,needsOuterBinding:false,scope:f};const g=[];const h=new Set;for(const e of u){for(const t of Object.keys(e.getBindingIdentifiers())){var b;const e=(b=f.bindings[t])==null?void 0:b.constantViolations;if(e){for(const r of e){const e=r.node;switch(e.type){case"VariableDeclarator":{if(e.init===null){const e=r.parentPath;if(!e.parentPath.isFor()||e.parentPath.get("body")===e){r.remove();break}}h.add(t);break}case"FunctionDeclaration":h.add(t);break}}}}}if(h.size===0){for(const e of u){if(!e.isIdentifier())e.traverse(l,y);if(y.needsOuterBinding)break}}let x=null;for(let l=0;l0){g.push(buildScopeIIFE(h,e.get("body").node));e.set("body",s.types.blockStatement(g));const t=e.get("body.body");const r=t[t.length-1].get("argument.callee");r.arrowFunctionToExpression();r.node.generator=e.node.generator;r.node.async=e.node.async;e.node.generator=false}else{e.get("body").unshiftContainer("body",g)}return true}function buildScopeIIFE(e,t){const r=[];const a=[];for(const t of e){r.push(s.types.identifier(t));a.push(s.types.identifier(t))}return s.types.returnStatement(s.types.callExpression(s.types.arrowFunctionExpression(a,t),r))}},9748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionRest;var s=r(8304);const a=(0,s.template)(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);const n=(0,s.template)(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);const o=(0,s.template)(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);const i=(0,s.template)(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);function referencesRest(e,t){if(e.node.name===t.name){return e.scope.bindingIdentifierEquals(t.name,t.outerBinding)}return false}const l={Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.name,t.outerBinding)){e.skip()}},Flow(e){if(e.isTypeCastExpression())return;e.skip()},Function(e,t){const r=t.noOptimise;t.noOptimise=true;e.traverse(l,t);t.noOptimise=r;e.skip()},ReferencedIdentifier(e,t){const{node:r}=e;if(r.name==="arguments"){t.deopted=true}if(!referencesRest(e,t))return;if(t.noOptimise){t.deopted=true}else{const{parentPath:s}=e;if(s.listKey==="params"&&s.key0&&s.types.isIdentifier(e.params[0],{name:"this"})){t-=1}return t}function hasRest(e){const t=e.params.length;return t>0&&s.types.isRestElement(e.params[t-1])}function optimiseIndexGetter(e,t,r){const a=s.types.numericLiteral(r);let i;if(s.types.isNumericLiteral(e.parent.property)){i=s.types.numericLiteral(e.parent.property.value+r)}else if(r===0){i=e.parent.property}else{i=s.types.binaryExpression("+",e.parent.property,s.types.cloneNode(a))}const{scope:l}=e;if(!l.isPure(i)){const r=l.generateUidIdentifierBasedOnNode(i);l.push({id:r,kind:"var"});e.parentPath.replaceWith(o({ARGUMENTS:t,OFFSET:a,INDEX:i,REF:s.types.cloneNode(r)}))}else{const r=e.parentPath;r.replaceWith(n({ARGUMENTS:t,OFFSET:a,INDEX:i}));const s=r.get("test").get("left");const o=s.evaluate();if(o.confident){if(o.value===true){r.replaceWith(r.scope.buildUndefinedNode())}else{r.get("test").replaceWith(r.get("test").get("right"))}}}}function optimiseLengthGetter(e,t,r){if(r){e.parentPath.replaceWith(i({ARGUMENTS:t,OFFSET:s.types.numericLiteral(r)}))}else{e.replaceWith(t)}}function convertFunctionRest(e){const{node:t,scope:r}=e;if(!hasRest(t))return false;let n=t.params.pop().argument;if(n.name==="arguments")r.rename(n.name);const o=s.types.identifier("arguments");if(s.types.isPattern(n)){const e=n;n=r.generateUidIdentifier("ref");const a=s.types.variableDeclaration("let",[s.types.variableDeclarator(e,n)]);t.body.body.unshift(a)}const i=getParamsCount(t);const c={references:[],offset:i,argumentsNode:o,outerBinding:r.getBindingIdentifier(n.name),candidates:[],name:n.name,deopted:false};e.traverse(l,c);if(!c.deopted&&!c.references.length){for(const{path:e,cause:t}of c.candidates){const r=s.types.cloneNode(o);switch(t){case"indexGetter":optimiseIndexGetter(e,r,c.offset);break;case"lengthGetter":optimiseLengthGetter(e,r,c.offset);break;default:e.replaceWith(r)}}return true}c.references.push(...c.candidates.map((({path:e})=>e)));const u=s.types.numericLiteral(i);const p=r.generateUidIdentifier("key");const d=r.generateUidIdentifier("len");let f,y;if(i){f=s.types.binaryExpression("-",s.types.cloneNode(p),s.types.cloneNode(u));y=s.types.conditionalExpression(s.types.binaryExpression(">",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.binaryExpression("-",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.numericLiteral(0))}else{f=s.types.identifier(p.name);y=s.types.identifier(d.name)}const g=a({ARGUMENTS:o,ARRAY_KEY:f,ARRAY_LEN:y,START:u,ARRAY:n,KEY:p,LEN:d});if(c.deopted){t.body.body.unshift(g)}else{let t=e.getEarliestCommonAncestorFrom(c.references).getStatementParent();t.findParent((e=>{if(e.isLoop()){t=e}else{return e.isFunction()}}));t.insertBefore(g)}return true}},4727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-property-literals",visitor:{ObjectProperty:{exit({node:e}){const t=e.key;if(!e.computed&&a.types.isIdentifier(t)&&!a.types.isValidES3Identifier(t.name)){e.key=a.types.stringLiteral(t.name)}}}}}}));t["default"]=n},119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(1017);var n=r(8304);var o=(0,s.declare)((e=>{e.assertVersion(7);function addDisplayName(e,t){const r=t.arguments[0].properties;let s=true;for(let e=0;ee.name==="createReactClass";function isCreateClass(e){if(!e||!n.types.isCallExpression(e))return false;if(!t(e.callee)&&!isCreateClassAddon(e.callee)){return false}const r=e.arguments;if(r.length!==1)return false;const s=r[0];if(!n.types.isObjectExpression(s))return false;return true}return{name:"transform-react-display-name",visitor:{ExportDefaultDeclaration({node:e},t){if(isCreateClass(e.declaration)){const r=t.filename||"unknown";let s=a.basename(r,a.extname(r));if(s==="index"){s=a.basename(a.dirname(r))}addDisplayName(s,e.declaration)}},CallExpression(e){const{node:t}=e;if(!isCreateClass(t))return;let r;e.find((function(e){if(e.isAssignmentExpression()){r=e.node.left}else if(e.isObjectProperty()){r=e.node.key}else if(e.isVariableDeclarator()){r=e.node.id}else if(e.isStatement()){return true}if(r)return true}));if(!r)return;if(n.types.isMemberExpression(r)){r=r.property}if(n.types.isIdentifier(r)){addDisplayName(r.name,t)}}}}}));t["default"]=o},1638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.default}});var s=r(8350)},297:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=createPlugin;var s=r(6140);var a=r(6454);var n=r(8304);var o=r(2056);var i=r(5346);const l={importSource:"react",runtime:"automatic",pragma:"React.createElement",pragmaFrag:"React.Fragment"};const c=/\*?\s*@jsxImportSource\s+([^\s]+)/;const u=/\*?\s*@jsxRuntime\s+([^\s]+)/;const p=/\*?\s*@jsx\s+([^\s]+)/;const d=/\*?\s*@jsxFrag\s+([^\s]+)/;const get=(e,t)=>e.get(`@babel/plugin-react-jsx/${t}`);const set=(e,t,r)=>e.set(`@babel/plugin-react-jsx/${t}`,r);function createPlugin({name:e,development:t}){return(0,a.declare)(((r,a)=>{const{pure:o,throwIfNamespace:f=true,filter:y,runtime:g=(t?"automatic":"classic"),importSource:h=l.importSource,pragma:b=l.pragma,pragmaFrag:x=l.pragmaFrag}=a;{var{useSpread:v=false,useBuiltIns:j=false}=a;if(g==="classic"){if(typeof v!=="boolean"){throw new Error("transform-react-jsx currently only accepts a boolean option for "+"useSpread (defaults to false)")}if(typeof j!=="boolean"){throw new Error("transform-react-jsx currently only accepts a boolean option for "+"useBuiltIns (defaults to false)")}if(v&&j){throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread "+"but not both")}}}const E={JSXOpeningElement(e,t){for(const t of e.get("attributes")){if(!t.isJSXElement())continue;const{name:r}=t.node.name;if(r==="__source"||r==="__self"){throw e.buildCodeFrameError(`__source and __self should not be defined in props and are reserved for internal usage.`)}}const r=n.types.jsxAttribute(n.types.jsxIdentifier("__self"),n.types.jsxExpressionContainer(n.types.thisExpression()));const s=n.types.jsxAttribute(n.types.jsxIdentifier("__source"),n.types.jsxExpressionContainer(makeSource(e,t)));e.pushContainer("attributes",[r,s])}};return{name:e,inherits:s.default,visitor:{JSXNamespacedName(e){if(f){throw e.buildCodeFrameError(`Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set \`throwIfNamespace: false\` to bypass this warning.`)}},JSXSpreadChild(e){throw e.buildCodeFrameError("Spread children are not supported in React.")},Program:{enter(e,r){const{file:s}=r;let o=g;let i=h;let f=b;let y=x;let v=!!a.importSource;let j=!!a.pragma;let w=!!a.pragmaFrag;if(s.ast.comments){for(const e of s.ast.comments){const t=c.exec(e.value);if(t){i=t[1];v=true}const r=u.exec(e.value);if(r){o=r[1]}const s=p.exec(e.value);if(s){f=s[1];j=true}const a=d.exec(e.value);if(a){y=a[1];w=true}}}set(r,"runtime",o);if(o==="classic"){if(v){throw e.buildCodeFrameError(`importSource cannot be set when runtime is classic.`)}const t=toMemberExpression(f);const s=toMemberExpression(y);set(r,"id/createElement",(()=>n.types.cloneNode(t)));set(r,"id/fragment",(()=>n.types.cloneNode(s)));set(r,"defaultPure",f===l.pragma)}else if(o==="automatic"){if(j||w){throw e.buildCodeFrameError(`pragma and pragmaFrag cannot be set when runtime is automatic.`)}const define=(t,s)=>set(r,t,createImportLazily(r,e,s,i));define("id/jsx",t?"jsxDEV":"jsx");define("id/jsxs",t?"jsxDEV":"jsxs");define("id/createElement","createElement");define("id/fragment","Fragment");set(r,"defaultPure",i===l.importSource)}else{throw e.buildCodeFrameError(`Runtime must be either "classic" or "automatic".`)}if(t){e.traverse(E,r)}}},JSXElement:{exit(e,t){let r;if(get(t,"runtime")==="classic"||shouldUseCreateElement(e)){r=buildCreateElementCall(e,t)}else{r=buildJSXElementCall(e,t)}e.replaceWith(n.types.inherits(r,e.node))}},JSXFragment:{exit(e,t){let r;if(get(t,"runtime")==="classic"){r=buildCreateElementFragmentCall(e,t)}else{r=buildJSXFragmentCall(e,t)}e.replaceWith(n.types.inherits(r,e.node))}},JSXAttribute(e){if(n.types.isJSXElement(e.node.value)){e.node.value=n.types.jsxExpressionContainer(e.node.value)}}}};function call(e,t,r){const s=n.types.callExpression(get(e,`id/${t}`)(),r);if(o!=null?o:get(e,"defaultPure"))(0,i.default)(s);return s}function shouldUseCreateElement(e){const t=e.get("openingElement");const r=t.node.attributes;let s=false;for(let e=0;e1){t=n.types.arrayExpression(e)}else{return undefined}return n.types.objectProperty(n.types.identifier("children"),t)}function buildJSXElementCall(e,r){const s=e.get("openingElement");const a=[getTag(s)];const o=[];const i=Object.create(null);for(const t of s.get("attributes")){if(t.isJSXAttribute()&&n.types.isJSXIdentifier(t.node.name)){const{name:r}=t.node.name;switch(r){case"__source":case"__self":if(i[r])throw sourceSelfError(e,r);case"key":{const e=convertAttributeValue(t.node.value);if(e===null){throw t.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.')}i[r]=e;break}default:o.push(t)}}else{o.push(t)}}const l=n.types.react.buildChildren(e.node);let c;if(o.length||l.length){c=buildJSXOpeningElementAttributes(o,r,l)}else{c=n.types.objectExpression([])}a.push(c);if(t){var u,p,d;a.push((u=i.key)!=null?u:e.scope.buildUndefinedNode(),n.types.booleanLiteral(l.length>1),(p=i.__source)!=null?p:e.scope.buildUndefinedNode(),(d=i.__self)!=null?d:n.types.thisExpression())}else if(i.key!==undefined){a.push(i.key)}return call(r,l.length>1?"jsxs":"jsx",a)}function buildJSXOpeningElementAttributes(e,t,r){const s=e.reduce(accumulateAttribute,[]);if((r==null?void 0:r.length)>0){s.push(buildChildrenProperty(r))}return n.types.objectExpression(s)}function buildJSXFragmentCall(e,r){const s=[get(r,"id/fragment")()];const a=n.types.react.buildChildren(e.node);s.push(n.types.objectExpression(a.length>0?[buildChildrenProperty(a)]:[]));if(t){s.push(e.scope.buildUndefinedNode(),n.types.booleanLiteral(a.length>1))}return call(r,a.length>1?"jsxs":"jsx",s)}function buildCreateElementFragmentCall(e,t){if(y&&!y(e.node,t))return;return call(t,"createElement",[get(t,"id/fragment")(),n.types.nullLiteral(),...n.types.react.buildChildren(e.node)])}function buildCreateElementCall(e,t){const r=e.get("openingElement");return call(t,"createElement",[getTag(r),buildCreateElementOpeningElementAttributes(t,e,r.get("attributes")),...n.types.react.buildChildren(e.node)])}function getTag(e){const t=convertJSXIdentifier(e.node.name,e.node);let r;if(n.types.isIdentifier(t)){r=t.name}else if(n.types.isLiteral(t)){r=t.value}if(n.types.react.isCompatTag(r)){return n.types.stringLiteral(r)}else{return t}}function buildCreateElementOpeningElementAttributes(e,t,r){const s=get(e,"runtime");{if(s!=="automatic"){const t=[];const s=r.reduce(accumulateAttribute,[]);if(!v){let e=0;s.forEach(((r,a)=>{if(n.types.isSpreadElement(r)){if(a>e){t.push(n.types.objectExpression(s.slice(e,a)))}t.push(r.argument);e=a+1}}));if(s.length>e){t.push(n.types.objectExpression(s.slice(e)))}}else if(s.length){t.push(n.types.objectExpression(s))}if(!t.length){return n.types.nullLiteral()}if(t.length===1){return t[0]}if(!n.types.isObjectExpression(t[0])){t.unshift(n.types.objectExpression([]))}const a=j?n.types.memberExpression(n.types.identifier("Object"),n.types.identifier("assign")):e.addHelper("extends");return n.types.callExpression(a,t)}}const a=[];const o=Object.create(null);for(const e of r){const r=n.types.isJSXAttribute(e)&&n.types.isJSXIdentifier(e.name)&&e.name.name;if(s==="automatic"&&(r==="__source"||r==="__self")){if(o[r])throw sourceSelfError(t,r);o[r]=true}accumulateAttribute(a,e)}return a.length===1&&n.types.isSpreadElement(a[0])?a[0].argument:a.length>0?n.types.objectExpression(a):n.types.nullLiteral()}}));function getSource(e,r){switch(r){case"Fragment":return`${e}/${t?"jsx-dev-runtime":"jsx-runtime"}`;case"jsxDEV":return`${e}/jsx-dev-runtime`;case"jsx":case"jsxs":return`${e}/jsx-runtime`;case"createElement":return e}}function createImportLazily(e,t,r,s){return()=>{const a=getSource(s,r);if((0,o.isModule)(t)){let s=get(e,`imports/${r}`);if(s)return n.types.cloneNode(s);s=(0,o.addNamed)(t,r,a,{importedInterop:"uncompiled",importPosition:"after"});set(e,`imports/${r}`,s);return s}else{let s=get(e,`requires/${a}`);if(s){s=n.types.cloneNode(s)}else{s=(0,o.addNamespace)(t,a,{importedInterop:"uncompiled"});set(e,`requires/${a}`,s)}return n.types.memberExpression(s,n.types.identifier(r))}}}}function toMemberExpression(e){return e.split(".").map((e=>n.types.identifier(e))).reduce(((e,t)=>n.types.memberExpression(e,t)))}function makeSource(e,t){const r=e.node.loc;if(!r){return e.scope.buildUndefinedNode()}if(!t.fileNameIdentifier){const{filename:r=""}=t;const s=e.scope.generateUidIdentifier("_jsxFileName");const a=e.hub.getScope();if(a){a.push({id:s,init:n.types.stringLiteral(r)})}t.fileNameIdentifier=s}return makeTrace(n.types.cloneNode(t.fileNameIdentifier),r.start.line,r.start.column)}function makeTrace(e,t,r){const s=t!=null?n.types.numericLiteral(t):n.types.nullLiteral();const a=r!=null?n.types.numericLiteral(r+1):n.types.nullLiteral();const o=n.types.objectProperty(n.types.identifier("fileName"),e);const i=n.types.objectProperty(n.types.identifier("lineNumber"),s);const l=n.types.objectProperty(n.types.identifier("columnNumber"),a);return n.types.objectExpression([o,i,l])}function sourceSelfError(e,t){const r=`transform-react-jsx-${t.slice(2)}`;return e.buildCodeFrameError(`Duplicate ${t} prop found. You are most likely using the deprecated ${r} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`)}},8350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(297);var a=(0,s.default)({name:"transform-react-jsx/development",development:true});t["default"]=a},3863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(297);var a=(0,s.default)({name:"transform-react-jsx",development:false});t["default"]=a},8536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(5346);var n=r(8304);const o=new Map([["react",["cloneElement","createContext","createElement","createFactory","createRef","forwardRef","isValidElement","memo","lazy"]],["react-dom",["createPortal"]]]);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-react-pure-annotations",visitor:{CallExpression(e){if(isReactCall(e)){(0,a.default)(e)}}}}}));t["default"]=i;function isReactCall(e){if(!n.types.isMemberExpression(e.node.callee)){const t=e.get("callee");for(const[e,r]of o){for(const s of r){if(t.referencesImport(e,s)){return true}}}return false}for(const[t,r]of o){const s=e.get("callee.object");if(s.referencesImport(t,"default")||s.referencesImport(t,"*")){for(const t of r){if(n.types.isIdentifier(e.node.callee.property,{name:t})){return true}}return false}}return false}},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(4982);var n=(0,s.declare)((({types:e,assertVersion:t})=>{t(7);return{name:"transform-regenerator",inherits:a.default,visitor:{MemberExpression(t){var r;if(!((r=this.availableHelper)!=null&&r.call(this,"regeneratorRuntime"))){return}const s=t.get("object");if(s.isIdentifier({name:"regeneratorRuntime"})){const t=this.addHelper("regeneratorRuntime");if(e.isArrowFunctionExpression(t)){s.replaceWith(t.body);return}s.replaceWith(e.callExpression(t,[]))}}}}}));t["default"]=n},519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-reserved-words",visitor:{"BindingIdentifier|ReferencedIdentifier"(e){if(!a.types.isValidES3Identifier(e.node.name)){e.scope.rename(e.node.name)}}}}}));t["default"]=n},1631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.resolveFSPath=resolveFSPath;var s=r(1017);var a=r(8188);function _default(e,t,r){if(r===false)return e;return resolveAbsoluteRuntime(e,s.resolve(t,r===true?".":r))}function resolveAbsoluteRuntime(e,t){try{return s.dirname((((e,t)=>(e=e.split("."),t=t.split("."),+e[0]>+t[0]||e[0]==t[0]&&+e[1]>=+t[1]))(process.versions.node,"8.9")?require.resolve:(e,{paths:[t]},s=r(8188))=>{let a=s._findPath(e,s._nodeModulePaths(t).concat(t));if(a)return a;a=new Error(`Cannot resolve module '${e}'`);a.code="MODULE_NOT_FOUND";throw a})(`${e}/package.json`,{paths:[t]})).replace(/\\/g,"/")}catch(r){if(r.code!=="MODULE_NOT_FOUND")throw r;throw Object.assign(new Error(`Failed to resolve "${e}" relative to "${t}"`),{code:"BABEL_RUNTIME_NOT_FOUND",runtime:e,dirname:t})}}function resolveFSPath(e){return require.resolve(e).replace(/\\/g,"/")}},5092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasMinVersion=hasMinVersion;var s=r(7849);function hasMinVersion(e,t){if(!t)return true;if(s.valid(t))t=`^${t}`;return!s.intersects(`<${e}`,t)&&!s.intersects(`>=8.0.0`,t)}},2179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8123);var a=r(2056);var n=r(8304);var o=r(5092);var i=r(1631);var l=r(9068);var c=r(6619);var u=r(6880);const p=l.default||l;const d=c.default||c;const f=u.default||u;const y="#__secret_key__@babel/runtime__compatibility";function supportsStaticESM(e){return!!(e!=null&&e.supportsStaticESM)}var g=(0,s.declare)(((e,t,r)=>{e.assertVersion(7);const{corejs:s,helpers:l=true,regenerator:c=true,useESModules:u=false,version:g="7.0.0-beta.0",absoluteRuntime:h=false}=t;let b=false;let x;if(typeof s==="object"&&s!==null){x=s.version;b=Boolean(s.proposals)}else{x=s}const v=x?Number(x):false;if(![false,2,3].includes(v)){throw new Error(`The \`core-js\` version must be false, 2 or 3, but got ${JSON.stringify(x)}.`)}if(b&&(!v||v<3)){throw new Error("The 'proposals' option is only supported when using 'corejs: 3'")}if(typeof c!=="boolean"){throw new Error("The 'regenerator' option must be undefined, or a boolean.")}if(typeof l!=="boolean"){throw new Error("The 'helpers' option must be undefined, or a boolean.")}if(typeof u!=="boolean"&&u!=="auto"){throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'.")}if(typeof h!=="boolean"&&typeof h!=="string"){throw new Error("The 'absoluteRuntime' option must be undefined, a boolean, or a string.")}if(typeof g!=="string"){throw new Error(`The 'version' option must be a version string.`)}{const e="7.13.0";var j=(0,o.hasMinVersion)(e,g)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}if(has(t,"useBuiltIns")){if(t["useBuiltIns"]){throw new Error("The 'useBuiltIns' option has been removed. The @babel/runtime "+"module now uses builtins by default.")}else{throw new Error("The 'useBuiltIns' option has been removed. Use the 'corejs'"+"option to polyfill with `core-js` via @babel/runtime.")}}if(has(t,"polyfill")){if(t["polyfill"]===false){throw new Error("The 'polyfill' option has been removed. The @babel/runtime "+"module now skips polyfilling by default.")}else{throw new Error("The 'polyfill' option has been removed. Use the 'corejs'"+"option to polyfill with `core-js` via @babel/runtime.")}}if(has(t,"moduleName")){throw new Error("The 'moduleName' option has been removed. @babel/transform-runtime "+"no longer supports arbitrary runtimes. If you were using this to "+"set an absolute path for Babel's standard runtimes, please use the "+"'absoluteRuntime' option.")}const E=u==="auto"?e.caller(supportsStaticESM):u;const w=v===2;const _=v===3;const S=_?"@babel/runtime-corejs3":w?"@babel/runtime-corejs2":"@babel/runtime";const k=["interopRequireWildcard","interopRequireDefault"];const I=(0,i.default)(S,r,h);function createCorejsPlgin(e,t,r){return(s,a,n)=>Object.assign({},e(s,t,n),{inherits:r})}function createRegeneratorPlugin(e){if(!c)return undefined;return(t,r,s)=>f(t,e,s)}return{name:"transform-runtime",inherits:w?createCorejsPlgin(p,{method:"usage-pure",absoluteImports:h?I:false,[y]:{runtimeVersion:g,useBabelRuntime:I,ext:""}},createRegeneratorPlugin({method:"usage-pure",absoluteImports:h?I:false,[y]:{useBabelRuntime:I}})):_?createCorejsPlgin(d,{method:"usage-pure",version:3,proposals:b,absoluteImports:h?I:false,[y]:{useBabelRuntime:I,ext:""}},createRegeneratorPlugin({method:"usage-pure",absoluteImports:h?I:false,[y]:{useBabelRuntime:I}})):createRegeneratorPlugin({method:"usage-pure",absoluteImports:h?I:false,[y]:{useBabelRuntime:I}}),pre(e){if(!l)return;e.set("helperGenerator",(t=>{if(!(e.availableHelper!=null&&e.availableHelper(t,g))){if(t==="regeneratorRuntime"){return n.types.arrowFunctionExpression([],n.types.identifier("regeneratorRuntime"))}return}const r=k.indexOf(t)!==-1;const s=r&&!(0,a.isModule)(e.path)?4:undefined;const o=E&&e.path.node.sourceType==="module"?"helpers/esm":"helpers";let l=`${I}/${o}/${t}`;if(h)l=(0,i.resolveFSPath)(l);return addDefaultImport(l,t,s,true)}));const t=new Map;function addDefaultImport(r,s,o,i=false){const l=(0,a.isModule)(e.path);const c=`${r}:${s}:${l||""}`;let u=t.get(c);if(u){u=n.types.cloneNode(u)}else{u=(0,a.addDefault)(e.path,r,{importedInterop:i&&j?"compiled":"uncompiled",nameHint:s,blockHoist:o});t.set(c,u)}return u}}}}));t["default"]=g},4674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-shorthand-properties",visitor:{ObjectMethod(e){const{node:t}=e;if(t.kind==="method"){const r=a.types.functionExpression(null,t.params,t.body,t.generator,t.async);r.returnType=t.returnType;const s=a.types.toComputedKey(t);if(a.types.isStringLiteral(s,{value:"__proto__"})){e.replaceWith(a.types.objectProperty(s,r,true))}else{e.replaceWith(a.types.objectProperty(t.key,r,t.computed))}}},ObjectProperty(e){const{node:t}=e;if(t.shorthand){const r=a.types.toComputedKey(t);if(a.types.isStringLiteral(r,{value:"__proto__"})){e.replaceWith(a.types.objectProperty(r,t.value,true))}else{t.shorthand=false}}}}}}));t["default"]=n},6342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(9692);var n=r(8304);var o=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const o=(r=e.assumption("iterableIsArray"))!=null?r:t.loose;const i=(s=t.allowArrayLike)!=null?s:e.assumption("arrayLikeIsIterable");function getSpreadLiteral(e,t){if(o&&!n.types.isIdentifier(e.argument,{name:"arguments"})){return e.argument}else{return t.toArray(e.argument,true,i)}}function hasHole(e){return e.elements.some((e=>e===null))}function hasSpread(e){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-sticky-regex",visitor:{RegExpLiteral(e){const{node:t}=e;if(!t.flags.includes("y"))return;e.replaceWith(a.types.newExpression(a.types.identifier("RegExp"),[a.types.stringLiteral(t.pattern),a.types.stringLiteral(t.flags)]))}}}}));t["default"]=n},1912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const n=(r=e.assumption("ignoreToPrimitiveHint"))!=null?r:t.loose;const o=(s=e.assumption("mutableTemplateObject"))!=null?s:t.loose;let i="taggedTemplateLiteral";if(o)i+="Loose";function buildConcatCallExpressions(e){let t=true;return e.reduce((function(e,r){let s=a.types.isLiteral(r);if(!s&&t){s=true;t=false}if(s&&a.types.isCallExpression(e)){e.arguments.push(r);return e}return a.types.callExpression(a.types.memberExpression(e,a.types.identifier("concat")),[r])}))}return{name:"transform-template-literals",visitor:{TaggedTemplateExpression(e){const{node:t}=e;const{quasi:r}=t;const s=[];const n=[];let o=true;for(const t of r.quasis){const{raw:r,cooked:i}=t.value;const l=i==null?e.scope.buildUndefinedNode():a.types.stringLiteral(i);s.push(l);n.push(a.types.stringLiteral(r));if(r!==i){o=false}}const l=[a.types.arrayExpression(s)];if(!o){l.push(a.types.arrayExpression(n))}const c=e.scope.generateUidIdentifier("templateObject");e.scope.getProgramParent().push({id:a.types.cloneNode(c)});e.replaceWith(a.types.callExpression(t.tag,[a.template.expression.ast` + `}}n.loc=r.loc;l.push(n);l.push(...(0,a.buildNamespaceInitStatements)(i,r,j))}(0,a.ensureStatementsHoisted)(l);e.unshiftContainer("body",l);e.get("body").forEach((e=>{if(l.indexOf(e.node)===-1)return;if(e.isVariableDeclaration()){e.scope.registerDeclaration(e)}}))}}}}}));t["default"]=l},5185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.getExportSpecifierName=getExportSpecifierName;var s=r(6454);var a=r(3959);var n=r(8304);var o=r(9261);var i=r(108);var l=r(8162);const c=n.template.statement(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n "use strict";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n`);const u=n.template.statement(`\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`);const p=`WARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n`;const d=null&&`ERROR: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8\n no longer transforms import() without using that plugin.\n`;function getExportSpecifierName(e,t){if(e.type==="Identifier"){return e.name}else if(e.type==="StringLiteral"){const r=e.value;if(!(0,l.isIdentifierName)(r)){t.add(r)}return r}else{throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${e.type}`)}}function constructExportCall(e,t,r,s,a,o){const i=[];if(!a){if(r.length===1){i.push(n.types.expressionStatement(n.types.callExpression(t,[n.types.stringLiteral(r[0]),s[0]])))}else{const e=[];for(let t=0;t{e.assertVersion(7);const{systemGlobal:r="System",allowTopLevelThis:s=false}=t;const l=new WeakSet;const u={"AssignmentExpression|UpdateExpression"(e){if(l.has(e.node))return;l.add(e.node);const t=e.isAssignmentExpression()?e.get("left"):e.get("argument");if(t.isObjectPattern()||t.isArrayPattern()){const r=[e.node];for(const s of Object.keys(t.getBindingIdentifiers())){if(this.scope.getBinding(s)!==e.scope.getBinding(s)){return}const t=this.exports[s];if(!t)return;for(const e of t){r.push(this.buildCall(e,n.types.identifier(s)).expression)}}e.replaceWith(n.types.sequenceExpression(r));return}if(!t.isIdentifier())return;const r=t.node.name;if(this.scope.getBinding(r)!==e.scope.getBinding(r))return;const s=this.exports[r];if(!s)return;let a=e.node;const o=n.types.isUpdateExpression(a,{prefix:false});if(o){a=n.types.binaryExpression(a.operator[0],n.types.unaryExpression("+",n.types.cloneNode(a.argument)),n.types.numericLiteral(1))}for(const e of s){a=this.buildCall(e,a).expression}if(o){a=n.types.sequenceExpression([a,e.node])}e.replaceWith(a)}};return{name:"transform-modules-systemjs",pre(){this.file.set("@babel/plugin-transform-modules-*","systemjs")},visitor:{CallExpression(e,t){if(n.types.isImport(e.node.callee)){if(!this.file.has("@babel/plugin-proposal-dynamic-import")){{console.warn(p)}}e.replaceWith(n.types.callExpression(n.types.memberExpression(n.types.identifier(t.contextIdent),n.types.identifier("import")),[(0,o.getImportSource)(n.types,e.node)]))}},MetaProperty(e,t){if(e.node.meta.name==="import"&&e.node.property.name==="meta"){e.replaceWith(n.types.memberExpression(n.types.identifier(t.contextIdent),n.types.identifier("meta")))}},ReferencedIdentifier(e,t){if(e.node.name==="__moduleName"&&!e.scope.hasBinding("__moduleName")){e.replaceWith(n.types.memberExpression(n.types.identifier(t.contextIdent),n.types.identifier("id")))}},Program:{enter(e,t){t.contextIdent=e.scope.generateUid("context");t.stringSpecifiers=new Set;if(!s){(0,i.rewriteThis)(e)}},exit(e,s){const o=e.scope;const l=o.generateUid("export");const{contextIdent:p,stringSpecifiers:d}=s;const f=Object.create(null);const y=[];const g=[];const h=[];const b=[];const x=[];const v=[];function addExportName(e,t){f[e]=f[e]||[];f[e].push(t)}function pushModule(e,t,r){let s;y.forEach((function(t){if(t.key===e){s=t}}));if(!s){y.push(s={key:e,imports:[],exports:[]})}s[t]=s[t].concat(r)}function buildExportCall(e,t){return n.types.expressionStatement(n.types.callExpression(n.types.identifier(l),[n.types.stringLiteral(e),t]))}const j=[];const E=[];const w=e.get("body");for(const e of w){if(e.isFunctionDeclaration()){g.push(e.node);v.push(e)}else if(e.isClassDeclaration()){x.push(n.types.cloneNode(e.node.id));e.replaceWith(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.cloneNode(e.node.id),n.types.toExpression(e.node))))}else if(e.isVariableDeclaration()){e.node.kind="var"}else if(e.isImportDeclaration()){const t=e.node.source.value;pushModule(t,"imports",e.node.specifiers);for(const t of Object.keys(e.getBindingIdentifiers())){o.removeBinding(t);x.push(n.types.identifier(t))}e.remove()}else if(e.isExportAllDeclaration()){pushModule(e.node.source.value,"exports",e.node);e.remove()}else if(e.isExportDefaultDeclaration()){const t=e.get("declaration");if(t.isClassDeclaration()){const r=t.node.id;if(r){j.push("default");E.push(o.buildUndefinedNode());x.push(n.types.cloneNode(r));addExportName(r.name,"default");e.replaceWith(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.cloneNode(r),n.types.toExpression(t.node))))}else{j.push("default");E.push(n.types.toExpression(t.node));v.push(e)}}else if(t.isFunctionDeclaration()){const r=t.node.id;if(r){g.push(t.node);j.push("default");E.push(n.types.cloneNode(r));addExportName(r.name,"default")}else{j.push("default");E.push(n.types.toExpression(t.node))}v.push(e)}else{e.replaceWith(buildExportCall("default",t.node))}}else if(e.isExportNamedDeclaration()){const t=e.get("declaration");if(t.node){e.replaceWith(t);if(t.isFunction()){const r=t.node;const s=r.id.name;addExportName(s,s);g.push(r);j.push(s);E.push(n.types.cloneNode(r.id));v.push(e)}else if(t.isClass()){const r=t.node.id.name;j.push(r);E.push(o.buildUndefinedNode());x.push(n.types.cloneNode(t.node.id));e.replaceWith(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.cloneNode(t.node.id),n.types.toExpression(t.node))));addExportName(r,r)}else{if(t.isVariableDeclaration()){t.node.kind="var"}for(const e of Object.keys(t.getBindingIdentifiers())){addExportName(e,e)}}}else{const t=e.node.specifiers;if(t!=null&&t.length){if(e.node.source){pushModule(e.node.source.value,"exports",t);e.remove()}else{const r=[];for(const e of t){const{local:t,exported:s}=e;const a=o.getBinding(t.name);const i=getExportSpecifierName(s,d);if(a&&n.types.isFunctionDeclaration(a.path.node)){j.push(i);E.push(n.types.cloneNode(t))}else if(!a){r.push(buildExportCall(i,t))}addExportName(t.name,i)}e.replaceWithMultiple(r)}}else{e.remove()}}}}y.forEach((function(t){const r=[];const s=o.generateUid(t.key);for(let e of t.imports){if(n.types.isImportNamespaceSpecifier(e)){r.push(n.types.expressionStatement(n.types.assignmentExpression("=",e.local,n.types.identifier(s))))}else if(n.types.isImportDefaultSpecifier(e)){e=n.types.importSpecifier(e.local,n.types.identifier("default"))}if(n.types.isImportSpecifier(e)){const{imported:t}=e;r.push(n.types.expressionStatement(n.types.assignmentExpression("=",e.local,n.types.memberExpression(n.types.identifier(s),e.imported,t.type==="StringLiteral"))))}}if(t.exports.length){const a=[];const o=[];let i=false;for(const e of t.exports){if(n.types.isExportAllDeclaration(e)){i=true}else if(n.types.isExportSpecifier(e)){const t=getExportSpecifierName(e.exported,d);a.push(t);o.push(n.types.memberExpression(n.types.identifier(s),e.local,n.types.isStringLiteral(e.local)))}else{}}r.push(...constructExportCall(e,n.types.identifier(l),a,o,i?n.types.identifier(s):null,d))}b.push(n.types.stringLiteral(t.key));h.push(n.types.functionExpression(null,[n.types.identifier(s)],n.types.blockStatement(r)))}));let _=(0,i.getModuleName)(this.file.opts,t);if(_)_=n.types.stringLiteral(_);(0,a.default)(e,((e,t,r)=>{x.push(e);if(!r&&t in f){for(const e of f[t]){j.push(e);E.push(o.buildUndefinedNode())}}}));if(x.length){g.unshift(n.types.variableDeclaration("var",x.map((e=>n.types.variableDeclarator(e)))))}if(j.length){g.push(...constructExportCall(e,n.types.identifier(l),j,E,null,d))}e.traverse(u,{exports:f,buildCall:buildExportCall,scope:o});for(const e of v){e.remove()}let S=false;e.traverse({AwaitExpression(e){S=true;e.stop()},Function(e){e.skip()},noScope:true});e.node.body=[c({SYSTEM_REGISTER:n.types.memberExpression(n.types.identifier(r),n.types.identifier("register")),BEFORE_BODY:g,MODULE_NAME:_,SETTERS:n.types.arrayExpression(h),EXECUTE:n.types.functionExpression(null,[],n.types.blockStatement(e.node.body),false,S),SOURCES:n.types.arrayExpression(b),EXPORT_IDENTIFIER:n.types.identifier(l),CONTEXT_IDENTIFIER:n.types.identifier(p)})]}}}}}));t["default"]=f},272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(1017);var n=r(108);var o=r(8304);const i=(0,o.template)(`\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n`);const l=(0,o.template)(`\n (function (global, factory) {\n if (typeof define === "function" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== "undefined") {\n factory(COMMONJS_ARGUMENTS);\n } else {\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n\n GLOBAL_TO_ASSIGN;\n }\n })(\n typeof globalThis !== "undefined" ? globalThis\n : typeof self !== "undefined" ? self\n : this,\n function(IMPORT_NAMES) {\n })\n`);var c=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const{globals:c,exactGlobals:u,allowTopLevelThis:p,strict:d,strictMode:f,noInterop:y,importInterop:g}=t;const h=(r=e.assumption("constantReexports"))!=null?r:t.loose;const b=(s=e.assumption("enumerableModuleMeta"))!=null?s:t.loose;function buildBrowserInit(e,t,r,s){const n=s?s.value:(0,a.basename)(r,(0,a.extname)(r));let l=o.types.memberExpression(o.types.identifier("global"),o.types.identifier(o.types.toIdentifier(n)));let c=[];if(t){const t=e[n];if(t){c=[];const e=t.split(".");l=e.slice(1).reduce(((e,t)=>{c.push(i({GLOBAL_REFERENCE:o.types.cloneNode(e)}));return o.types.memberExpression(e,o.types.identifier(t))}),o.types.memberExpression(o.types.identifier("global"),o.types.identifier(e[0])))}}c.push(o.types.expressionStatement(o.types.assignmentExpression("=",l,o.types.memberExpression(o.types.identifier("mod"),o.types.identifier("exports")))));return c}function buildBrowserArg(e,t,r){let s;if(t){const t=e[r];if(t){s=t.split(".").reduce(((e,t)=>o.types.memberExpression(e,o.types.identifier(t))),o.types.identifier("global"))}else{s=o.types.memberExpression(o.types.identifier("global"),o.types.identifier(o.types.toIdentifier(r)))}}else{const t=(0,a.basename)(r,(0,a.extname)(r));const n=e[t]||t;s=o.types.memberExpression(o.types.identifier("global"),o.types.identifier(o.types.toIdentifier(n)))}return s}return{name:"transform-modules-umd",visitor:{Program:{exit(e){if(!(0,n.isModule)(e))return;const r=c||{};let s=(0,n.getModuleName)(this.file.opts,t);if(s)s=o.types.stringLiteral(s);const{meta:a,headers:i}=(0,n.rewriteModuleStatementsAndPrepareHeader)(e,{constantReexports:h,enumerableModuleMeta:b,strict:d,strictMode:f,allowTopLevelThis:p,noInterop:y,importInterop:g,filename:this.file.opts.filename});const x=[];const v=[];const j=[];const E=[];if((0,n.hasExports)(a)){x.push(o.types.stringLiteral("exports"));v.push(o.types.identifier("exports"));j.push(o.types.memberExpression(o.types.identifier("mod"),o.types.identifier("exports")));E.push(o.types.identifier(a.exportName))}for(const[t,s]of a.source){x.push(o.types.stringLiteral(t));v.push(o.types.callExpression(o.types.identifier("require"),[o.types.stringLiteral(t)]));j.push(buildBrowserArg(r,u,t));E.push(o.types.identifier(s.name));if(!(0,n.isSideEffectImport)(s)){const t=(0,n.wrapInterop)(e,o.types.identifier(s.name),s.interop);if(t){const e=o.types.expressionStatement(o.types.assignmentExpression("=",o.types.identifier(s.name),t));e.loc=a.loc;i.push(e)}}i.push(...(0,n.buildNamespaceInitStatements)(a,s,h))}(0,n.ensureStatementsHoisted)(i);e.unshiftContainer("body",i);const{body:w,directives:_}=e.node;e.node.directives=[];e.node.body=[];const S=e.pushContainer("body",[l({MODULE_NAME:s,AMD_ARGUMENTS:o.types.arrayExpression(x),COMMONJS_ARGUMENTS:v,BROWSER_ARGUMENTS:j,IMPORT_NAMES:E,GLOBAL_TO_ASSIGN:buildBrowserInit(r,u,this.filename||"unknown",s)})])[0];const k=S.get("expression.arguments")[1].get("body");k.pushContainer("directives",_);k.pushContainer("body",w)}}}}}));t["default"]=c},1570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(2449);var a=r(6454);var n=(0,a.declare)(((e,t)=>{const{runtime:r=true}=t;if(typeof r!=="boolean"){throw new Error("The 'runtime' option must be boolean")}return(0,s.createRegExpFeaturePlugin)({name:"transform-named-capturing-groups-regex",feature:"namedCaptureGroups",options:{runtime:r}})}));t["default"]=n},7429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-new-target",visitor:{MetaProperty(e){const t=e.get("meta");const r=e.get("property");const{scope:s}=e;if(t.isIdentifier({name:"new"})&&r.isIdentifier({name:"target"})){const t=e.findParent((e=>{if(e.isClass())return true;if(e.isFunction()&&!e.isArrowFunctionExpression()){if(e.isClassMethod({kind:"constructor"})){return false}return true}return false}));if(!t){throw e.buildCodeFrameError("new.target must be under a (non-arrow) function or a class.")}const{node:r}=t;if(a.types.isMethod(r)){e.replaceWith(s.buildUndefinedNode());return}if(!r.id){r.id=s.generateUidIdentifier("target")}const n=a.types.memberExpression(a.types.thisExpression(),a.types.identifier("constructor"));if(t.isClass()){e.replaceWith(n);return}e.replaceWith(a.types.conditionalExpression(a.types.binaryExpression("instanceof",a.types.thisExpression(),a.types.cloneNode(r.id)),n,s.buildUndefinedNode()))}}}}}));t["default"]=n},3403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(7328);var n=r(8304);function replacePropertySuper(e,t,r){const s=new a.default({getObjectRef:t,methodPath:e,file:r});s.replace()}var o=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-object-super",visitor:{ObjectExpression(e,t){let r;const getObjectRef=()=>r=r||e.scope.generateUidIdentifier("obj");e.get("properties").forEach((e=>{if(!e.isMethod())return;replacePropertySuper(e,getObjectRef,t)}));if(r){e.scope.push({id:n.types.cloneNode(r)});e.replaceWith(n.types.assignmentExpression("=",n.types.cloneNode(r),e.node))}}}}}));t["default"]=o},4141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"convertFunctionParams",{enumerable:true,get:function(){return a.default}});t["default"]=void 0;var s=r(6454);var a=r(6650);var n=r(1839);var o=(0,s.declare)(((e,t)=>{var r;e.assertVersion(7);const s=(r=e.assumption("ignoreFunctionLength"))!=null?r:t.loose;const o=e.assumption("noNewArrows");return{name:"transform-parameters",visitor:{Function(e){if(e.isArrowFunctionExpression()&&e.get("params").some((e=>e.isRestElement()||e.isAssignmentPattern()))){e.arrowFunctionToExpression({noNewArrows:o})}const t=(0,n.default)(e);const r=(0,a.default)(e,s);if(t||r){e.scope.crawl()}}}}}));t["default"]=o},6650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionParams;var s=r(8304);const a=(0,s.template)(`\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n`);const n=(0,s.template)(`\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n`);const o=(0,s.template)(`\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);const i=(0,s.template)(`\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);const l={"ReferencedIdentifier|BindingIdentifier"(e,t){const{scope:r,node:s}=e;const{name:a}=s;if(a==="eval"||r.getBinding(a)===t.scope.parent.getBinding(a)&&t.scope.hasOwnBinding(a)){t.needsOuterBinding=true;e.stop()}},"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration":e=>e.skip()};function convertFunctionParams(e,t,r,c){const u=e.get("params");const p=u.every((e=>e.isIdentifier()));if(p)return false;const{node:d,scope:f}=e;const y={stop:false,needsOuterBinding:false,scope:f};const g=[];const h=new Set;for(const e of u){for(const t of Object.keys(e.getBindingIdentifiers())){var b;const e=(b=f.bindings[t])==null?void 0:b.constantViolations;if(e){for(const r of e){const e=r.node;switch(e.type){case"VariableDeclarator":{if(e.init===null){const e=r.parentPath;if(!e.parentPath.isFor()||e.parentPath.get("body")===e){r.remove();break}}h.add(t);break}case"FunctionDeclaration":h.add(t);break}}}}}if(h.size===0){for(const e of u){if(!e.isIdentifier())e.traverse(l,y);if(y.needsOuterBinding)break}}let x=null;for(let l=0;l0){g.push(buildScopeIIFE(h,e.get("body").node));e.set("body",s.types.blockStatement(g));const t=e.get("body.body");const r=t[t.length-1].get("argument.callee");r.arrowFunctionToExpression();r.node.generator=e.node.generator;r.node.async=e.node.async;e.node.generator=false}else{e.get("body").unshiftContainer("body",g)}return true}function buildScopeIIFE(e,t){const r=[];const a=[];for(const t of e){r.push(s.types.identifier(t));a.push(s.types.identifier(t))}return s.types.returnStatement(s.types.callExpression(s.types.arrowFunctionExpression(a,t),r))}},1839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionRest;var s=r(8304);const a=(0,s.template)(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);const n=(0,s.template)(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);const o=(0,s.template)(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);const i=(0,s.template)(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);function referencesRest(e,t){if(e.node.name===t.name){return e.scope.bindingIdentifierEquals(t.name,t.outerBinding)}return false}const l={Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.name,t.outerBinding)){e.skip()}},Flow(e){if(e.isTypeCastExpression())return;e.skip()},Function(e,t){const r=t.noOptimise;t.noOptimise=true;e.traverse(l,t);t.noOptimise=r;e.skip()},ReferencedIdentifier(e,t){const{node:r}=e;if(r.name==="arguments"){t.deopted=true}if(!referencesRest(e,t))return;if(t.noOptimise){t.deopted=true}else{const{parentPath:s}=e;if(s.listKey==="params"&&s.key0&&s.types.isIdentifier(e.params[0],{name:"this"})){t-=1}return t}function hasRest(e){const t=e.params.length;return t>0&&s.types.isRestElement(e.params[t-1])}function optimiseIndexGetter(e,t,r){const a=s.types.numericLiteral(r);let i;if(s.types.isNumericLiteral(e.parent.property)){i=s.types.numericLiteral(e.parent.property.value+r)}else if(r===0){i=e.parent.property}else{i=s.types.binaryExpression("+",e.parent.property,s.types.cloneNode(a))}const{scope:l}=e;if(!l.isPure(i)){const r=l.generateUidIdentifierBasedOnNode(i);l.push({id:r,kind:"var"});e.parentPath.replaceWith(o({ARGUMENTS:t,OFFSET:a,INDEX:i,REF:s.types.cloneNode(r)}))}else{const r=e.parentPath;r.replaceWith(n({ARGUMENTS:t,OFFSET:a,INDEX:i}));const s=r.get("test").get("left");const o=s.evaluate();if(o.confident){if(o.value===true){r.replaceWith(r.scope.buildUndefinedNode())}else{r.get("test").replaceWith(r.get("test").get("right"))}}}}function optimiseLengthGetter(e,t,r){if(r){e.parentPath.replaceWith(i({ARGUMENTS:t,OFFSET:s.types.numericLiteral(r)}))}else{e.replaceWith(t)}}function convertFunctionRest(e){const{node:t,scope:r}=e;if(!hasRest(t))return false;let n=t.params.pop().argument;const o=s.types.identifier("arguments");if(s.types.isPattern(n)){const e=n;n=r.generateUidIdentifier("ref");const a=s.types.variableDeclaration("let",[s.types.variableDeclarator(e,n)]);t.body.body.unshift(a)}const i=getParamsCount(t);const c={references:[],offset:i,argumentsNode:o,outerBinding:r.getBindingIdentifier(n.name),candidates:[],name:n.name,deopted:false};e.traverse(l,c);if(!c.deopted&&!c.references.length){for(const{path:e,cause:t}of c.candidates){const r=s.types.cloneNode(o);switch(t){case"indexGetter":optimiseIndexGetter(e,r,c.offset);break;case"lengthGetter":optimiseLengthGetter(e,r,c.offset);break;default:e.replaceWith(r)}}return true}c.references=c.references.concat(c.candidates.map((({path:e})=>e)));const u=s.types.numericLiteral(i);const p=r.generateUidIdentifier("key");const d=r.generateUidIdentifier("len");let f,y;if(i){f=s.types.binaryExpression("-",s.types.cloneNode(p),s.types.cloneNode(u));y=s.types.conditionalExpression(s.types.binaryExpression(">",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.binaryExpression("-",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.numericLiteral(0))}else{f=s.types.identifier(p.name);y=s.types.identifier(d.name)}const g=a({ARGUMENTS:o,ARRAY_KEY:f,ARRAY_LEN:y,START:u,ARRAY:n,KEY:p,LEN:d});if(c.deopted){t.body.body.unshift(g)}else{let t=e.getEarliestCommonAncestorFrom(c.references).getStatementParent();t.findParent((e=>{if(e.isLoop()){t=e}else{return e.isFunction()}}));t.insertBefore(g)}return true}},4013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"convertFunctionParams",{enumerable:true,get:function(){return a.default}});t["default"]=void 0;var s=r(6454);var a=r(5960);var n=r(9748);var o=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const o=(r=e.assumption("ignoreFunctionLength"))!=null?r:t.loose;const i=(s=e.assumption("noNewArrows"))!=null?s:true;return{name:"transform-parameters",visitor:{Function(e){if(e.isArrowFunctionExpression()&&e.get("params").some((e=>e.isRestElement()||e.isAssignmentPattern()))){e.arrowFunctionToExpression({noNewArrows:i});if(!e.isFunctionExpression())return}const t=(0,n.default)(e);const r=(0,a.default)(e,o);if(t||r){e.scope.crawl()}}}}}));t["default"]=o},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionParams;var s=r(8304);const a=(0,s.template)(`\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n`);const n=(0,s.template)(`\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n`);const o=(0,s.template)(`\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);const i=(0,s.template)(`\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);const l={"ReferencedIdentifier|BindingIdentifier"(e,t){const{scope:r,node:s}=e;const{name:a}=s;if(a==="eval"||r.getBinding(a)===t.scope.parent.getBinding(a)&&t.scope.hasOwnBinding(a)){t.needsOuterBinding=true;e.stop()}},"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration":e=>e.skip()};function convertFunctionParams(e,t,r,c){const u=e.get("params");const p=u.every((e=>e.isIdentifier()));if(p)return false;const{node:d,scope:f}=e;const y={stop:false,needsOuterBinding:false,scope:f};const g=[];const h=new Set;for(const e of u){for(const t of Object.keys(e.getBindingIdentifiers())){var b;const e=(b=f.bindings[t])==null?void 0:b.constantViolations;if(e){for(const r of e){const e=r.node;switch(e.type){case"VariableDeclarator":{if(e.init===null){const e=r.parentPath;if(!e.parentPath.isFor()||e.parentPath.get("body")===e){r.remove();break}}h.add(t);break}case"FunctionDeclaration":h.add(t);break}}}}}if(h.size===0){for(const e of u){if(!e.isIdentifier())e.traverse(l,y);if(y.needsOuterBinding)break}}let x=null;for(let l=0;l0){g.push(buildScopeIIFE(h,e.get("body").node));e.set("body",s.types.blockStatement(g));const t=e.get("body.body");const r=t[t.length-1].get("argument.callee");r.arrowFunctionToExpression();r.node.generator=e.node.generator;r.node.async=e.node.async;e.node.generator=false}else{e.get("body").unshiftContainer("body",g)}return true}function buildScopeIIFE(e,t){const r=[];const a=[];for(const t of e){r.push(s.types.identifier(t));a.push(s.types.identifier(t))}return s.types.returnStatement(s.types.callExpression(s.types.arrowFunctionExpression(a,t),r))}},9748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=convertFunctionRest;var s=r(8304);const a=(0,s.template)(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);const n=(0,s.template)(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);const o=(0,s.template)(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);const i=(0,s.template)(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);function referencesRest(e,t){if(e.node.name===t.name){return e.scope.bindingIdentifierEquals(t.name,t.outerBinding)}return false}const l={Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.name,t.outerBinding)){e.skip()}},Flow(e){if(e.isTypeCastExpression())return;e.skip()},Function(e,t){const r=t.noOptimise;t.noOptimise=true;e.traverse(l,t);t.noOptimise=r;e.skip()},ReferencedIdentifier(e,t){const{node:r}=e;if(r.name==="arguments"){t.deopted=true}if(!referencesRest(e,t))return;if(t.noOptimise){t.deopted=true}else{const{parentPath:s}=e;if(s.listKey==="params"&&s.key0&&s.types.isIdentifier(e.params[0],{name:"this"})){t-=1}return t}function hasRest(e){const t=e.params.length;return t>0&&s.types.isRestElement(e.params[t-1])}function optimiseIndexGetter(e,t,r){const a=s.types.numericLiteral(r);let i;if(s.types.isNumericLiteral(e.parent.property)){i=s.types.numericLiteral(e.parent.property.value+r)}else if(r===0){i=e.parent.property}else{i=s.types.binaryExpression("+",e.parent.property,s.types.cloneNode(a))}const{scope:l}=e;if(!l.isPure(i)){const r=l.generateUidIdentifierBasedOnNode(i);l.push({id:r,kind:"var"});e.parentPath.replaceWith(o({ARGUMENTS:t,OFFSET:a,INDEX:i,REF:s.types.cloneNode(r)}))}else{const r=e.parentPath;r.replaceWith(n({ARGUMENTS:t,OFFSET:a,INDEX:i}));const s=r.get("test").get("left");const o=s.evaluate();if(o.confident){if(o.value===true){r.replaceWith(r.scope.buildUndefinedNode())}else{r.get("test").replaceWith(r.get("test").get("right"))}}}}function optimiseLengthGetter(e,t,r){if(r){e.parentPath.replaceWith(i({ARGUMENTS:t,OFFSET:s.types.numericLiteral(r)}))}else{e.replaceWith(t)}}function convertFunctionRest(e){const{node:t,scope:r}=e;if(!hasRest(t))return false;let n=t.params.pop().argument;if(n.name==="arguments")r.rename(n.name);const o=s.types.identifier("arguments");if(s.types.isPattern(n)){const e=n;n=r.generateUidIdentifier("ref");const a=s.types.variableDeclaration("let",[s.types.variableDeclarator(e,n)]);t.body.body.unshift(a)}const i=getParamsCount(t);const c={references:[],offset:i,argumentsNode:o,outerBinding:r.getBindingIdentifier(n.name),candidates:[],name:n.name,deopted:false};e.traverse(l,c);if(!c.deopted&&!c.references.length){for(const{path:e,cause:t}of c.candidates){const r=s.types.cloneNode(o);switch(t){case"indexGetter":optimiseIndexGetter(e,r,c.offset);break;case"lengthGetter":optimiseLengthGetter(e,r,c.offset);break;default:e.replaceWith(r)}}return true}c.references.push(...c.candidates.map((({path:e})=>e)));const u=s.types.numericLiteral(i);const p=r.generateUidIdentifier("key");const d=r.generateUidIdentifier("len");let f,y;if(i){f=s.types.binaryExpression("-",s.types.cloneNode(p),s.types.cloneNode(u));y=s.types.conditionalExpression(s.types.binaryExpression(">",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.binaryExpression("-",s.types.cloneNode(d),s.types.cloneNode(u)),s.types.numericLiteral(0))}else{f=s.types.identifier(p.name);y=s.types.identifier(d.name)}const g=a({ARGUMENTS:o,ARRAY_KEY:f,ARRAY_LEN:y,START:u,ARRAY:n,KEY:p,LEN:d});if(c.deopted){t.body.body.unshift(g)}else{let t=e.getEarliestCommonAncestorFrom(c.references).getStatementParent();t.findParent((e=>{if(e.isLoop()){t=e}else{return e.isFunction()}}));t.insertBefore(g)}return true}},4727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-property-literals",visitor:{ObjectProperty:{exit({node:e}){const t=e.key;if(!e.computed&&a.types.isIdentifier(t)&&!a.types.isValidES3Identifier(t.name)){e.key=a.types.stringLiteral(t.name)}}}}}}));t["default"]=n},119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(1017);var n=r(8304);var o=(0,s.declare)((e=>{e.assertVersion(7);function addDisplayName(e,t){const r=t.arguments[0].properties;let s=true;for(let e=0;ee.name==="createReactClass";function isCreateClass(e){if(!e||!n.types.isCallExpression(e))return false;if(!t(e.callee)&&!isCreateClassAddon(e.callee)){return false}const r=e.arguments;if(r.length!==1)return false;const s=r[0];if(!n.types.isObjectExpression(s))return false;return true}return{name:"transform-react-display-name",visitor:{ExportDefaultDeclaration({node:e},t){if(isCreateClass(e.declaration)){const r=t.filename||"unknown";let s=a.basename(r,a.extname(r));if(s==="index"){s=a.basename(a.dirname(r))}addDisplayName(s,e.declaration)}},CallExpression(e){const{node:t}=e;if(!isCreateClass(t))return;let r;e.find((function(e){if(e.isAssignmentExpression()){r=e.node.left}else if(e.isObjectProperty()){r=e.node.key}else if(e.isVariableDeclarator()){r=e.node.id}else if(e.isStatement()){return true}if(r)return true}));if(!r)return;if(n.types.isMemberExpression(r)){r=r.property}if(n.types.isIdentifier(r)){addDisplayName(r.name,t)}}}}}));t["default"]=o},1638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"default",{enumerable:true,get:function(){return s.default}});var s=r(8350)},297:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=createPlugin;var s=r(6140);var a=r(6454);var n=r(8304);var o=r(2056);var i=r(5346);const l={importSource:"react",runtime:"automatic",pragma:"React.createElement",pragmaFrag:"React.Fragment"};const c=/\*?\s*@jsxImportSource\s+([^\s]+)/;const u=/\*?\s*@jsxRuntime\s+([^\s]+)/;const p=/\*?\s*@jsx\s+([^\s]+)/;const d=/\*?\s*@jsxFrag\s+([^\s]+)/;const get=(e,t)=>e.get(`@babel/plugin-react-jsx/${t}`);const set=(e,t,r)=>e.set(`@babel/plugin-react-jsx/${t}`,r);function createPlugin({name:e,development:t}){return(0,a.declare)(((r,a)=>{const{pure:o,throwIfNamespace:f=true,filter:y,runtime:g=(t?"automatic":"classic"),importSource:h=l.importSource,pragma:b=l.pragma,pragmaFrag:x=l.pragmaFrag}=a;{var{useSpread:v=false,useBuiltIns:j=false}=a;if(g==="classic"){if(typeof v!=="boolean"){throw new Error("transform-react-jsx currently only accepts a boolean option for "+"useSpread (defaults to false)")}if(typeof j!=="boolean"){throw new Error("transform-react-jsx currently only accepts a boolean option for "+"useBuiltIns (defaults to false)")}if(v&&j){throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread "+"but not both")}}}const E={JSXOpeningElement(e,t){for(const t of e.get("attributes")){if(!t.isJSXElement())continue;const{name:r}=t.node.name;if(r==="__source"||r==="__self"){throw e.buildCodeFrameError(`__source and __self should not be defined in props and are reserved for internal usage.`)}}const r=n.types.jsxAttribute(n.types.jsxIdentifier("__self"),n.types.jsxExpressionContainer(n.types.thisExpression()));const s=n.types.jsxAttribute(n.types.jsxIdentifier("__source"),n.types.jsxExpressionContainer(makeSource(e,t)));e.pushContainer("attributes",[r,s])}};return{name:e,inherits:s.default,visitor:{JSXNamespacedName(e){if(f){throw e.buildCodeFrameError(`Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set \`throwIfNamespace: false\` to bypass this warning.`)}},JSXSpreadChild(e){throw e.buildCodeFrameError("Spread children are not supported in React.")},Program:{enter(e,r){const{file:s}=r;let o=g;let i=h;let f=b;let y=x;let v=!!a.importSource;let j=!!a.pragma;let w=!!a.pragmaFrag;if(s.ast.comments){for(const e of s.ast.comments){const t=c.exec(e.value);if(t){i=t[1];v=true}const r=u.exec(e.value);if(r){o=r[1]}const s=p.exec(e.value);if(s){f=s[1];j=true}const a=d.exec(e.value);if(a){y=a[1];w=true}}}set(r,"runtime",o);if(o==="classic"){if(v){throw e.buildCodeFrameError(`importSource cannot be set when runtime is classic.`)}const t=toMemberExpression(f);const s=toMemberExpression(y);set(r,"id/createElement",(()=>n.types.cloneNode(t)));set(r,"id/fragment",(()=>n.types.cloneNode(s)));set(r,"defaultPure",f===l.pragma)}else if(o==="automatic"){if(j||w){throw e.buildCodeFrameError(`pragma and pragmaFrag cannot be set when runtime is automatic.`)}const define=(t,s)=>set(r,t,createImportLazily(r,e,s,i));define("id/jsx",t?"jsxDEV":"jsx");define("id/jsxs",t?"jsxDEV":"jsxs");define("id/createElement","createElement");define("id/fragment","Fragment");set(r,"defaultPure",i===l.importSource)}else{throw e.buildCodeFrameError(`Runtime must be either "classic" or "automatic".`)}if(t){e.traverse(E,r)}}},JSXElement:{exit(e,t){let r;if(get(t,"runtime")==="classic"||shouldUseCreateElement(e)){r=buildCreateElementCall(e,t)}else{r=buildJSXElementCall(e,t)}e.replaceWith(n.types.inherits(r,e.node))}},JSXFragment:{exit(e,t){let r;if(get(t,"runtime")==="classic"){r=buildCreateElementFragmentCall(e,t)}else{r=buildJSXFragmentCall(e,t)}e.replaceWith(n.types.inherits(r,e.node))}},JSXAttribute(e){if(n.types.isJSXElement(e.node.value)){e.node.value=n.types.jsxExpressionContainer(e.node.value)}}}};function call(e,t,r){const s=n.types.callExpression(get(e,`id/${t}`)(),r);if(o!=null?o:get(e,"defaultPure"))(0,i.default)(s);return s}function shouldUseCreateElement(e){const t=e.get("openingElement");const r=t.node.attributes;let s=false;for(let e=0;e1){t=n.types.arrayExpression(e)}else{return undefined}return n.types.objectProperty(n.types.identifier("children"),t)}function buildJSXElementCall(e,r){const s=e.get("openingElement");const a=[getTag(s)];const o=[];const i=Object.create(null);for(const t of s.get("attributes")){if(t.isJSXAttribute()&&n.types.isJSXIdentifier(t.node.name)){const{name:r}=t.node.name;switch(r){case"__source":case"__self":if(i[r])throw sourceSelfError(e,r);case"key":{const e=convertAttributeValue(t.node.value);if(e===null){throw t.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.')}i[r]=e;break}default:o.push(t)}}else{o.push(t)}}const l=n.types.react.buildChildren(e.node);let c;if(o.length||l.length){c=buildJSXOpeningElementAttributes(o,r,l)}else{c=n.types.objectExpression([])}a.push(c);if(t){var u,p,d;a.push((u=i.key)!=null?u:e.scope.buildUndefinedNode(),n.types.booleanLiteral(l.length>1),(p=i.__source)!=null?p:e.scope.buildUndefinedNode(),(d=i.__self)!=null?d:n.types.thisExpression())}else if(i.key!==undefined){a.push(i.key)}return call(r,l.length>1?"jsxs":"jsx",a)}function buildJSXOpeningElementAttributes(e,t,r){const s=e.reduce(accumulateAttribute,[]);if((r==null?void 0:r.length)>0){s.push(buildChildrenProperty(r))}return n.types.objectExpression(s)}function buildJSXFragmentCall(e,r){const s=[get(r,"id/fragment")()];const a=n.types.react.buildChildren(e.node);s.push(n.types.objectExpression(a.length>0?[buildChildrenProperty(a)]:[]));if(t){s.push(e.scope.buildUndefinedNode(),n.types.booleanLiteral(a.length>1))}return call(r,a.length>1?"jsxs":"jsx",s)}function buildCreateElementFragmentCall(e,t){if(y&&!y(e.node,t))return;return call(t,"createElement",[get(t,"id/fragment")(),n.types.nullLiteral(),...n.types.react.buildChildren(e.node)])}function buildCreateElementCall(e,t){const r=e.get("openingElement");return call(t,"createElement",[getTag(r),buildCreateElementOpeningElementAttributes(t,e,r.get("attributes")),...n.types.react.buildChildren(e.node)])}function getTag(e){const t=convertJSXIdentifier(e.node.name,e.node);let r;if(n.types.isIdentifier(t)){r=t.name}else if(n.types.isLiteral(t)){r=t.value}if(n.types.react.isCompatTag(r)){return n.types.stringLiteral(r)}else{return t}}function buildCreateElementOpeningElementAttributes(e,t,r){const s=get(e,"runtime");{if(s!=="automatic"){const t=[];const s=r.reduce(accumulateAttribute,[]);if(!v){let e=0;s.forEach(((r,a)=>{if(n.types.isSpreadElement(r)){if(a>e){t.push(n.types.objectExpression(s.slice(e,a)))}t.push(r.argument);e=a+1}}));if(s.length>e){t.push(n.types.objectExpression(s.slice(e)))}}else if(s.length){t.push(n.types.objectExpression(s))}if(!t.length){return n.types.nullLiteral()}if(t.length===1){return t[0]}if(!n.types.isObjectExpression(t[0])){t.unshift(n.types.objectExpression([]))}const a=j?n.types.memberExpression(n.types.identifier("Object"),n.types.identifier("assign")):e.addHelper("extends");return n.types.callExpression(a,t)}}const a=[];const o=Object.create(null);for(const e of r){const r=n.types.isJSXAttribute(e)&&n.types.isJSXIdentifier(e.name)&&e.name.name;if(s==="automatic"&&(r==="__source"||r==="__self")){if(o[r])throw sourceSelfError(t,r);o[r]=true}accumulateAttribute(a,e)}return a.length===1&&n.types.isSpreadElement(a[0])?a[0].argument:a.length>0?n.types.objectExpression(a):n.types.nullLiteral()}}));function getSource(e,r){switch(r){case"Fragment":return`${e}/${t?"jsx-dev-runtime":"jsx-runtime"}`;case"jsxDEV":return`${e}/jsx-dev-runtime`;case"jsx":case"jsxs":return`${e}/jsx-runtime`;case"createElement":return e}}function createImportLazily(e,t,r,s){return()=>{const a=getSource(s,r);if((0,o.isModule)(t)){let s=get(e,`imports/${r}`);if(s)return n.types.cloneNode(s);s=(0,o.addNamed)(t,r,a,{importedInterop:"uncompiled",importPosition:"after"});set(e,`imports/${r}`,s);return s}else{let s=get(e,`requires/${a}`);if(s){s=n.types.cloneNode(s)}else{s=(0,o.addNamespace)(t,a,{importedInterop:"uncompiled"});set(e,`requires/${a}`,s)}return n.types.memberExpression(s,n.types.identifier(r))}}}}function toMemberExpression(e){return e.split(".").map((e=>n.types.identifier(e))).reduce(((e,t)=>n.types.memberExpression(e,t)))}function makeSource(e,t){const r=e.node.loc;if(!r){return e.scope.buildUndefinedNode()}if(!t.fileNameIdentifier){const{filename:r=""}=t;const s=e.scope.generateUidIdentifier("_jsxFileName");const a=e.hub.getScope();if(a){a.push({id:s,init:n.types.stringLiteral(r)})}t.fileNameIdentifier=s}return makeTrace(n.types.cloneNode(t.fileNameIdentifier),r.start.line,r.start.column)}function makeTrace(e,t,r){const s=t!=null?n.types.numericLiteral(t):n.types.nullLiteral();const a=r!=null?n.types.numericLiteral(r+1):n.types.nullLiteral();const o=n.types.objectProperty(n.types.identifier("fileName"),e);const i=n.types.objectProperty(n.types.identifier("lineNumber"),s);const l=n.types.objectProperty(n.types.identifier("columnNumber"),a);return n.types.objectExpression([o,i,l])}function sourceSelfError(e,t){const r=`transform-react-jsx-${t.slice(2)}`;return e.buildCodeFrameError(`Duplicate ${t} prop found. You are most likely using the deprecated ${r} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`)}},8350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(297);var a=(0,s.default)({name:"transform-react-jsx/development",development:true});t["default"]=a},3863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(297);var a=(0,s.default)({name:"transform-react-jsx",development:false});t["default"]=a},8536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(5346);var n=r(8304);const o=new Map([["react",["cloneElement","createContext","createElement","createFactory","createRef","forwardRef","isValidElement","memo","lazy"]],["react-dom",["createPortal"]]]);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-react-pure-annotations",visitor:{CallExpression(e){if(isReactCall(e)){(0,a.default)(e)}}}}}));t["default"]=i;function isReactCall(e){if(!n.types.isMemberExpression(e.node.callee)){const t=e.get("callee");for(const[e,r]of o){for(const s of r){if(t.referencesImport(e,s)){return true}}}return false}for(const[t,r]of o){const s=e.get("callee.object");if(s.referencesImport(t,"default")||s.referencesImport(t,"*")){for(const t of r){if(n.types.isIdentifier(e.node.callee.property,{name:t})){return true}}return false}}return false}},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(4982);var n=(0,s.declare)((({types:e,assertVersion:t})=>{t(7);return{name:"transform-regenerator",inherits:a.default,visitor:{MemberExpression(t){var r;if(!((r=this.availableHelper)!=null&&r.call(this,"regeneratorRuntime"))){return}const s=t.get("object");if(s.isIdentifier({name:"regeneratorRuntime"})){const t=this.addHelper("regeneratorRuntime");if(e.isArrowFunctionExpression(t)){s.replaceWith(t.body);return}s.replaceWith(e.callExpression(t,[]))}}}}}));t["default"]=n},519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-reserved-words",visitor:{"BindingIdentifier|ReferencedIdentifier"(e){if(!a.types.isValidES3Identifier(e.node.name)){e.scope.rename(e.node.name)}}}}}));t["default"]=n},1631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.resolveFSPath=resolveFSPath;var s=r(1017);var a=r(8188);function _default(e,t,r){if(r===false)return e;return resolveAbsoluteRuntime(e,s.resolve(t,r===true?".":r))}function resolveAbsoluteRuntime(e,t){try{return s.dirname((((e,t)=>(e=e.split("."),t=t.split("."),+e[0]>+t[0]||e[0]==t[0]&&+e[1]>=+t[1]))(process.versions.node,"8.9")?require.resolve:(e,{paths:[t]},s=r(8188))=>{let a=s._findPath(e,s._nodeModulePaths(t).concat(t));if(a)return a;a=new Error(`Cannot resolve module '${e}'`);a.code="MODULE_NOT_FOUND";throw a})(`${e}/package.json`,{paths:[t]})).replace(/\\/g,"/")}catch(r){if(r.code!=="MODULE_NOT_FOUND")throw r;throw Object.assign(new Error(`Failed to resolve "${e}" relative to "${t}"`),{code:"BABEL_RUNTIME_NOT_FOUND",runtime:e,dirname:t})}}function resolveFSPath(e){return require.resolve(e).replace(/\\/g,"/")}},5092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasMinVersion=hasMinVersion;var s=r(7849);function hasMinVersion(e,t){if(!t)return true;if(s.valid(t))t=`^${t}`;return!s.intersects(`<${e}`,t)&&!s.intersects(`>=8.0.0`,t)}},2179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8123);var a=r(2056);var n=r(8304);var o=r(5092);var i=r(1631);var l=r(9068);var c=r(6619);var u=r(6880);const p=l.default||l;const d=c.default||c;const f=u.default||u;const y="#__secret_key__@babel/runtime__compatibility";function supportsStaticESM(e){return!!(e!=null&&e.supportsStaticESM)}var g=(0,s.declare)(((e,t,r)=>{e.assertVersion(7);const{corejs:s,helpers:l=true,regenerator:c=true,useESModules:u=false,version:g="7.0.0-beta.0",absoluteRuntime:h=false}=t;let b=false;let x;if(typeof s==="object"&&s!==null){x=s.version;b=Boolean(s.proposals)}else{x=s}const v=x?Number(x):false;if(![false,2,3].includes(v)){throw new Error(`The \`core-js\` version must be false, 2 or 3, but got ${JSON.stringify(x)}.`)}if(b&&(!v||v<3)){throw new Error("The 'proposals' option is only supported when using 'corejs: 3'")}if(typeof c!=="boolean"){throw new Error("The 'regenerator' option must be undefined, or a boolean.")}if(typeof l!=="boolean"){throw new Error("The 'helpers' option must be undefined, or a boolean.")}if(typeof u!=="boolean"&&u!=="auto"){throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'.")}if(typeof h!=="boolean"&&typeof h!=="string"){throw new Error("The 'absoluteRuntime' option must be undefined, a boolean, or a string.")}if(typeof g!=="string"){throw new Error(`The 'version' option must be a version string.`)}{const e="7.13.0";var j=(0,o.hasMinVersion)(e,g)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}if(has(t,"useBuiltIns")){if(t["useBuiltIns"]){throw new Error("The 'useBuiltIns' option has been removed. The @babel/runtime "+"module now uses builtins by default.")}else{throw new Error("The 'useBuiltIns' option has been removed. Use the 'corejs'"+"option to polyfill with `core-js` via @babel/runtime.")}}if(has(t,"polyfill")){if(t["polyfill"]===false){throw new Error("The 'polyfill' option has been removed. The @babel/runtime "+"module now skips polyfilling by default.")}else{throw new Error("The 'polyfill' option has been removed. Use the 'corejs'"+"option to polyfill with `core-js` via @babel/runtime.")}}if(has(t,"moduleName")){throw new Error("The 'moduleName' option has been removed. @babel/transform-runtime "+"no longer supports arbitrary runtimes. If you were using this to "+"set an absolute path for Babel's standard runtimes, please use the "+"'absoluteRuntime' option.")}const E=u==="auto"?e.caller(supportsStaticESM):u;const w=v===2;const _=v===3;const S=_?"@babel/runtime-corejs3":w?"@babel/runtime-corejs2":"@babel/runtime";const k=["interopRequireWildcard","interopRequireDefault"];const I=(0,i.default)(S,r,h);function createCorejsPlgin(e,t,r){return(s,a,n)=>Object.assign({},e(s,t,n),{inherits:r})}function createRegeneratorPlugin(e){if(!c)return undefined;return(t,r,s)=>f(t,e,s)}return{name:"transform-runtime",inherits:w?createCorejsPlgin(p,{method:"usage-pure",absoluteImports:h?I:false,[y]:{runtimeVersion:g,useBabelRuntime:I,ext:""}},createRegeneratorPlugin({method:"usage-pure",absoluteImports:h?I:false,[y]:{useBabelRuntime:I}})):_?createCorejsPlgin(d,{method:"usage-pure",version:3,proposals:b,absoluteImports:h?I:false,[y]:{useBabelRuntime:I,ext:""}},createRegeneratorPlugin({method:"usage-pure",absoluteImports:h?I:false,[y]:{useBabelRuntime:I}})):createRegeneratorPlugin({method:"usage-pure",absoluteImports:h?I:false,[y]:{useBabelRuntime:I}}),pre(e){if(!l)return;e.set("helperGenerator",(t=>{if(!(e.availableHelper!=null&&e.availableHelper(t,g))){if(t==="regeneratorRuntime"){return n.types.arrowFunctionExpression([],n.types.identifier("regeneratorRuntime"))}return}const r=k.indexOf(t)!==-1;const s=r&&!(0,a.isModule)(e.path)?4:undefined;const o=E&&e.path.node.sourceType==="module"?"helpers/esm":"helpers";let l=`${I}/${o}/${t}`;if(h)l=(0,i.resolveFSPath)(l);return addDefaultImport(l,t,s,true)}));const t=new Map;function addDefaultImport(r,s,o,i=false){const l=(0,a.isModule)(e.path);const c=`${r}:${s}:${l||""}`;let u=t.get(c);if(u){u=n.types.cloneNode(u)}else{u=(0,a.addDefault)(e.path,r,{importedInterop:i&&j?"compiled":"uncompiled",nameHint:s,blockHoist:o});t.set(c,u)}return u}}}}));t["default"]=g},4674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-shorthand-properties",visitor:{ObjectMethod(e){const{node:t}=e;if(t.kind==="method"){const r=a.types.functionExpression(null,t.params,t.body,t.generator,t.async);r.returnType=t.returnType;const s=a.types.toComputedKey(t);if(a.types.isStringLiteral(s,{value:"__proto__"})){e.replaceWith(a.types.objectProperty(s,r,true))}else{e.replaceWith(a.types.objectProperty(t.key,r,t.computed))}}},ObjectProperty(e){const{node:t}=e;if(t.shorthand){const r=a.types.toComputedKey(t);if(a.types.isStringLiteral(r,{value:"__proto__"})){e.replaceWith(a.types.objectProperty(r,t.value,true))}else{t.shorthand=false}}}}}}));t["default"]=n},6342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(9692);var n=r(8304);var o=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const o=(r=e.assumption("iterableIsArray"))!=null?r:t.loose;const i=(s=t.allowArrayLike)!=null?s:e.assumption("arrayLikeIsIterable");function getSpreadLiteral(e,t){if(o&&!n.types.isIdentifier(e.argument,{name:"arguments"})){return e.argument}else{return t.toArray(e.argument,true,i)}}function hasHole(e){return e.elements.some((e=>e===null))}function hasSpread(e){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-sticky-regex",visitor:{RegExpLiteral(e){const{node:t}=e;if(!t.flags.includes("y"))return;e.replaceWith(a.types.newExpression(a.types.identifier("RegExp"),[a.types.stringLiteral(t.pattern),a.types.stringLiteral(t.flags)]))}}}}));t["default"]=n},1912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6454);var a=r(8304);var n=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const n=(r=e.assumption("ignoreToPrimitiveHint"))!=null?r:t.loose;const o=(s=e.assumption("mutableTemplateObject"))!=null?s:t.loose;let i="taggedTemplateLiteral";if(o)i+="Loose";function buildConcatCallExpressions(e){let t=true;return e.reduce((function(e,r){let s=a.types.isLiteral(r);if(!s&&t){s=true;t=false}if(s&&a.types.isCallExpression(e)){e.arguments.push(r);return e}return a.types.callExpression(a.types.memberExpression(e,a.types.identifier("concat")),[r])}))}return{name:"transform-template-literals",visitor:{TaggedTemplateExpression(e){const{node:t}=e;const{quasi:r}=t;const s=[];const n=[];let o=true;for(const t of r.quasis){const{raw:r,cooked:i}=t.value;const l=i==null?e.scope.buildUndefinedNode():a.types.stringLiteral(i);s.push(l);n.push(a.types.stringLiteral(r));if(r!==i){o=false}}const l=[a.types.arrayExpression(s)];if(!o){l.push(a.types.arrayExpression(n))}const c=e.scope.generateUidIdentifier("templateObject");e.scope.getProgramParent().push({id:a.types.cloneNode(c)});e.replaceWith(a.types.callExpression(t.tag,[a.template.expression.ast` ${a.types.cloneNode(c)} || ( ${c} = ${this.addHelper(i)}(${l}) ) diff --git a/packages/next/src/compiled/cssnano-simple/index.js b/packages/next/src/compiled/cssnano-simple/index.js index 15716b7fee932..d0dc99d41da45 100644 --- a/packages/next/src/compiled/cssnano-simple/index.js +++ b/packages/next/src/compiled/cssnano-simple/index.js @@ -1,5 +1,5 @@ -(()=>{var __webpack_modules__={304:(module,__unused_webpack_exports,__nccwpck_require__)=>{(()=>{var __webpack_modules__={2498:l=>{function BrowserslistError(l){this.name="BrowserslistError";this.message=l;this.browserslist=true;if(Error.captureStackTrace){Error.captureStackTrace(this,BrowserslistError)}}BrowserslistError.prototype=Error.prototype;l.exports=BrowserslistError},5478:(l,v,m)=>{var y=m(3835);var _=m(4971).agents;var w=m(5659);var k=m(5622);var S=m(6719);var E=m(2498);var C=m(486);var O=365.259641*24*60*60*1e3;var P=37;var L=1;var T=2;function isVersionsMatch(l,v){return(l+".").indexOf(v+".")===0}function isEolReleased(l){var v=l.slice(1);return browserslist.nodeVersions.some((function(l){return isVersionsMatch(l,v)}))}function normalize(l){return l.filter((function(l){return typeof l==="string"}))}function normalizeElectron(l){var v=l;if(l.split(".").length===3){v=l.split(".").slice(0,-1).join(".")}return v}function nameMapper(l){return function mapName(v){return l+" "+v}}function getMajor(l){return parseInt(l.split(".")[0])}function getMajorVersions(l,v){if(l.length===0)return[];var m=uniq(l.map(getMajor));var y=m[m.length-v];if(!y){return l}var _=[];for(var w=l.length-1;w>=0;w--){if(y>getMajor(l[w]))break;_.unshift(l[w])}return _}function uniq(l){var v=[];for(var m=0;m"){return function(l){return parseFloat(l)>v}}else if(l===">="){return function(l){return parseFloat(l)>=v}}else if(l==="<"){return function(l){return parseFloat(l)"){return function(l){l=l.split(".").map(parseSimpleInt);return compareSemver(l,v)>0}}else if(l===">="){return function(l){l=l.split(".").map(parseSimpleInt);return compareSemver(l,v)>=0}}else if(l==="<"){return function(l){l=l.split(".").map(parseSimpleInt);return compareSemver(v,l)>0}}else{return function(l){l=l.split(".").map(parseSimpleInt);return compareSemver(v,l)>=0}}}function parseSimpleInt(l){return parseInt(l)}function compare(l,v){if(lv)return+1;return 0}function compareSemver(l,v){return compare(parseInt(l[0]),parseInt(v[0]))||compare(parseInt(l[1]||"0"),parseInt(v[1]||"0"))||compare(parseInt(l[2]||"0"),parseInt(v[2]||"0"))}function semverFilterLoose(l,v){v=v.split(".").map(parseSimpleInt);if(typeof v[1]==="undefined"){v[1]="x"}switch(l){case"<=":return function(l){l=l.split(".").map(parseSimpleInt);return compareSemverLoose(l,v)<=0};case">=":default:return function(l){l=l.split(".").map(parseSimpleInt);return compareSemverLoose(l,v)>=0}}}function compareSemverLoose(l,v){if(l[0]!==v[0]){return l[0]=l}));return m.concat(w.map(nameMapper(_.name)))}),[])}function cloneData(l){return{name:l.name,versions:l.versions,released:l.released,releaseDate:l.releaseDate}}function mapVersions(l,v){l.versions=l.versions.map((function(l){return v[l]||l}));l.released=l.versions.map((function(l){return v[l]||l}));var m={};for(var y in l.releaseDate){m[v[y]||y]=l.releaseDate[y]}l.releaseDate=m;return l}function byName(l,v){l=l.toLowerCase();l=browserslist.aliases[l]||l;if(v.mobileToDesktop&&browserslist.desktopNames[l]){var m=browserslist.data[browserslist.desktopNames[l]];if(l==="android"){return normalizeAndroidData(cloneData(browserslist.data[l]),m)}else{var y=cloneData(m);y.name=l;if(l==="op_mob"){y=mapVersions(y,{"10.0-10.1":"10"})}return y}}return browserslist.data[l]}function normalizeAndroidVersions(l,v){var m=P;var y=v[v.length-1];return l.filter((function(l){return/^(?:[2-4]\.|[34]$)/.test(l)})).concat(v.slice(m-y-1))}function normalizeAndroidData(l,v){l.released=normalizeAndroidVersions(l.released,v.released);l.versions=normalizeAndroidVersions(l.versions,v.versions);return l}function checkName(l,v){var m=byName(l,v);if(!m)throw new E("Unknown browser "+l);return m}function unknownQuery(l){return new E("Unknown browser query `"+l+"`. "+"Maybe you are using old Browserslist or made typo in query.")}function filterAndroid(l,v,m){if(m.mobileToDesktop)return l;var y=browserslist.data.android.released;var _=y[y.length-1];var w=_-P-v;if(w>0){return l.slice(-1)}else{return l.slice(w-1)}}function resolve(l,v){if(Array.isArray(l)){l=flatten(l.map(parse))}else{l=parse(l)}return l.reduce((function(l,m,y){var _=m.queryString;var w=_.indexOf("not ")===0;if(w){if(y===0){throw new E("Write any browsers query (for instance, `defaults`) "+"before `"+_+"`")}_=_.slice(4)}for(var k=0;k 0.5%","last 2 versions","Firefox ESR","not dead"];browserslist.aliases={fx:"firefox",ff:"firefox",ios:"ios_saf",explorer:"ie",blackberry:"bb",explorermobile:"ie_mob",operamini:"op_mini",operamobile:"op_mob",chromeandroid:"and_chr",firefoxandroid:"and_ff",ucandroid:"and_uc",qqandroid:"and_qq"};browserslist.desktopNames={and_chr:"chrome",and_ff:"firefox",ie_mob:"ie",op_mob:"opera",android:"chrome"};browserslist.versionAliases={};browserslist.clearCaches=C.clearCaches;browserslist.parseConfig=C.parseConfig;browserslist.readConfig=C.readConfig;browserslist.findConfig=C.findConfig;browserslist.loadConfig=C.loadConfig;browserslist.coverage=function(l,v){var m;if(typeof v==="undefined"){m=browserslist.usage.global}else if(v==="my stats"){var y={};y.path=k.resolve?k.resolve("."):".";var _=C.getStat(y);if(!_){throw new E("Custom usage statistics was not provided")}m={};for(var w in _){fillUsage(m,w,_[w])}}else if(typeof v==="string"){if(v.length>2){v=v.toLowerCase()}else{v=v.toUpperCase()}C.loadCountry(browserslist.usage,v,browserslist.data);m=browserslist.usage[v]}else{if("dataByBrowser"in v){v=v.dataByBrowser}m={};for(var S in v){for(var O in v[S]){m[S+" "+O]=v[S][O]}}}return l.reduce((function(l,v){var y=m[v];if(y===undefined){y=m[v.replace(/ \S+$/," 0")]}return l+(y||0)}),0)};function nodeQuery(l,v){var m=browserslist.nodeVersions.filter((function(l){return isVersionsMatch(l,v)}));if(m.length===0){if(l.ignoreUnknownVersions){return[]}else{throw new E("Unknown version "+v+" of Node.js")}}return["node "+m[m.length-1]]}function sinceQuery(l,v,m,y){v=parseInt(v);m=parseInt(m||"01")-1;y=parseInt(y||"01");return filterByYear(Date.UTC(v,m,y,0,0,0),l)}function coverQuery(l,v,m){v=parseFloat(v);var y=browserslist.usage.global;if(m){if(m.match(/^my\s+stats$/i)){if(!l.customUsage){throw new E("Custom usage statistics was not provided")}y=l.customUsage}else{var _;if(m.length===2){_=m.toUpperCase()}else{_=m.toLowerCase()}C.loadCountry(browserslist.usage,_,browserslist.data);y=browserslist.usage[_]}}var w=Object.keys(y).sort((function(l,v){return y[v]-y[l]}));var k=0;var S=[];var O;for(var P=0;P=v)break}return S}var R=[{regexp:/^last\s+(\d+)\s+major\s+versions?$/i,select:function(l,v){return Object.keys(_).reduce((function(m,y){var _=byName(y,l);if(!_)return m;var w=getMajorVersions(_.released,v);w=w.map(nameMapper(_.name));if(_.name==="android"){w=filterAndroid(w,v,l)}return m.concat(w)}),[])}},{regexp:/^last\s+(\d+)\s+versions?$/i,select:function(l,v){return Object.keys(_).reduce((function(m,y){var _=byName(y,l);if(!_)return m;var w=_.released.slice(-v);w=w.map(nameMapper(_.name));if(_.name==="android"){w=filterAndroid(w,v,l)}return m.concat(w)}),[])}},{regexp:/^last\s+(\d+)\s+electron\s+major\s+versions?$/i,select:function(l,v){var m=getMajorVersions(Object.keys(S),v);return m.map((function(l){return"chrome "+S[l]}))}},{regexp:/^last\s+(\d+)\s+node\s+major\s+versions?$/i,select:function(l,v){return getMajorVersions(browserslist.nodeVersions,v).map((function(l){return"node "+l}))}},{regexp:/^last\s+(\d+)\s+(\w+)\s+major\s+versions?$/i,select:function(l,v,m){var y=checkName(m,l);var _=getMajorVersions(y.released,v);var w=_.map(nameMapper(y.name));if(y.name==="android"){w=filterAndroid(w,v,l)}return w}},{regexp:/^last\s+(\d+)\s+electron\s+versions?$/i,select:function(l,v){return Object.keys(S).slice(-v).map((function(l){return"chrome "+S[l]}))}},{regexp:/^last\s+(\d+)\s+node\s+versions?$/i,select:function(l,v){return browserslist.nodeVersions.slice(-v).map((function(l){return"node "+l}))}},{regexp:/^last\s+(\d+)\s+(\w+)\s+versions?$/i,select:function(l,v,m){var y=checkName(m,l);var _=y.released.slice(-v).map(nameMapper(y.name));if(y.name==="android"){_=filterAndroid(_,v,l)}return _}},{regexp:/^unreleased\s+versions$/i,select:function(l){return Object.keys(_).reduce((function(v,m){var y=byName(m,l);if(!y)return v;var _=y.versions.filter((function(l){return y.released.indexOf(l)===-1}));_=_.map(nameMapper(y.name));return v.concat(_)}),[])}},{regexp:/^unreleased\s+electron\s+versions?$/i,select:function(){return[]}},{regexp:/^unreleased\s+(\w+)\s+versions?$/i,select:function(l,v){var m=checkName(v,l);return m.versions.filter((function(l){return m.released.indexOf(l)===-1})).map(nameMapper(m.name))}},{regexp:/^last\s+(\d*.?\d+)\s+years?$/i,select:function(l,v){return filterByYear(Date.now()-O*v,l)}},{regexp:/^since (\d+)$/i,select:sinceQuery},{regexp:/^since (\d+)-(\d+)$/i,select:sinceQuery},{regexp:/^since (\d+)-(\d+)-(\d+)$/i,select:sinceQuery},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,select:function(l,v,m){m=parseFloat(m);var y=browserslist.usage.global;return Object.keys(y).reduce((function(l,_){if(v===">"){if(y[_]>m){l.push(_)}}else if(v==="<"){if(y[_]=m){l.push(_)}return l}),[])}},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,select:function(l,v,m){m=parseFloat(m);if(!l.customUsage){throw new E("Custom usage statistics was not provided")}var y=l.customUsage;return Object.keys(y).reduce((function(l,_){var w=y[_];if(w==null){return l}if(v===">"){if(w>m){l.push(_)}}else if(v==="<"){if(w=m){l.push(_)}return l}),[])}},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,select:function(l,v,m,y){m=parseFloat(m);var _=C.loadStat(l,y,browserslist.data);if(_){l.customUsage={};for(var w in _){fillUsage(l.customUsage,w,_[w])}}if(!l.customUsage){throw new E("Custom usage statistics was not provided")}var k=l.customUsage;return Object.keys(k).reduce((function(l,y){var _=k[y];if(_==null){return l}if(v===">"){if(_>m){l.push(y)}}else if(v==="<"){if(_=m){l.push(y)}return l}),[])}},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,select:function(l,v,m,y){m=parseFloat(m);if(y.length===2){y=y.toUpperCase()}else{y=y.toLowerCase()}C.loadCountry(browserslist.usage,y,browserslist.data);var _=browserslist.usage[y];return Object.keys(_).reduce((function(l,y){var w=_[y];if(w==null){return l}if(v===">"){if(w>m){l.push(y)}}else if(v==="<"){if(w=m){l.push(y)}return l}),[])}},{regexp:/^cover\s+(\d+|\d+\.\d+|\.\d+)%$/i,select:coverQuery},{regexp:/^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/i,select:coverQuery},{regexp:/^supports\s+([\w-]+)$/,select:function(l,v){C.loadFeature(browserslist.cache,v);var m=browserslist.cache[v];return Object.keys(m).reduce((function(l,v){var y=m[v];if(y.indexOf("y")>=0||y.indexOf("a")>=0){l.push(v)}return l}),[])}},{regexp:/^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i,select:function(l,v,m){var y=normalizeElectron(v);var _=normalizeElectron(m);if(!S[y]){throw new E("Unknown version "+v+" of electron")}if(!S[_]){throw new E("Unknown version "+m+" of electron")}v=parseFloat(v);m=parseFloat(m);return Object.keys(S).filter((function(l){var y=parseFloat(l);return y>=v&&y<=m})).map((function(l){return"chrome "+S[l]}))}},{regexp:/^node\s+([\d.]+)\s*-\s*([\d.]+)$/i,select:function(l,v,m){return browserslist.nodeVersions.filter(semverFilterLoose(">=",v)).filter(semverFilterLoose("<=",m)).map((function(l){return"node "+l}))}},{regexp:/^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,select:function(l,v,m,y){var _=checkName(v,l);m=parseFloat(normalizeVersion(_,m)||m);y=parseFloat(normalizeVersion(_,y)||y);function filter(l){var v=parseFloat(l);return v>=m&&v<=y}return _.released.filter(filter).map(nameMapper(_.name))}},{regexp:/^electron\s*(>=?|<=?)\s*([\d.]+)$/i,select:function(l,v,m){var y=normalizeElectron(m);return Object.keys(S).filter(generateFilter(v,y)).map((function(l){return"chrome "+S[l]}))}},{regexp:/^node\s*(>=?|<=?)\s*([\d.]+)$/i,select:function(l,v,m){return browserslist.nodeVersions.filter(generateSemverFilter(v,m)).map((function(l){return"node "+l}))}},{regexp:/^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,select:function(l,v,m,y){var _=checkName(v,l);var w=browserslist.versionAliases[_.name][y];if(w){y=w}return _.released.filter(generateFilter(m,y)).map((function(l){return _.name+" "+l}))}},{regexp:/^(firefox|ff|fx)\s+esr$/i,select:function(){return["firefox 91"]}},{regexp:/(operamini|op_mini)\s+all/i,select:function(){return["op_mini all"]}},{regexp:/^electron\s+([\d.]+)$/i,select:function(l,v){var m=normalizeElectron(v);var y=S[m];if(!y){throw new E("Unknown version "+v+" of electron")}return["chrome "+y]}},{regexp:/^node\s+(\d+)$/i,select:nodeQuery},{regexp:/^node\s+(\d+\.\d+)$/i,select:nodeQuery},{regexp:/^node\s+(\d+\.\d+\.\d+)$/i,select:nodeQuery},{regexp:/^current\s+node$/i,select:function(l){return[C.currentNode(resolve,l)]}},{regexp:/^maintained\s+node\s+versions$/i,select:function(l){var v=Date.now();var m=Object.keys(w).filter((function(l){return vDate.parse(w[l].start)&&isEolReleased(l)})).map((function(l){return"node "+l.slice(1)}));return resolve(m,l)}},{regexp:/^phantomjs\s+1.9$/i,select:function(){return["safari 5"]}},{regexp:/^phantomjs\s+2.1$/i,select:function(){return["safari 6"]}},{regexp:/^(\w+)\s+(tp|[\d.]+)$/i,select:function(l,v,m){if(/^tp$/i.test(m))m="TP";var y=checkName(v,l);var _=normalizeVersion(y,m);if(_){m=_}else{if(m.indexOf(".")===-1){_=m+".0"}else{_=m.replace(/\.0$/,"")}_=normalizeVersion(y,_);if(_){m=_}else if(l.ignoreUnknownVersions){return[]}else{throw new E("Unknown version "+m+" of "+v)}}return[y.name+" "+m]}},{regexp:/^browserslist config$/i,select:function(l){return browserslist(undefined,l)}},{regexp:/^extends (.+)$/i,select:function(l,v){return resolve(C.loadQueries(l,v),l)}},{regexp:/^defaults$/i,select:function(l){return resolve(browserslist.defaults,l)}},{regexp:/^dead$/i,select:function(l){var v=["ie <= 10","ie_mob <= 11","bb <= 10","op_mob <= 12.1","samsung 4"];return resolve(v,l)}},{regexp:/^(\w+)$/i,select:function(l,v){if(byName(v,l)){throw new E("Specify versions in Browserslist query for browser "+v)}else{throw unknownQuery(v)}}}];(function(){for(var l in _){var v=_[l];browserslist.data[l]={name:l,versions:normalize(_[l].versions),released:normalize(_[l].versions.slice(0,-3)),releaseDate:_[l].release_date};fillUsage(browserslist.usage.global,l,v.usage_global);browserslist.versionAliases[l]={};for(var m=0;m{var feature=__nccwpck_require2_(30).default;var region=__nccwpck_require2_(9761).default;var path=__nccwpck_require2_(5622);var fs=__nccwpck_require2_(5747);var BrowserslistError=__nccwpck_require2_(2498);var IS_SECTION=/^\s*\[(.+)]\s*$/;var CONFIG_PATTERN=/^browserslist-config-/;var SCOPED_CONFIG__PATTERN=/@[^/]+\/browserslist-config(-|$|\/)/;var TIME_TO_UPDATE_CANIUSE=6*30*24*60*60*1e3;var FORMAT="Browserslist config should be a string or an array "+"of strings with browser queries";var dataTimeChecked=false;var filenessCache={};var configCache={};function checkExtend(l){var v=" Use `dangerousExtend` option to disable.";if(!CONFIG_PATTERN.test(l)&&!SCOPED_CONFIG__PATTERN.test(l)){throw new BrowserslistError("Browserslist config needs `browserslist-config-` prefix. "+v)}if(l.replace(/^@[^/]+\//,"").indexOf(".")!==-1){throw new BrowserslistError("`.` not allowed in Browserslist config name. "+v)}if(l.indexOf("node_modules")!==-1){throw new BrowserslistError("`node_modules` not allowed in Browserslist config."+v)}}function isFile(l){if(l in filenessCache){return filenessCache[l]}var v=fs.existsSync(l)&&fs.statSync(l).isFile();if(!process.env.BROWSERSLIST_DISABLE_CACHE){filenessCache[l]=v}return v}function eachParent(l,v){var m=isFile(l)?path.dirname(l):l;var y=path.resolve(m);do{var _=v(y);if(typeof _!=="undefined")return _}while(y!==(y=path.dirname(y)));return undefined}function check(l){if(Array.isArray(l)){for(var v=0;v{"use strict";Object.defineProperty(v,"__esModule",{value:true});v.getBrowserScope=v.setBrowserScope=v.getLatestStableBrowsers=v.find=v.isSupported=v.getSupport=v.features=undefined;var y=m(4538);var _=_interopRequireDefault(y);var w=m(5478);var k=_interopRequireDefault(w);var S=m(4338);var E=m(3228);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var C=Object.keys(S.features);var O=void 0;function setBrowserScope(l){O=(0,E.cleanBrowsersList)(l)}function getBrowserScope(){return O}var P=(0,_.default)(E.parseCaniuseData,(function(l,v){return l.title+v}));function getSupport(l){var v=void 0;try{v=(0,S.feature)(S.features[l])}catch(v){var m=find(l);if(m.length===1)return getSupport(m[0]);throw new ReferenceError("Please provide a proper feature name. Cannot find "+l)}return P(v,O)}function isSupported(l,v){var m=void 0;try{m=(0,S.feature)(S.features[l])}catch(v){var y=find(l);if(y.length===1){m=S.features[y[0]]}else{throw new ReferenceError("Please provide a proper feature name. Cannot find "+l)}}return(0,k.default)(v,{ignoreUnknownVersions:true}).map((function(l){return l.split(" ")})).every((function(l){return m.stats[l[0]]&&m.stats[l[0]][l[1]]==="y"}))}function find(l){if(typeof l!=="string"){throw new TypeError("The `query` parameter should be a string.")}if(~C.indexOf(l)){return l}return C.filter((function(v){return(0,E.contains)(v,l)}))}function getLatestStableBrowsers(){return(0,k.default)("last 1 version")}setBrowserScope();v.features=C;v.getSupport=getSupport;v.isSupported=isSupported;v.find=find;v.getLatestStableBrowsers=getLatestStableBrowsers;v.setBrowserScope=setBrowserScope;v.getBrowserScope=getBrowserScope},3228:(l,v,m)=>{"use strict";Object.defineProperty(v,"__esModule",{value:true});v.contains=contains;v.parseCaniuseData=parseCaniuseData;v.cleanBrowsersList=cleanBrowsersList;var y=m(8216);var _=_interopRequireDefault(y);var w=m(5478);var k=_interopRequireDefault(w);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function contains(l,v){return!!~l.indexOf(v)}function parseCaniuseData(l,v){var m={};var y;var _;v.forEach((function(v){m[v]={};for(var w in l.stats[v]){y=l.stats[v][w].replace(/#\d+/,"").trim().split(" ");w=parseFloat(w.split("-")[0]);if(isNaN(w))continue;for(var k=0;km[v][_]){m[v][_]=w}}}}}));return m}function cleanBrowsersList(l){return(0,_.default)((0,k.default)(l).map((function(l){return l.split(" ")[0]})))}},43:(l,v)=>{Object.defineProperty(v,"__esModule",{value:!0});var m={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(l){return"string"==typeof l?l.length>0:"number"==typeof l},n=function(l,v,m){return void 0===v&&(v=0),void 0===m&&(m=Math.pow(10,v)),Math.round(m*l)/m+0},e=function(l,v,m){return void 0===v&&(v=0),void 0===m&&(m=1),l>m?m:l>v?l:v},u=function(l){return(l=isFinite(l)?l%360:0)>0?l:l+360},o=function(l){return{r:e(l.r,0,255),g:e(l.g,0,255),b:e(l.b,0,255),a:e(l.a)}},a=function(l){return{r:n(l.r),g:n(l.g),b:n(l.b),a:n(l.a,3)}},y=/^#([0-9a-f]{3,8})$/i,i=function(l){var v=l.toString(16);return v.length<2?"0"+v:v},h=function(l){var v=l.r,m=l.g,y=l.b,_=l.a,w=Math.max(v,m,y),k=w-Math.min(v,m,y),S=k?w===v?(m-y)/k:w===m?2+(y-v)/k:4+(v-m)/k:0;return{h:60*(S<0?S+6:S),s:w?k/w*100:0,v:w/255*100,a:_}},b=function(l){var v=l.h,m=l.s,y=l.v,_=l.a;v=v/360*6,m/=100,y/=100;var w=Math.floor(v),k=y*(1-m),S=y*(1-(v-w)*m),E=y*(1-(1-v+w)*m),C=w%6;return{r:255*[y,S,k,k,E,y][C],g:255*[E,y,y,S,k,k][C],b:255*[k,k,E,y,y,S][C],a:_}},d=function(l){return{h:u(l.h),s:e(l.s,0,100),l:e(l.l,0,100),a:e(l.a)}},g=function(l){return{h:n(l.h),s:n(l.s),l:n(l.l),a:n(l.a,3)}},f=function(l){return b((m=(v=l).s,{h:v.h,s:(m*=((y=v.l)<50?y:100-y)/100)>0?2*m/(y+m)*100:0,v:y+m,a:v.a}));var v,m,y},p=function(l){return{h:(v=h(l)).h,s:(_=(200-(m=v.s))*(y=v.v)/100)>0&&_<200?m*y/100/(_<=100?_:200-_)*100:0,l:_/2,a:v.a};var v,m,y,_},_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,k=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,E={string:[[function(l){var v=y.exec(l);return v?(l=v[1]).length<=4?{r:parseInt(l[0]+l[0],16),g:parseInt(l[1]+l[1],16),b:parseInt(l[2]+l[2],16),a:4===l.length?n(parseInt(l[3]+l[3],16)/255,2):1}:6===l.length||8===l.length?{r:parseInt(l.substr(0,2),16),g:parseInt(l.substr(2,2),16),b:parseInt(l.substr(4,2),16),a:8===l.length?n(parseInt(l.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(l){var v=k.exec(l)||S.exec(l);return v?v[2]!==v[4]||v[4]!==v[6]?null:o({r:Number(v[1])/(v[2]?100/255:1),g:Number(v[3])/(v[4]?100/255:1),b:Number(v[5])/(v[6]?100/255:1),a:void 0===v[7]?1:Number(v[7])/(v[8]?100:1)}):null},"rgb"],[function(l){var v=_.exec(l)||w.exec(l);if(!v)return null;var y,k,S=d({h:(y=v[1],k=v[2],void 0===k&&(k="deg"),Number(y)*(m[k]||1)),s:Number(v[3]),l:Number(v[4]),a:void 0===v[5]?1:Number(v[5])/(v[6]?100:1)});return f(S)},"hsl"]],object:[[function(l){var v=l.r,m=l.g,y=l.b,_=l.a,w=void 0===_?1:_;return t(v)&&t(m)&&t(y)?o({r:Number(v),g:Number(m),b:Number(y),a:Number(w)}):null},"rgb"],[function(l){var v=l.h,m=l.s,y=l.l,_=l.a,w=void 0===_?1:_;if(!t(v)||!t(m)||!t(y))return null;var k=d({h:Number(v),s:Number(m),l:Number(y),a:Number(w)});return f(k)},"hsl"],[function(l){var v=l.h,m=l.s,y=l.v,_=l.a,w=void 0===_?1:_;if(!t(v)||!t(m)||!t(y))return null;var k=function(l){return{h:u(l.h),s:e(l.s,0,100),v:e(l.v,0,100),a:e(l.a)}}({h:Number(v),s:Number(m),v:Number(y),a:Number(w)});return b(k)},"hsv"]]},N=function(l,v){for(var m=0;m=.5},r.prototype.toHex=function(){return l=a(this.rgba),v=l.r,m=l.g,y=l.b,w=(_=l.a)<1?i(n(255*_)):"","#"+i(v)+i(m)+i(y)+w;var l,v,m,y,_,w},r.prototype.toRgb=function(){return a(this.rgba)},r.prototype.toRgbString=function(){return l=a(this.rgba),v=l.r,m=l.g,y=l.b,(_=l.a)<1?"rgba("+v+", "+m+", "+y+", "+_+")":"rgb("+v+", "+m+", "+y+")";var l,v,m,y,_},r.prototype.toHsl=function(){return g(p(this.rgba))},r.prototype.toHslString=function(){return l=g(p(this.rgba)),v=l.h,m=l.s,y=l.l,(_=l.a)<1?"hsla("+v+", "+m+"%, "+y+"%, "+_+")":"hsl("+v+", "+m+"%, "+y+"%)";var l,v,m,y,_},r.prototype.toHsv=function(){return l=h(this.rgba),{h:n(l.h),s:n(l.s),v:n(l.v),a:n(l.a,3)};var l},r.prototype.invert=function(){return j({r:255-(l=this.rgba).r,g:255-l.g,b:255-l.b,a:l.a});var l},r.prototype.saturate=function(l){return void 0===l&&(l=.1),j(M(this.rgba,l))},r.prototype.desaturate=function(l){return void 0===l&&(l=.1),j(M(this.rgba,-l))},r.prototype.grayscale=function(){return j(M(this.rgba,-1))},r.prototype.lighten=function(l){return void 0===l&&(l=.1),j(H(this.rgba,l))},r.prototype.darken=function(l){return void 0===l&&(l=.1),j(H(this.rgba,-l))},r.prototype.rotate=function(l){return void 0===l&&(l=15),this.hue(this.hue()+l)},r.prototype.alpha=function(l){return"number"==typeof l?j({r:(v=this.rgba).r,g:v.g,b:v.b,a:l}):n(this.rgba.a,3);var v},r.prototype.hue=function(l){var v=p(this.rgba);return"number"==typeof l?j({h:l,s:v.s,l:v.l,a:v.a}):n(v.h)},r.prototype.isEqual=function(l){return this.toHex()===j(l).toHex()},r}(),j=function(l){return l instanceof C?l:new C(l)},O=[];v.Colord=C,v.colord=j,v.extend=function(l){l.forEach((function(l){O.indexOf(l)<0&&(l(C,E),O.push(l))}))},v.getFormat=function(l){return x(l)[1]},v.random=function(){return new C({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}},3810:l=>{l.exports=function(l){var r=function(l){var v,m,y,_=l.toHex(),w=l.alpha(),k=_.split(""),S=k[1],E=k[2],C=k[3],O=k[4],P=k[5],L=k[6],T=k[7],A=k[8];if(w>0&&w<1&&(v=parseInt(T+A,16)/255,void 0===(m=2)&&(m=0),void 0===y&&(y=Math.pow(10,m)),Math.round(y*v)/y+0!==w))return null;if(S===E&&C===O&&P===L){if(1===w)return"#"+S+C+P;if(T===A)return"#"+S+C+P+T}return _},n=function(l){return l>0&&l<1?l.toString().replace("0.","."):l};l.prototype.minify=function(l){void 0===l&&(l={});var v=this.toRgb(),m=n(v.r),y=n(v.g),_=n(v.b),w=this.toHsl(),k=n(w.h),S=n(w.s),E=n(w.l),C=n(this.alpha()),O=Object.assign({hex:!0,rgb:!0,hsl:!0},l),P=[];if(O.hex&&(1===C||O.alphaHex)){var L=r(this);L&&P.push(L)}if(O.rgb&&P.push(1===C?"rgb("+m+","+y+","+_+")":"rgba("+m+","+y+","+_+","+C+")"),O.hsl&&P.push(1===C?"hsl("+k+","+S+"%,"+E+"%)":"hsla("+k+","+S+"%,"+E+"%,"+C+")"),O.transparent&&0===m&&0===y&&0===_&&0===C)P.push("transparent");else if(1===C&&O.name&&"function"==typeof this.toName){var T=this.toName();T&&P.push(T)}return function(l){for(var v=l[0],m=1;m{l.exports=function(l,v){var m={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},y={};for(var _ in m)y[m[_]]=_;var w={};l.prototype.toName=function(v){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var _,k,S=y[this.toHex()];if(S)return S;if(null==v?void 0:v.closest){var E=this.toRgb(),C=1/0,O="black";if(!w.length)for(var P in m)w[P]=new l(m[P]).toRgb();for(var L in m){var T=(_=E,k=w[L],Math.pow(_.r-k.r,2)+Math.pow(_.g-k.g,2)+Math.pow(_.b-k.b,2));T{"use strict"; -/*! https://mths.be/cssesc v3.0.0 by @mathias */var v={};var m=v.hasOwnProperty;var y=function merge(l,v){if(!l){return v}var y={};for(var _ in v){y[_]=m.call(l,_)?l[_]:v[_]}return y};var _=/[ -,\.\/:-@\[-\^`\{-~]/;var w=/[ -,\.\/:-@\[\]\^`\{-~]/;var k=/['"\\]/;var S=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var E=function cssesc(l,v){v=y(v,cssesc.options);if(v.quotes!="single"&&v.quotes!="double"){v.quotes="single"}var m=v.quotes=="double"?'"':"'";var k=v.isIdentifier;var E=l.charAt(0);var C="";var O=0;var P=l.length;while(O126){if(T>=55296&&T<=56319&&O{"use strict"; +(()=>{var l={6615:(l,m,v)=>{"use strict";Object.defineProperty(m,"__esModule",{value:true});m.getBrowserScope=m.setBrowserScope=m.getLatestStableBrowsers=m.find=m.isSupported=m.getSupport=m.features=undefined;var y=v(4953);var w=_interopRequireDefault(y);var _=v(4907);var k=_interopRequireDefault(_);var S=v(9613);var E=v(4532);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var C=Object.keys(S.features);var O=void 0;function setBrowserScope(l){O=(0,E.cleanBrowsersList)(l)}function getBrowserScope(){return O}var P=(0,w.default)(E.parseCaniuseData,(function(l,m){return l.title+m}));function getSupport(l){var m=void 0;try{m=(0,S.feature)(S.features[l])}catch(m){var v=find(l);if(v.length===1)return getSupport(v[0]);throw new ReferenceError("Please provide a proper feature name. Cannot find "+l)}return P(m,O)}function isSupported(l,m){var v=void 0;try{v=(0,S.feature)(S.features[l])}catch(m){var y=find(l);if(y.length===1){v=S.features[y[0]]}else{throw new ReferenceError("Please provide a proper feature name. Cannot find "+l)}}return(0,k.default)(m,{ignoreUnknownVersions:true}).map((function(l){return l.split(" ")})).every((function(l){return v.stats[l[0]]&&v.stats[l[0]][l[1]]==="y"}))}function find(l){if(typeof l!=="string"){throw new TypeError("The `query` parameter should be a string.")}if(~C.indexOf(l)){return l}return C.filter((function(m){return(0,E.contains)(m,l)}))}function getLatestStableBrowsers(){return(0,k.default)("last 1 version")}setBrowserScope();m.features=C;m.getSupport=getSupport;m.isSupported=isSupported;m.find=find;m.getLatestStableBrowsers=getLatestStableBrowsers;m.setBrowserScope=setBrowserScope;m.getBrowserScope=getBrowserScope},4532:(l,m,v)=>{"use strict";Object.defineProperty(m,"__esModule",{value:true});m.contains=contains;m.parseCaniuseData=parseCaniuseData;m.cleanBrowsersList=cleanBrowsersList;var y=v(2583);var w=_interopRequireDefault(y);var _=v(4907);var k=_interopRequireDefault(_);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function contains(l,m){return!!~l.indexOf(m)}function parseCaniuseData(l,m){var v={};var y;var w;m.forEach((function(m){v[m]={};for(var _ in l.stats[m]){y=l.stats[m][_].replace(/#\d+/,"").trim().split(" ");_=parseFloat(_.split("-")[0]);if(isNaN(_))continue;for(var k=0;kv[m][w]){v[m][w]=_}}}}}));return v}function cleanBrowsersList(l){return(0,w.default)((0,k.default)(l).map((function(l){return l.split(" ")[0]})))}},3251:(l,m)=>{Object.defineProperty(m,"__esModule",{value:!0});var v={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(l){return"string"==typeof l?l.length>0:"number"==typeof l},n=function(l,m,v){return void 0===m&&(m=0),void 0===v&&(v=Math.pow(10,m)),Math.round(v*l)/v+0},e=function(l,m,v){return void 0===m&&(m=0),void 0===v&&(v=1),l>v?v:l>m?l:m},u=function(l){return(l=isFinite(l)?l%360:0)>0?l:l+360},o=function(l){return{r:e(l.r,0,255),g:e(l.g,0,255),b:e(l.b,0,255),a:e(l.a)}},a=function(l){return{r:n(l.r),g:n(l.g),b:n(l.b),a:n(l.a,3)}},y=/^#([0-9a-f]{3,8})$/i,i=function(l){var m=l.toString(16);return m.length<2?"0"+m:m},h=function(l){var m=l.r,v=l.g,y=l.b,w=l.a,_=Math.max(m,v,y),k=_-Math.min(m,v,y),S=k?_===m?(v-y)/k:_===v?2+(y-m)/k:4+(m-v)/k:0;return{h:60*(S<0?S+6:S),s:_?k/_*100:0,v:_/255*100,a:w}},b=function(l){var m=l.h,v=l.s,y=l.v,w=l.a;m=m/360*6,v/=100,y/=100;var _=Math.floor(m),k=y*(1-v),S=y*(1-(m-_)*v),E=y*(1-(1-m+_)*v),C=_%6;return{r:255*[y,S,k,k,E,y][C],g:255*[E,y,y,S,k,k][C],b:255*[k,k,E,y,y,S][C],a:w}},d=function(l){return{h:u(l.h),s:e(l.s,0,100),l:e(l.l,0,100),a:e(l.a)}},g=function(l){return{h:n(l.h),s:n(l.s),l:n(l.l),a:n(l.a,3)}},f=function(l){return b((v=(m=l).s,{h:m.h,s:(v*=((y=m.l)<50?y:100-y)/100)>0?2*v/(y+v)*100:0,v:y+v,a:m.a}));var m,v,y},p=function(l){return{h:(m=h(l)).h,s:(w=(200-(v=m.s))*(y=m.v)/100)>0&&w<200?v*y/100/(w<=100?w:200-w)*100:0,l:w/2,a:m.a};var m,v,y,w},w=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,k=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,E={string:[[function(l){var m=y.exec(l);return m?(l=m[1]).length<=4?{r:parseInt(l[0]+l[0],16),g:parseInt(l[1]+l[1],16),b:parseInt(l[2]+l[2],16),a:4===l.length?n(parseInt(l[3]+l[3],16)/255,2):1}:6===l.length||8===l.length?{r:parseInt(l.substr(0,2),16),g:parseInt(l.substr(2,2),16),b:parseInt(l.substr(4,2),16),a:8===l.length?n(parseInt(l.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(l){var m=k.exec(l)||S.exec(l);return m?m[2]!==m[4]||m[4]!==m[6]?null:o({r:Number(m[1])/(m[2]?100/255:1),g:Number(m[3])/(m[4]?100/255:1),b:Number(m[5])/(m[6]?100/255:1),a:void 0===m[7]?1:Number(m[7])/(m[8]?100:1)}):null},"rgb"],[function(l){var m=w.exec(l)||_.exec(l);if(!m)return null;var y,k,S=d({h:(y=m[1],k=m[2],void 0===k&&(k="deg"),Number(y)*(v[k]||1)),s:Number(m[3]),l:Number(m[4]),a:void 0===m[5]?1:Number(m[5])/(m[6]?100:1)});return f(S)},"hsl"]],object:[[function(l){var m=l.r,v=l.g,y=l.b,w=l.a,_=void 0===w?1:w;return t(m)&&t(v)&&t(y)?o({r:Number(m),g:Number(v),b:Number(y),a:Number(_)}):null},"rgb"],[function(l){var m=l.h,v=l.s,y=l.l,w=l.a,_=void 0===w?1:w;if(!t(m)||!t(v)||!t(y))return null;var k=d({h:Number(m),s:Number(v),l:Number(y),a:Number(_)});return f(k)},"hsl"],[function(l){var m=l.h,v=l.s,y=l.v,w=l.a,_=void 0===w?1:w;if(!t(m)||!t(v)||!t(y))return null;var k=function(l){return{h:u(l.h),s:e(l.s,0,100),v:e(l.v,0,100),a:e(l.a)}}({h:Number(m),s:Number(v),v:Number(y),a:Number(_)});return b(k)},"hsv"]]},N=function(l,m){for(var v=0;v=.5},r.prototype.toHex=function(){return l=a(this.rgba),m=l.r,v=l.g,y=l.b,_=(w=l.a)<1?i(n(255*w)):"","#"+i(m)+i(v)+i(y)+_;var l,m,v,y,w,_},r.prototype.toRgb=function(){return a(this.rgba)},r.prototype.toRgbString=function(){return l=a(this.rgba),m=l.r,v=l.g,y=l.b,(w=l.a)<1?"rgba("+m+", "+v+", "+y+", "+w+")":"rgb("+m+", "+v+", "+y+")";var l,m,v,y,w},r.prototype.toHsl=function(){return g(p(this.rgba))},r.prototype.toHslString=function(){return l=g(p(this.rgba)),m=l.h,v=l.s,y=l.l,(w=l.a)<1?"hsla("+m+", "+v+"%, "+y+"%, "+w+")":"hsl("+m+", "+v+"%, "+y+"%)";var l,m,v,y,w},r.prototype.toHsv=function(){return l=h(this.rgba),{h:n(l.h),s:n(l.s),v:n(l.v),a:n(l.a,3)};var l},r.prototype.invert=function(){return j({r:255-(l=this.rgba).r,g:255-l.g,b:255-l.b,a:l.a});var l},r.prototype.saturate=function(l){return void 0===l&&(l=.1),j(M(this.rgba,l))},r.prototype.desaturate=function(l){return void 0===l&&(l=.1),j(M(this.rgba,-l))},r.prototype.grayscale=function(){return j(M(this.rgba,-1))},r.prototype.lighten=function(l){return void 0===l&&(l=.1),j(H(this.rgba,l))},r.prototype.darken=function(l){return void 0===l&&(l=.1),j(H(this.rgba,-l))},r.prototype.rotate=function(l){return void 0===l&&(l=15),this.hue(this.hue()+l)},r.prototype.alpha=function(l){return"number"==typeof l?j({r:(m=this.rgba).r,g:m.g,b:m.b,a:l}):n(this.rgba.a,3);var m},r.prototype.hue=function(l){var m=p(this.rgba);return"number"==typeof l?j({h:l,s:m.s,l:m.l,a:m.a}):n(m.h)},r.prototype.isEqual=function(l){return this.toHex()===j(l).toHex()},r}(),j=function(l){return l instanceof C?l:new C(l)},O=[];m.Colord=C,m.colord=j,m.extend=function(l){l.forEach((function(l){O.indexOf(l)<0&&(l(C,E),O.push(l))}))},m.getFormat=function(l){return x(l)[1]},m.random=function(){return new C({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}},47:l=>{l.exports=function(l){var r=function(l){var m,v,y,w=l.toHex(),_=l.alpha(),k=w.split(""),S=k[1],E=k[2],C=k[3],O=k[4],P=k[5],L=k[6],T=k[7],R=k[8];if(_>0&&_<1&&(m=parseInt(T+R,16)/255,void 0===(v=2)&&(v=0),void 0===y&&(y=Math.pow(10,v)),Math.round(y*m)/y+0!==_))return null;if(S===E&&C===O&&P===L){if(1===_)return"#"+S+C+P;if(T===R)return"#"+S+C+P+T}return w},n=function(l){return l>0&&l<1?l.toString().replace("0.","."):l};l.prototype.minify=function(l){void 0===l&&(l={});var m=this.toRgb(),v=n(m.r),y=n(m.g),w=n(m.b),_=this.toHsl(),k=n(_.h),S=n(_.s),E=n(_.l),C=n(this.alpha()),O=Object.assign({hex:!0,rgb:!0,hsl:!0},l),P=[];if(O.hex&&(1===C||O.alphaHex)){var L=r(this);L&&P.push(L)}if(O.rgb&&P.push(1===C?"rgb("+v+","+y+","+w+")":"rgba("+v+","+y+","+w+","+C+")"),O.hsl&&P.push(1===C?"hsl("+k+","+S+"%,"+E+"%)":"hsla("+k+","+S+"%,"+E+"%,"+C+")"),O.transparent&&0===v&&0===y&&0===w&&0===C)P.push("transparent");else if(1===C&&O.name&&"function"==typeof this.toName){var T=this.toName();T&&P.push(T)}return function(l){for(var m=l[0],v=1;v{l.exports=function(l,m){var v={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},y={};for(var w in v)y[v[w]]=w;var _={};l.prototype.toName=function(m){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var w,k,S=y[this.toHex()];if(S)return S;if(null==m?void 0:m.closest){var E=this.toRgb(),C=1/0,O="black";if(!_.length)for(var P in v)_[P]=new l(v[P]).toRgb();for(var L in v){var T=(w=E,k=_[L],Math.pow(w.r-k.r,2)+Math.pow(w.g-k.g,2)+Math.pow(w.b-k.b,2));T{"use strict"; +/*! https://mths.be/cssesc v3.0.0 by @mathias */var m={};var v=m.hasOwnProperty;var y=function merge(l,m){if(!l){return m}var y={};for(var w in m){y[w]=v.call(l,w)?l[w]:m[w]}return y};var w=/[ -,\.\/:-@\[-\^`\{-~]/;var _=/[ -,\.\/:-@\[\]\^`\{-~]/;var k=/['"\\]/;var S=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var E=function cssesc(l,m){m=y(m,cssesc.options);if(m.quotes!="single"&&m.quotes!="double"){m.quotes="single"}var v=m.quotes=="double"?'"':"'";var k=m.isIdentifier;var E=l.charAt(0);var C="";var O=0;var P=l.length;while(O126){if(T>=55296&&T<=56319&&O{"use strict"; /** * @author Ben Briggs * @license MIT @@ -12,68 +12,68 @@ * output to look different in certain use cases, but not others. These * transforms have been moved from the defaults to other presets, to make * this preset require only minimal configuration. - */const y=m(4102);const _=m(3824);const w=m(9549);const k=m(665);const S=m(7254);const E=m(8936);const C=m(1651);const O=m(6654);const P=m(3426);const L=m(6691);const T=m(9108);const A=m(6581);const R=m(1064);const D=m(2069);const q=m(6680);const F=m(4379);const $=m(374);const V=m(3440);const B=m(1026);const z=m(6121);const U=m(428);const W=m(5317);const Q=m(625);const G=m(1792);const Y=m(9585);const J=m(5187);const Z=m(2066);const X=m(1347);const{rawCache:K}=m(506);const ee={convertValues:{length:false},normalizeCharset:{add:false},cssDeclarationSorter:{keepOverrides:true}};function defaultPreset(l={}){const v=Object.assign({},ee,l);const m=[[_,v.discardComments],[k,v.minifyGradients],[w,v.reduceInitial],[S,v.svgo],[Z,v.normalizeDisplayValues],[E,v.reduceTransforms],[P,v.colormin],[X,v.normalizeTimingFunctions],[O,v.calc],[C,v.convertValues],[L,v.orderedValues],[T,v.minifySelectors],[A,v.minifyParams],[R,v.normalizeCharset],[V,v.discardOverridden],[Q,v.normalizeString],[J,v.normalizeUnicode],[D,v.minifyFontValues],[q,v.normalizeUrl],[B,v.normalizeRepeatStyle],[G,v.normalizePositions],[Y,v.normalizeWhitespace],[F,v.mergeLonghand],[$,v.discardDuplicates],[z,v.mergeRules],[U,v.discardEmpty],[W,v.uniqueSelectors],[y,v.cssDeclarationSorter],[K,v.rawCache]];return{plugins:m}}l.exports=defaultPreset},861:l=>{"use strict";l.exports=function getArguments(l){const v=[[]];for(const m of l.nodes){if(m.type!=="div"){v[v.length-1].push(m)}else{v.push([])}}return v}},506:(l,v,m)=>{"use strict";const y=m(6533);const _=m(861);const w=m(3323);l.exports={rawCache:y,getArguments:_,sameParent:w}},6533:l=>{"use strict";function pluginCreator(){return{postcssPlugin:"cssnano-util-raw-cache",OnceExit(l,{result:v}){v.root.rawCache={colon:":",indent:"",beforeDecl:"",beforeRule:"",beforeOpen:"",beforeClose:"",beforeComment:"",after:"",emptyBody:"",commentLeft:"",commentRight:""}}}}pluginCreator.postcss=true;l.exports=pluginCreator},3323:l=>{"use strict";function checkMatch(l,v){if(l.type==="atrule"&&v.type==="atrule"){return l.params===v.params&&l.name.toLowerCase()===v.name.toLowerCase()}return l.type===v.type}function sameParent(l,v){if(!l.parent){return!v.parent}if(!v.parent){return false}if(!checkMatch(l.parent,v.parent)){return false}return sameParent(l.parent,v.parent)}l.exports=sameParent},6719:l=>{l.exports={"0.20":"39",.21:"41",.22:"41",.23:"41",.24:"41",.25:"42",.26:"42",.27:"43",.28:"43",.29:"43","0.30":"44",.31:"45",.32:"45",.33:"45",.34:"45",.35:"45",.36:"47",.37:"49","1.0":"49",1.1:"50",1.2:"51",1.3:"52",1.4:"53",1.5:"54",1.6:"56",1.7:"58",1.8:"59","2.0":"61",2.1:"61","3.0":"66",3.1:"66","4.0":"69",4.1:"69",4.2:"69","5.0":"73","6.0":"76",6.1:"76","7.0":"78",7.1:"78",7.2:"78",7.3:"78","8.0":"80",8.1:"80",8.2:"80",8.3:"80",8.4:"80",8.5:"80","9.0":"83",9.1:"83",9.2:"83",9.3:"83",9.4:"83","10.0":"85",10.1:"85",10.2:"85",10.3:"85",10.4:"85","11.0":"87",11.1:"87",11.2:"87",11.3:"87",11.4:"87",11.5:"87","12.0":"89",12.1:"89",12.2:"89","13.0":"91",13.1:"91",13.2:"91",13.3:"91",13.4:"91",13.5:"91",13.6:"91","14.0":"93",14.1:"93",14.2:"93","15.0":"94",15.1:"94",15.2:"94",15.3:"94",15.4:"94","16.0":"96",16.1:"96","17.0":"98",17.1:"98","18.0":"100"}},4538:l=>{var v="Expected a function";var m="__lodash_hash_undefined__";var y="[object Function]",_="[object GeneratorFunction]";var w=/[\\^$.*+?()[\]{}|]/g;var k=/^\[object .+?Constructor\]$/;var S=typeof global=="object"&&global&&global.Object===Object&&global;var E=typeof self=="object"&&self&&self.Object===Object&&self;var C=S||E||Function("return this")();function getValue(l,v){return l==null?undefined:l[v]}function isHostObject(l){var v=false;if(l!=null&&typeof l.toString!="function"){try{v=!!(l+"")}catch(l){}}return v}var O=Array.prototype,P=Function.prototype,L=Object.prototype;var T=C["__core-js_shared__"];var A=function(){var l=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}();var R=P.toString;var D=L.hasOwnProperty;var q=L.toString;var F=RegExp("^"+R.call(D).replace(w,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var $=O.splice;var V=getNative(C,"Map"),B=getNative(Object,"create");function Hash(l){var v=-1,m=l?l.length:0;this.clear();while(++v-1}function listCacheSet(l,v){var m=this.__data__,y=assocIndexOf(m,l);if(y<0){m.push([l,v])}else{m[y][1]=v}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(l){var v=-1,m=l?l.length:0;this.clear();while(++v{var v=200;var m="__lodash_hash_undefined__";var y=1/0;var _="[object Function]",w="[object GeneratorFunction]";var k=/[\\^$.*+?()[\]{}|]/g;var S=/^\[object .+?Constructor\]$/;var E=typeof global=="object"&&global&&global.Object===Object&&global;var C=typeof self=="object"&&self&&self.Object===Object&&self;var O=E||C||Function("return this")();function arrayIncludes(l,v){var m=l?l.length:0;return!!m&&baseIndexOf(l,v,0)>-1}function arrayIncludesWith(l,v,m){var y=-1,_=l?l.length:0;while(++y<_){if(m(v,l[y])){return true}}return false}function baseFindIndex(l,v,m,y){var _=l.length,w=m+(y?1:-1);while(y?w--:++w<_){if(v(l[w],w,l)){return w}}return-1}function baseIndexOf(l,v,m){if(v!==v){return baseFindIndex(l,baseIsNaN,m)}var y=m-1,_=l.length;while(++y<_){if(l[y]===v){return y}}return-1}function baseIsNaN(l){return l!==l}function cacheHas(l,v){return l.has(v)}function getValue(l,v){return l==null?undefined:l[v]}function isHostObject(l){var v=false;if(l!=null&&typeof l.toString!="function"){try{v=!!(l+"")}catch(l){}}return v}function setToArray(l){var v=-1,m=Array(l.size);l.forEach((function(l){m[++v]=l}));return m}var P=Array.prototype,L=Function.prototype,T=Object.prototype;var A=O["__core-js_shared__"];var R=function(){var l=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}();var D=L.toString;var q=T.hasOwnProperty;var F=T.toString;var $=RegExp("^"+D.call(q).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var V=P.splice;var B=getNative(O,"Map"),z=getNative(O,"Set"),U=getNative(Object,"create");function Hash(l){var v=-1,m=l?l.length:0;this.clear();while(++v-1}function listCacheSet(l,v){var m=this.__data__,y=assocIndexOf(m,l);if(y<0){m.push([l,v])}else{m[y][1]=v}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(l){var v=-1,m=l?l.length:0;this.clear();while(++v=v){var O=m?null:W(l);if(O){return setToArray(O)}S=false;w=cacheHas;C=new SetCache}else{C=m?[]:E}e:while(++_{"use strict";const v="text/plain";const m="us-ascii";const testParameter=(l,v)=>v.some((v=>v instanceof RegExp?v.test(l):v===l));const normalizeDataURL=(l,{stripHash:y})=>{const _=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(l);if(!_){throw new Error(`Invalid URL: ${l}`)}let{type:w,data:k,hash:S}=_.groups;const E=w.split(";");S=y?"":S;let C=false;if(E[E.length-1]==="base64"){E.pop();C=true}const O=(E.shift()||"").toLowerCase();const P=E.map((l=>{let[v,y=""]=l.split("=").map((l=>l.trim()));if(v==="charset"){y=y.toLowerCase();if(y===m){return""}}return`${v}${y?`=${y}`:""}`})).filter(Boolean);const L=[...P];if(C){L.push("base64")}if(L.length!==0||O&&O!==v){L.unshift(O)}return`data:${L.join(";")},${C?k.trim():k}${S?`#${S}`:""}`};const normalizeUrl=(l,v)=>{v={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripTextFragment:true,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeSingleSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...v};l=l.trim();if(/^data:/i.test(l)){return normalizeDataURL(l,v)}if(/^view-source:/i.test(l)){throw new Error("`view-source:` is not supported as it is a non-standard protocol")}const m=l.startsWith("//");const y=!m&&/^\.*\//.test(l);if(!y){l=l.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,v.defaultProtocol)}const _=new URL(l);if(v.forceHttp&&v.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(v.forceHttp&&_.protocol==="https:"){_.protocol="http:"}if(v.forceHttps&&_.protocol==="http:"){_.protocol="https:"}if(v.stripAuthentication){_.username="";_.password=""}if(v.stripHash){_.hash=""}else if(v.stripTextFragment){_.hash=_.hash.replace(/#?:~:text.*?$/i,"")}if(_.pathname){_.pathname=_.pathname.replace(/(?0){let l=_.pathname.split("/");const m=l[l.length-1];if(testParameter(m,v.removeDirectoryIndex)){l=l.slice(0,l.length-1);_.pathname=l.slice(1).join("/")+"/"}}if(_.hostname){_.hostname=_.hostname.replace(/\.$/,"");if(v.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(_.hostname)){_.hostname=_.hostname.replace(/^www\./,"")}}if(Array.isArray(v.removeQueryParameters)){for(const l of[..._.searchParams.keys()]){if(testParameter(l,v.removeQueryParameters)){_.searchParams.delete(l)}}}if(v.removeQueryParameters===true){_.search=""}if(v.sortQueryParameters){_.searchParams.sort()}if(v.removeTrailingSlash){_.pathname=_.pathname.replace(/\/$/,"")}const w=l;l=_.toString();if(!v.removeSingleSlash&&_.pathname==="/"&&!w.endsWith("/")&&_.hash===""){l=l.replace(/\/$/,"")}if((v.removeTrailingSlash||_.pathname==="/")&&_.hash===""&&v.removeSingleSlash){l=l.replace(/\/$/,"")}if(m&&!v.normalizeProtocol){l=l.replace(/^http:\/\//,"//")}if(v.stripProtocol){l=l.replace(/^(?:https?:)?\/\//,"")}return l};l.exports=normalizeUrl},6654:(l,v,m)=>{"use strict";const y=m(7725);function pluginCreator(l){const v=Object.assign({precision:5,preserve:false,warnWhenCannotResolve:false,mediaQueries:false,selectors:false},l);return{postcssPlugin:"postcss-calc",OnceExit(l,{result:m}){l.walk((l=>{const{type:_}=l;if(_==="decl"){y(l,"value",v,m)}if(_==="atrule"&&v.mediaQueries){y(l,"params",v,m)}if(_==="rule"&&v.selectors){y(l,"selector",v,m)}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},8269:l=>{"use strict";const v={px:{px:1,cm:96/2.54,mm:96/25.4,q:96/101.6,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,q:.025,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,q:.25,in:25.4,pt:25.4/72,pc:25.4/6},q:{px:101.6/96,cm:40,mm:4,q:1,in:101.6,pt:101.6/72,pc:101.6/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,q:1/101.6,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,q:72/101.6,in:72,pt:1,pc:12},pc:{px:.0625,cm:6/2.54,mm:6/25.4,q:6/101.6,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:1/360,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},hz:{hz:1,khz:1e3},khz:{hz:.001,khz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};function convertUnit(l,m,y,_){const w=m.toLowerCase();const k=y.toLowerCase();if(!v[k]){throw new Error("Cannot convert to "+y)}if(!v[k][w]){throw new Error("Cannot convert from "+m+" to "+y)}const S=v[k][w]*l;if(_!==false){_=Math.pow(10,Math.ceil(_)||5);return Math.round(S*_)/_}return S}l.exports=convertUnit},9983:(l,v,m)=>{"use strict";const y=m(8269);function isValueType(l){switch(l.type){case"LengthValue":case"AngleValue":case"TimeValue":case"FrequencyValue":case"ResolutionValue":case"EmValue":case"ExValue":case"ChValue":case"RemValue":case"VhValue":case"VwValue":case"VminValue":case"VmaxValue":case"PercentageValue":case"Number":return true}return false}function flip(l){return l==="+"?"-":"+"}function isAddSubOperator(l){return l==="+"||l==="-"}function collectAddSubItems(l,v,m,y){if(!isAddSubOperator(l)){throw new Error(`invalid operator ${l}`)}if(isValueType(v)){const _=m.findIndex((l=>l.node.type===v.type));if(_>=0){if(v.value===0){return}const w=m[_].node;const{left:k,right:S}=convertNodesUnits(w,v,y);if(m[_].preOperator==="-"){m[_].preOperator="+";k.value*=-1}if(l==="+"){k.value+=S.value}else{k.value-=S.value}if(k.value>=0){m[_]={node:k,preOperator:"+"}}else{k.value*=-1;m[_]={node:k,preOperator:"-"}}}else{if(v.value>=0){m.push({node:v,preOperator:l})}else{v.value*=-1;m.push({node:v,preOperator:flip(l)})}}}else if(v.type==="MathExpression"){if(isAddSubOperator(v.operator)){collectAddSubItems(l,v.left,m,y);const _=l==="-"?flip(v.operator):v.operator;collectAddSubItems(_,v.right,m,y)}else{const _=reduce(v,y);if(_.type!=="MathExpression"||isAddSubOperator(_.operator)){collectAddSubItems(l,_,m,y)}else{m.push({node:_,preOperator:l})}}}else if(v.type==="ParenthesizedExpression"){collectAddSubItems(l,v.content,m,y)}else{m.push({node:v,preOperator:l})}}function reduceAddSubExpression(l,v){const m=[];collectAddSubItems("+",l,m,v);const y=m.filter((l=>!(isValueType(l.node)&&l.node.value===0)));const _=y[0];if(!_||_.preOperator==="-"&&!isValueType(_.node)){const l=m.find((l=>isValueType(l.node)&&l.node.value===0));if(l){y.unshift(l)}}if(y[0].preOperator==="-"&&isValueType(y[0].node)){y[0].node.value*=-1;y[0].preOperator="+"}let w=y[0].node;for(let l=1;l{"use strict";const v={"*":0,"/":0,"+":1,"-":1};function round(l,v){if(v!==false){const m=Math.pow(10,v);return Math.round(l*m)/m}return l}function stringify(l,m){switch(l.type){case"MathExpression":{const{left:y,right:_,operator:w}=l;let k="";if(y.type==="MathExpression"&&v[w]{"use strict";const y=m(2997);const _=m(9285);const{parser:w}=m(4580);const k=m(9983);const S=m(7420);const E=/((?:-(moz|webkit)-)?calc)/i;function transformValue(l,v,m,y){return _(l).walk((C=>{if(C.type!=="function"||!E.test(C.value)){return}const O=_.stringify(C.nodes);const P=w.parse(O);const L=k(P,v.precision);C.type="word";C.value=S(C.value,L,l,v,m,y);return false})).toString()}function transformSelector(l,v,m,_){return y((l=>{l.walk((l=>{if(l.type==="attribute"&&l.value){l.setValue(transformValue(l.value,v,m,_))}if(l.type==="tag"){l.value=transformValue(l.value,v,m,_)}return}))})).processSync(l)}l.exports=(l,v,m,y)=>{let _=l[v];try{_=v==="selector"?transformSelector(l[v],m,y,l):transformValue(l[v],m,y,l)}catch(v){if(v instanceof Error){y.warn(v.message,{node:l})}else{y.warn("Error",{node:l})}return}if(m.preserve&&l[v]!==_){const m=l.clone();m[v]=_;l.parent.insertBefore(l,m)}else{l[v]=_}}},4580:(l,v)=>{var m=function(){function JisonParserError(l,v){Object.defineProperty(this,"name",{enumerable:false,writable:false,value:"JisonParserError"});if(l==null)l="???";Object.defineProperty(this,"message",{enumerable:false,writable:true,value:l});this.hash=v;var m;if(v&&v.exception instanceof Error){var y=v.exception;this.message=y.message||l;m=y.stack}if(!m){if(Error.hasOwnProperty("captureStackTrace")){Error.captureStackTrace(this,this.constructor)}else{m=new Error(l).stack}}if(m){Object.defineProperty(this,"stack",{enumerable:false,writable:false,value:m})}}if(typeof Object.setPrototypeOf==="function"){Object.setPrototypeOf(JisonParserError.prototype,Error.prototype)}else{JisonParserError.prototype=Object.create(Error.prototype)}JisonParserError.prototype.constructor=JisonParserError;JisonParserError.prototype.name="JisonParserError";function bp(l){var v=[];var m=l.pop;var y=l.rule;for(var _=0,w=m.length;_{"use strict";l.exports=function getArguments(l){const m=[[]];for(const v of l.nodes){if(v.type!=="div"){m[m.length-1].push(v)}else{m.push([])}}return m}},39:(l,m,v)=>{"use strict";const y=v(3496);const w=v(3280);const _=v(8202);l.exports={rawCache:y,getArguments:w,sameParent:_}},3496:l=>{"use strict";function pluginCreator(){return{postcssPlugin:"cssnano-util-raw-cache",OnceExit(l,{result:m}){m.root.rawCache={colon:":",indent:"",beforeDecl:"",beforeRule:"",beforeOpen:"",beforeClose:"",beforeComment:"",after:"",emptyBody:"",commentLeft:"",commentRight:""}}}}pluginCreator.postcss=true;l.exports=pluginCreator},8202:l=>{"use strict";function checkMatch(l,m){if(l.type==="atrule"&&m.type==="atrule"){return l.params===m.params&&l.name.toLowerCase()===m.name.toLowerCase()}return l.type===m.type}function sameParent(l,m){if(!l.parent){return!m.parent}if(!m.parent){return false}if(!checkMatch(l.parent,m.parent)){return false}return sameParent(l.parent,m.parent)}l.exports=sameParent},4953:l=>{var m="Expected a function";var v="__lodash_hash_undefined__";var y="[object Function]",w="[object GeneratorFunction]";var _=/[\\^$.*+?()[\]{}|]/g;var k=/^\[object .+?Constructor\]$/;var S=typeof global=="object"&&global&&global.Object===Object&&global;var E=typeof self=="object"&&self&&self.Object===Object&&self;var C=S||E||Function("return this")();function getValue(l,m){return l==null?undefined:l[m]}function isHostObject(l){var m=false;if(l!=null&&typeof l.toString!="function"){try{m=!!(l+"")}catch(l){}}return m}var O=Array.prototype,P=Function.prototype,L=Object.prototype;var T=C["__core-js_shared__"];var R=function(){var l=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}();var D=P.toString;var A=L.hasOwnProperty;var q=L.toString;var F=RegExp("^"+D.call(A).replace(_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var $=O.splice;var z=getNative(C,"Map"),V=getNative(Object,"create");function Hash(l){var m=-1,v=l?l.length:0;this.clear();while(++m-1}function listCacheSet(l,m){var v=this.__data__,y=assocIndexOf(v,l);if(y<0){v.push([l,m])}else{v[y][1]=m}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(l){var m=-1,v=l?l.length:0;this.clear();while(++m{var m=200;var v="__lodash_hash_undefined__";var y=1/0;var w="[object Function]",_="[object GeneratorFunction]";var k=/[\\^$.*+?()[\]{}|]/g;var S=/^\[object .+?Constructor\]$/;var E=typeof global=="object"&&global&&global.Object===Object&&global;var C=typeof self=="object"&&self&&self.Object===Object&&self;var O=E||C||Function("return this")();function arrayIncludes(l,m){var v=l?l.length:0;return!!v&&baseIndexOf(l,m,0)>-1}function arrayIncludesWith(l,m,v){var y=-1,w=l?l.length:0;while(++y-1}function listCacheSet(l,m){var v=this.__data__,y=assocIndexOf(v,l);if(y<0){v.push([l,m])}else{v[y][1]=m}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(l){var m=-1,v=l?l.length:0;this.clear();while(++m=m){var O=v?null:B(l);if(O){return setToArray(O)}S=false;_=cacheHas;C=new SetCache}else{C=v?[]:E}e:while(++w{"use strict";const m="text/plain";const v="us-ascii";const testParameter=(l,m)=>m.some((m=>m instanceof RegExp?m.test(l):m===l));const normalizeDataURL=(l,{stripHash:y})=>{const w=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(l);if(!w){throw new Error(`Invalid URL: ${l}`)}let{type:_,data:k,hash:S}=w.groups;const E=_.split(";");S=y?"":S;let C=false;if(E[E.length-1]==="base64"){E.pop();C=true}const O=(E.shift()||"").toLowerCase();const P=E.map((l=>{let[m,y=""]=l.split("=").map((l=>l.trim()));if(m==="charset"){y=y.toLowerCase();if(y===v){return""}}return`${m}${y?`=${y}`:""}`})).filter(Boolean);const L=[...P];if(C){L.push("base64")}if(L.length!==0||O&&O!==m){L.unshift(O)}return`data:${L.join(";")},${C?k.trim():k}${S?`#${S}`:""}`};const normalizeUrl=(l,m)=>{m={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripTextFragment:true,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeSingleSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...m};l=l.trim();if(/^data:/i.test(l)){return normalizeDataURL(l,m)}if(/^view-source:/i.test(l)){throw new Error("`view-source:` is not supported as it is a non-standard protocol")}const v=l.startsWith("//");const y=!v&&/^\.*\//.test(l);if(!y){l=l.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,m.defaultProtocol)}const w=new URL(l);if(m.forceHttp&&m.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(m.forceHttp&&w.protocol==="https:"){w.protocol="http:"}if(m.forceHttps&&w.protocol==="http:"){w.protocol="https:"}if(m.stripAuthentication){w.username="";w.password=""}if(m.stripHash){w.hash=""}else if(m.stripTextFragment){w.hash=w.hash.replace(/#?:~:text.*?$/i,"")}if(w.pathname){w.pathname=w.pathname.replace(/(?0){let l=w.pathname.split("/");const v=l[l.length-1];if(testParameter(v,m.removeDirectoryIndex)){l=l.slice(0,l.length-1);w.pathname=l.slice(1).join("/")+"/"}}if(w.hostname){w.hostname=w.hostname.replace(/\.$/,"");if(m.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(w.hostname)){w.hostname=w.hostname.replace(/^www\./,"")}}if(Array.isArray(m.removeQueryParameters)){for(const l of[...w.searchParams.keys()]){if(testParameter(l,m.removeQueryParameters)){w.searchParams.delete(l)}}}if(m.removeQueryParameters===true){w.search=""}if(m.sortQueryParameters){w.searchParams.sort()}if(m.removeTrailingSlash){w.pathname=w.pathname.replace(/\/$/,"")}const _=l;l=w.toString();if(!m.removeSingleSlash&&w.pathname==="/"&&!_.endsWith("/")&&w.hash===""){l=l.replace(/\/$/,"")}if((m.removeTrailingSlash||w.pathname==="/")&&w.hash===""&&m.removeSingleSlash){l=l.replace(/\/$/,"")}if(v&&!m.normalizeProtocol){l=l.replace(/^http:\/\//,"//")}if(m.stripProtocol){l=l.replace(/^(?:https?:)?\/\//,"")}return l};l.exports=normalizeUrl},4491:(l,m,v)=>{"use strict";const y=v(1229);function pluginCreator(l){const m=Object.assign({precision:5,preserve:false,warnWhenCannotResolve:false,mediaQueries:false,selectors:false},l);return{postcssPlugin:"postcss-calc",OnceExit(l,{result:v}){l.walk((l=>{const{type:w}=l;if(w==="decl"){y(l,"value",m,v)}if(w==="atrule"&&m.mediaQueries){y(l,"params",m,v)}if(w==="rule"&&m.selectors){y(l,"selector",m,v)}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},2663:l=>{"use strict";const m={px:{px:1,cm:96/2.54,mm:96/25.4,q:96/101.6,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,q:.025,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,q:.25,in:25.4,pt:25.4/72,pc:25.4/6},q:{px:101.6/96,cm:40,mm:4,q:1,in:101.6,pt:101.6/72,pc:101.6/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,q:1/101.6,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,q:72/101.6,in:72,pt:1,pc:12},pc:{px:.0625,cm:6/2.54,mm:6/25.4,q:6/101.6,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:1/360,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},hz:{hz:1,khz:1e3},khz:{hz:.001,khz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};function convertUnit(l,v,y,w){const _=v.toLowerCase();const k=y.toLowerCase();if(!m[k]){throw new Error("Cannot convert to "+y)}if(!m[k][_]){throw new Error("Cannot convert from "+v+" to "+y)}const S=m[k][_]*l;if(w!==false){w=Math.pow(10,Math.ceil(w)||5);return Math.round(S*w)/w}return S}l.exports=convertUnit},9285:(l,m,v)=>{"use strict";const y=v(2663);function isValueType(l){switch(l.type){case"LengthValue":case"AngleValue":case"TimeValue":case"FrequencyValue":case"ResolutionValue":case"EmValue":case"ExValue":case"ChValue":case"RemValue":case"VhValue":case"VwValue":case"VminValue":case"VmaxValue":case"PercentageValue":case"Number":return true}return false}function flip(l){return l==="+"?"-":"+"}function isAddSubOperator(l){return l==="+"||l==="-"}function collectAddSubItems(l,m,v,y){if(!isAddSubOperator(l)){throw new Error(`invalid operator ${l}`)}if(isValueType(m)){const w=v.findIndex((l=>l.node.type===m.type));if(w>=0){if(m.value===0){return}const _=v[w].node;const{left:k,right:S}=convertNodesUnits(_,m,y);if(v[w].preOperator==="-"){v[w].preOperator="+";k.value*=-1}if(l==="+"){k.value+=S.value}else{k.value-=S.value}if(k.value>=0){v[w]={node:k,preOperator:"+"}}else{k.value*=-1;v[w]={node:k,preOperator:"-"}}}else{if(m.value>=0){v.push({node:m,preOperator:l})}else{m.value*=-1;v.push({node:m,preOperator:flip(l)})}}}else if(m.type==="MathExpression"){if(isAddSubOperator(m.operator)){collectAddSubItems(l,m.left,v,y);const w=l==="-"?flip(m.operator):m.operator;collectAddSubItems(w,m.right,v,y)}else{const w=reduce(m,y);if(w.type!=="MathExpression"||isAddSubOperator(w.operator)){collectAddSubItems(l,w,v,y)}else{v.push({node:w,preOperator:l})}}}else if(m.type==="ParenthesizedExpression"){collectAddSubItems(l,m.content,v,y)}else{v.push({node:m,preOperator:l})}}function reduceAddSubExpression(l,m){const v=[];collectAddSubItems("+",l,v,m);const y=v.filter((l=>!(isValueType(l.node)&&l.node.value===0)));const w=y[0];if(!w||w.preOperator==="-"&&!isValueType(w.node)){const l=v.find((l=>isValueType(l.node)&&l.node.value===0));if(l){y.unshift(l)}}if(y[0].preOperator==="-"&&isValueType(y[0].node)){y[0].node.value*=-1;y[0].preOperator="+"}let _=y[0].node;for(let l=1;l{"use strict";const m={"*":0,"/":0,"+":1,"-":1};function round(l,m){if(m!==false){const v=Math.pow(10,m);return Math.round(l*v)/v}return l}function stringify(l,v){switch(l.type){case"MathExpression":{const{left:y,right:w,operator:_}=l;let k="";if(y.type==="MathExpression"&&m[_]{"use strict";const y=v(475);const w=v(2045);const{parser:_}=v(1762);const k=v(9285);const S=v(9476);const E=/((?:-(moz|webkit)-)?calc)/i;function transformValue(l,m,v,y){return w(l).walk((C=>{if(C.type!=="function"||!E.test(C.value)){return}const O=w.stringify(C.nodes);const P=_.parse(O);const L=k(P,m.precision);C.type="word";C.value=S(C.value,L,l,m,v,y);return false})).toString()}function transformSelector(l,m,v,w){return y((l=>{l.walk((l=>{if(l.type==="attribute"&&l.value){l.setValue(transformValue(l.value,m,v,w))}if(l.type==="tag"){l.value=transformValue(l.value,m,v,w)}return}))})).processSync(l)}l.exports=(l,m,v,y)=>{let w=l[m];try{w=m==="selector"?transformSelector(l[m],v,y,l):transformValue(l[m],v,y,l)}catch(m){if(m instanceof Error){y.warn(m.message,{node:l})}else{y.warn("Error",{node:l})}return}if(v.preserve&&l[m]!==w){const v=l.clone();v[m]=w;l.parent.insertBefore(l,v)}else{l[m]=w}}},1762:(l,m)=>{var v=function(){function JisonParserError(l,m){Object.defineProperty(this,"name",{enumerable:false,writable:false,value:"JisonParserError"});if(l==null)l="???";Object.defineProperty(this,"message",{enumerable:false,writable:true,value:l});this.hash=m;var v;if(m&&m.exception instanceof Error){var y=m.exception;this.message=y.message||l;v=y.stack}if(!v){if(Error.hasOwnProperty("captureStackTrace")){Error.captureStackTrace(this,this.constructor)}else{v=new Error(l).stack}}if(v){Object.defineProperty(this,"stack",{enumerable:false,writable:false,value:v})}}if(typeof Object.setPrototypeOf==="function"){Object.setPrototypeOf(JisonParserError.prototype,Error.prototype)}else{JisonParserError.prototype=Object.create(Error.prototype)}JisonParserError.prototype.constructor=JisonParserError;JisonParserError.prototype.name="JisonParserError";function bp(l){var m=[];var v=l.pop;var y=l.rule;for(var w=0,_=v.length;w<_;w++){m.push([v[w],y[w]])}return m}function bda(l){var m={};var v=l.idx;var y=l.goto;for(var w=0,_=v.length;w<_;w++){var k=v[w];m[k]=y[w]}return m}function bt(l){var m=[];var v=l.len;var y=l.symbol;var w=l.type;var _=l.state;var k=l.mode;var S=l.goto;for(var E=0,C=v.length;E1)return l;if(L.cleanupAfterLex){L.cleanupAfterLex(w)}if(T){T.lexer=undefined;T.parser=undefined;if(L.yy===T){L.yy=undefined}}T=undefined;this.parseError=this.originalParseError;this.quoteName=this.originalQuoteName;m.length=0;y.length=0;_.length=0;k=0;if(!w){for(var C=this.__error_infos.length-1;C>=0;C--){var O=this.__error_infos[C];if(O&&typeof O.destroy==="function"){O.destroy()}}this.__error_infos.length=0}return l};this.constructParseErrorInfo=function parser_constructParseErrorInfo(l,v,w,E){var C={errStr:l,exception:v,text:L.match,value:L.yytext,token:this.describeSymbol(S)||S,token_id:S,line:L.yylineno,expected:w,recoverable:E,state:D,action:q,new_state:W,symbol_stack:m,state_stack:y,value_stack:_,stack_pointer:k,yy:T,lexer:L,parser:this,destroy:function destructParseErrorInfo(){var l=!!this.recoverable;for(var v in this){if(this.hasOwnProperty(v)&&typeof v==="object"){this[v]=undefined}}this.recoverable=l}};this.__error_infos.push(C);return C};function getNonTerminalFromCode(l){var m=v.getSymbolName(l);if(!m){m=l}return m}function stdLex(){var l=L.lex();if(typeof l!=="number"){l=v.symbols_[l]||l}return l||C}function fastLex(){var l=L.fastLex();if(typeof l!=="number"){l=v.symbols_[l]||l}return l||C}var R=stdLex;var D,q,F,$;var V={$:true,_$:undefined,yy:T};var B;var z;var U;var W;var Q=false;try{this.__reentrant_call_depth++;L.setInput(l,T);if(typeof L.canIUse==="function"){var G=L.canIUse();if(G.fastLex&&typeof fastLex==="function"){R=fastLex}}_[k]=null;y[k]=0;m[k]=0;++k;if(this.pre_parse){this.pre_parse.call(this,T)}if(T.pre_parse){T.pre_parse.call(this,T)}W=y[k-1];for(;;){D=W;if(this.defaultActions[D]){q=2;W=this.defaultActions[D]}else{if(!S){S=R()}$=w[D]&&w[D][S]||P;W=$[1];q=$[0];if(!q){var Y;var J=this.describeSymbol(S)||S;var Z=this.collect_expected_token_set(D);if(typeof L.yylineno==="number"){Y="Parse error on line "+(L.yylineno+1)+": "}else{Y="Parse error: "}if(typeof L.showPosition==="function"){Y+="\n"+L.showPosition(79-10,10)+"\n"}if(Z.length){Y+="Expecting "+Z.join(", ")+", got unexpected "+J}else{Y+="Unexpected "+J}B=this.constructParseErrorInfo(Y,null,Z,false);F=this.parseError(B.errStr,B,this.JisonParserError);if(typeof F!=="undefined"){Q=F}break}}switch(q){default:if(q instanceof Array){B=this.constructParseErrorInfo("Parse Error: multiple actions possible at state: "+D+", token: "+S,null,null,false);F=this.parseError(B.errStr,B,this.JisonParserError);if(typeof F!=="undefined"){Q=F}break}B=this.constructParseErrorInfo("Parsing halted. No viable error recovery approach available due to internal system failure.",null,null,false);F=this.parseError(B.errStr,B,this.JisonParserError);if(typeof F!=="undefined"){Q=F}break;case 1:m[k]=S;_[k]=L.yytext;y[k]=W;++k;S=0;continue;case 2:U=this.productions_[W-1];z=U[1];F=this.performAction.call(V,W,k-1,_);if(typeof F!=="undefined"){Q=F;break}k-=z;var X=U[0];m[k]=X;_[k]=V.$;W=w[y[k-1]][X];y[k]=W;++k;continue;case 3:if(k!==-2){Q=true;k--;if(typeof _[k]!=="undefined"){Q=_[k]}}break}break}}catch(l){if(l instanceof this.JisonParserError){throw l}else if(L&&typeof L.JisonLexerError==="function"&&l instanceof L.JisonLexerError){throw l}B=this.constructParseErrorInfo("Parsing aborted due to exception.",l,null,false);Q=false;F=this.parseError(B.errStr,B,this.JisonParserError);if(typeof F!=="undefined"){Q=F}}finally{Q=this.cleanupAfterParse(Q,true,true);this.__reentrant_call_depth--}return Q}};l.originalParseError=l.parseError;l.originalQuoteName=l.quoteName;var v=function(){function JisonLexerError(l,v){Object.defineProperty(this,"name",{enumerable:false,writable:false,value:"JisonLexerError"});if(l==null)l="???";Object.defineProperty(this,"message",{enumerable:false,writable:true,value:l});this.hash=v;var m;if(v&&v.exception instanceof Error){var y=v.exception;this.message=y.message||l;m=y.stack}if(!m){if(Error.hasOwnProperty("captureStackTrace")){Error.captureStackTrace(this,this.constructor)}else{m=new Error(l).stack}}if(m){Object.defineProperty(this,"stack",{enumerable:false,writable:false,value:m})}}if(typeof Object.setPrototypeOf==="function"){Object.setPrototypeOf(JisonLexerError.prototype,Error.prototype)}else{JisonLexerError.prototype=Object.create(Error.prototype)}JisonLexerError.prototype.constructor=JisonLexerError;JisonLexerError.prototype.name="JisonLexerError";var l={EOF:1,ERROR:2,__currentRuleSet__:null,__error_infos:[],__decompressed:false,done:false,_backtrack:false,_input:"",_more:false,_signaled_error_token:false,conditionStack:[],match:"",matched:"",matches:false,yytext:"",offset:0,yyleng:0,yylineno:0,yylloc:null,constructLexErrorInfo:function lexer_constructLexErrorInfo(l,v,m){l=""+l;if(m==undefined){m=!(l.indexOf("\n")>0&&l.indexOf("^")>0)}if(this.yylloc&&m){if(typeof this.prettyPrintRange==="function"){var y=this.prettyPrintRange(this.yylloc);if(!/\n\s*$/.test(l)){l+="\n"}l+="\n Erroneous area:\n"+this.prettyPrintRange(this.yylloc)}else if(typeof this.showPosition==="function"){var _=this.showPosition();if(_){if(l.length&&l[l.length-1]!=="\n"&&_[0]!=="\n"){l+="\n"+_}else{l+=_}}}}var w={errStr:l,recoverable:!!v,text:this.match,token:null,line:this.yylineno,loc:this.yylloc,yy:this.yy,lexer:this,destroy:function destructLexErrorInfo(){var l=!!this.recoverable;for(var v in this){if(this.hasOwnProperty(v)&&typeof v==="object"){this[v]=undefined}}this.recoverable=l}};this.__error_infos.push(w);return w},parseError:function lexer_parseError(l,v,m){if(!m){m=this.JisonLexerError}if(this.yy){if(this.yy.parser&&typeof this.yy.parser.parseError==="function"){return this.yy.parser.parseError.call(this,l,v,m)||this.ERROR}else if(typeof this.yy.parseError==="function"){return this.yy.parseError.call(this,l,v,m)||this.ERROR}}throw new m(l,v)},yyerror:function yyError(l){var v="";if(this.yylloc){v=" on line "+(this.yylineno+1)}var m=this.constructLexErrorInfo("Lexical error"+v+": "+l,this.options.lexerErrorsAreRecoverable);var y=Array.prototype.slice.call(arguments,1);if(y.length){m.extra_error_attributes=y}return this.parseError(m.errStr,m,this.JisonLexerError)||this.ERROR},cleanupAfterLex:function lexer_cleanupAfterLex(l){this.setInput("",{});if(!l){for(var v=this.__error_infos.length-1;v>=0;v--){var m=this.__error_infos[v];if(m&&typeof m.destroy==="function"){m.destroy()}}this.__error_infos.length=0}return this},clear:function lexer_clear(){this.yytext="";this.yyleng=0;this.match="";this.matches=false;this._more=false;this._backtrack=false;var l=this.yylloc?this.yylloc.last_column:0;this.yylloc={first_line:this.yylineno+1,first_column:l,last_line:this.yylineno+1,last_column:l,range:[this.offset,this.offset]}},setInput:function lexer_setInput(l,v){this.yy=v||this.yy||{};if(!this.__decompressed){var m=this.rules;for(var y=0,_=m.length;y<_;y++){var w=m[y];if(typeof w==="number"){m[y]=m[w]}}var k=this.conditions;for(var S in k){var E=k[S];var C=E.rules;var _=C.length;var O=new Array(_+1);var P=new Array(_+1);for(var y=0;y<_;y++){var L=C[y];var w=m[L];O[y+1]=w;P[y+1]=L}E.rules=P;E.__rule_regexes=O;E.__rule_count=_}this.__decompressed=true}this._input=l||"";this.clear();this._signaled_error_token=false;this.done=false;this.yylineno=0;this.matched="";this.conditionStack=["INITIAL"];this.__currentRuleSet__=null;this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0,range:[0,0]};this.offset=0;return this},editRemainingInput:function lexer_editRemainingInput(l,v){var m=l.call(this,this._input,v);if(typeof m!=="string"){if(m){this._input=""+m}}else{this._input=m}return this},input:function lexer_input(){if(!this._input){return null}var l=this._input[0];this.yytext+=l;this.yyleng++;this.offset++;this.match+=l;this.matched+=l;var v=1;var m=false;if(l==="\n"){m=true}else if(l==="\r"){m=true;var y=this._input[1];if(y==="\n"){v++;l+=y;this.yytext+=y;this.yyleng++;this.offset++;this.match+=y;this.matched+=y;this.yylloc.range[1]++}}if(m){this.yylineno++;this.yylloc.last_line++;this.yylloc.last_column=0}else{this.yylloc.last_column++}this.yylloc.range[1]++;this._input=this._input.slice(v);return l},unput:function lexer_unput(l){var v=l.length;var m=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-v);this.yyleng=this.yytext.length;this.offset-=v;this.match=this.match.substr(0,this.match.length-v);this.matched=this.matched.substr(0,this.matched.length-v);if(m.length>1){this.yylineno-=m.length-1;this.yylloc.last_line=this.yylineno+1;var y=this.match;var _=y.split(/(?:\r\n?|\n)/g);if(_.length===1){y=this.matched;_=y.split(/(?:\r\n?|\n)/g)}this.yylloc.last_column=_[_.length-1].length}else{this.yylloc.last_column-=v}this.yylloc.range[1]=this.yylloc.range[0]+this.yyleng;this.done=false;return this},more:function lexer_more(){this._more=true;return this},reject:function lexer_reject(){if(this.options.backtrack_lexer){this._backtrack=true}else{var l="";if(this.yylloc){l=" on line "+(this.yylineno+1)}var v=this.constructLexErrorInfo("Lexical error"+l+": You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).",false);this._signaled_error_token=this.parseError(v.errStr,v,this.JisonLexerError)||this.ERROR}return this},less:function lexer_less(l){return this.unput(this.match.slice(l))},pastInput:function lexer_pastInput(l,v){var m=this.matched.substring(0,this.matched.length-this.match.length);if(l<0)l=m.length;else if(!l)l=20;if(v<0)v=m.length;else if(!v)v=1;m=m.substr(-l*2-2);var y=m.replace(/\r\n|\r/g,"\n").split("\n");y=y.slice(-v);m=y.join("\n");if(m.length>l){m="..."+m.substr(-l)}return m},upcomingInput:function lexer_upcomingInput(l,v){var m=this.match;if(l<0)l=m.length+this._input.length;else if(!l)l=20;if(v<0)v=l;else if(!v)v=1;if(m.lengthl){m=m.substring(0,l)+"..."}return m},showPosition:function lexer_showPosition(l,v){var m=this.pastInput(l).replace(/\s/g," ");var y=new Array(m.length+1).join("-");return m+this.upcomingInput(v).replace(/\s/g," ")+"\n"+y+"^"},deriveLocationInfo:function lexer_deriveYYLLOC(l,v,m,y){var _={first_line:1,first_column:0,last_line:1,last_column:0,range:[0,0]};if(l){_.first_line=l.first_line|0;_.last_line=l.last_line|0;_.first_column=l.first_column|0;_.last_column=l.last_column|0;if(l.range){_.range[0]=l.range[0]|0;_.range[1]=l.range[1]|0}}if(_.first_line<=0||_.last_line<_.first_line){if(_.first_line<=0&&v){_.first_line=v.last_line|0;_.first_column=v.last_column|0;if(v.range){_.range[0]=l.range[1]|0}}if((_.last_line<=0||_.last_line<_.first_line)&&m){_.last_line=m.first_line|0;_.last_column=m.first_column|0;if(m.range){_.range[1]=l.range[0]|0}}if(_.first_line<=0&&y&&(_.last_line<=0||y.last_line<=_.last_line)){_.first_line=y.first_line|0;_.first_column=y.first_column|0;if(y.range){_.range[0]=y.range[0]|0}}if(_.last_line<=0&&y&&(_.first_line<=0||y.first_line>=_.first_line)){_.last_line=y.last_line|0;_.last_column=y.last_column|0;if(y.range){_.range[1]=y.range[1]|0}}}if(_.last_line<=0){if(_.first_line<=0){_.first_line=this.yylloc.first_line;_.last_line=this.yylloc.last_line;_.first_column=this.yylloc.first_column;_.last_column=this.yylloc.last_column;_.range[0]=this.yylloc.range[0];_.range[1]=this.yylloc.range[1]}else{_.last_line=this.yylloc.last_line;_.last_column=this.yylloc.last_column;_.range[1]=this.yylloc.range[1]}}if(_.first_line<=0){_.first_line=_.last_line;_.first_column=0;_.range[1]=_.range[0]}if(_.first_column<0){_.first_column=0}if(_.last_column<0){_.last_column=_.first_column>0?_.first_column:80}return _},prettyPrintRange:function lexer_prettyPrintRange(l,v,m){l=this.deriveLocationInfo(l,v,m);const y=3;const _=1;const w=2;var k=this.matched+this._input;var S=k.split("\n");var E=Math.max(1,v?v.first_line:l.first_line-y);var C=Math.max(1,m?m.last_line:l.last_line+_);var O=1+Math.log10(C|1)|0;var P=new Array(O).join(" ");var L=[];var T=S.slice(E-1,C+1).map((function injectLineNumber(v,m){var y=m+E;var _=(P+y).substr(-O);var w=_+": "+v;var k=new Array(O+1).join("^");var S=2+1;var C=0;if(y===l.first_line){S+=l.first_column;C=Math.max(2,(y===l.last_line?l.last_column:v.length)-l.first_column+1)}else if(y===l.last_line){C=Math.max(2,l.last_column+1)}else if(y>l.first_line&&y0){L.push(m)}}w=w.replace(/\t/g," ");return w}));if(L.length>2*w){var A=L[w-1]+1;var R=L[L.length-w]-1;var D=new Array(O+1).join(" ")+" (...continued...)";D+="\n"+new Array(O+1).join("-")+" (---------------)";T.splice(A,R-A+1,D)}return T.join("\n")},describeYYLLOC:function lexer_describe_yylloc(l,v){var m=l.first_line;var y=l.last_line;var _=l.first_column;var w=l.last_column;var k=y-m;var S=w-_;var E;if(k===0){E="line "+m+", ";if(S<=1){E+="column "+_}else{E+="columns "+_+" .. "+w}}else{E="lines "+m+"(column "+_+") .. "+y+"(column "+w+")"}if(l.range&&v){var C=l.range[0];var O=l.range[1]-1;if(O<=C){E+=" {String Offset: "+C+"}"}else{E+=" {String Offset range: "+C+" .. "+O+"}"}}return E},test_match:function lexer_test_match(l,v){var m,y,_,w,k;if(this.options.backtrack_lexer){_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.yylloc.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column,range:this.yylloc.range.slice(0)},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done}}w=l[0];k=w.length;y=w.split(/(?:\r\n?|\n)/g);if(y.length>1){this.yylineno+=y.length-1;this.yylloc.last_line=this.yylineno+1;this.yylloc.last_column=y[y.length-1].length}else{this.yylloc.last_column+=k}this.yytext+=w;this.match+=w;this.matched+=w;this.matches=l;this.yyleng=this.yytext.length;this.yylloc.range[1]+=k;this.offset+=k;this._more=false;this._backtrack=false;this._input=this._input.slice(k);m=this.performAction.call(this,this.yy,v,this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input){this.done=false}if(m){return m}else if(this._backtrack){for(var S in _){this[S]=_[S]}this.__currentRuleSet__=null;return false}else if(this._signaled_error_token){m=this._signaled_error_token;this._signaled_error_token=false;return m}return false},next:function lexer_next(){if(this.done){this.clear();return this.EOF}if(!this._input){this.done=true}var l,v,m,y;if(!this._more){this.clear()}var _=this.__currentRuleSet__;if(!_){_=this.__currentRuleSet__=this._currentRules();if(!_||!_.rules){var w="";if(this.options.trackPosition){w=" on line "+(this.yylineno+1)}var k=this.constructLexErrorInfo("Internal lexer engine error"+w+': The lex grammar programmer pushed a non-existing condition name "'+this.topState()+'"; this is a fatal error and should be reported to the application programmer team!',false);return this.parseError(k.errStr,k,this.JisonLexerError)||this.ERROR}}var S=_.rules;var E=_.__rule_regexes;var C=_.__rule_count;for(var O=1;O<=C;O++){m=this._input.match(E[O]);if(m&&(!v||m[0].length>v[0].length)){v=m;y=O;if(this.options.backtrack_lexer){l=this.test_match(m,S[O]);if(l!==false){return l}else if(this._backtrack){v=undefined;continue}else{return false}}else if(!this.options.flex){break}}}if(v){l=this.test_match(v,S[y]);if(l!==false){return l}return false}if(!this._input){this.done=true;this.clear();return this.EOF}else{var w="";if(this.options.trackPosition){w=" on line "+(this.yylineno+1)}var k=this.constructLexErrorInfo("Lexical error"+w+": Unrecognized text.",this.options.lexerErrorsAreRecoverable);var P=this._input;var L=this.topState();var T=this.conditionStack.length;l=this.parseError(k.errStr,k,this.JisonLexerError)||this.ERROR;if(l===this.ERROR){if(!this.matches&&P===this._input&&L===this.topState()&&T===this.conditionStack.length){this.input()}}return l}},lex:function lexer_lex(){var l;if(typeof this.pre_lex==="function"){l=this.pre_lex.call(this,0)}if(typeof this.options.pre_lex==="function"){l=this.options.pre_lex.call(this,l)||l}if(this.yy&&typeof this.yy.pre_lex==="function"){l=this.yy.pre_lex.call(this,l)||l}while(!l){l=this.next()}if(this.yy&&typeof this.yy.post_lex==="function"){l=this.yy.post_lex.call(this,l)||l}if(typeof this.options.post_lex==="function"){l=this.options.post_lex.call(this,l)||l}if(typeof this.post_lex==="function"){l=this.post_lex.call(this,l)||l}return l},fastLex:function lexer_fastLex(){var l;while(!l){l=this.next()}return l},canIUse:function lexer_canIUse(){var l={fastLex:!(typeof this.pre_lex==="function"||typeof this.options.pre_lex==="function"||this.yy&&typeof this.yy.pre_lex==="function"||this.yy&&typeof this.yy.post_lex==="function"||typeof this.options.post_lex==="function"||typeof this.post_lex==="function")&&typeof this.fastLex==="function"};return l},begin:function lexer_begin(l){return this.pushState(l)},pushState:function lexer_pushState(l){this.conditionStack.push(l);this.__currentRuleSet__=null;return this},popState:function lexer_popState(){var l=this.conditionStack.length-1;if(l>0){this.__currentRuleSet__=null;return this.conditionStack.pop()}else{return this.conditionStack[0]}},topState:function lexer_topState(l){l=this.conditionStack.length-1-Math.abs(l||0);if(l>=0){return this.conditionStack[l]}else{return"INITIAL"}},_currentRules:function lexer__currentRules(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]){return this.conditions[this.conditionStack[this.conditionStack.length-1]]}else{return this.conditions["INITIAL"]}},stateStackSize:function lexer_stateStackSize(){return this.conditionStack.length},options:{trackPosition:true,caseInsensitive:true},JisonLexerError:JisonLexerError,performAction:function lexer__performAction(l,v,m){var y=this;var _=m;switch(v){case 0: +this.$={type:"Number",value:parseFloat(v[m])*-1};break}},table:bt({len:u([26,1,5,1,25,s,[0,19],19,19,0,0,s,[25,5],5,0,0,18,18,0,0,6,6,0,0,c,[11,3]]),symbol:u([3,4,6,7,s,[10,22,1],1,1,s,[6,4,1],4,c,[33,21],c,[32,4],6,7,c,[22,16],30,c,[19,19],c,[63,25],c,[25,100],s,[5,5,1],c,[149,17],c,[167,18],30,1,c,[42,5],c,[6,6],c,[5,5]]),type:u([s,[2,21],s,[0,5],1,s,[2,27],s,[0,4],c,[22,19],c,[19,37],c,[63,25],c,[25,103],c,[148,19],c,[18,18]]),state:u([1,2,5,6,7,33,c,[4,3],34,38,40,c,[6,3],41,c,[4,3],42,c,[4,3],43,c,[4,3],44,c,[22,5]]),mode:u([s,[1,228],s,[2,4],c,[6,8],s,[1,5]]),goto:u([3,4,24,25,s,[8,16,1],s,[26,7,1],c,[27,21],36,37,c,[18,15],35,c,[18,17],39,c,[57,21],c,[21,84],45,c,[168,4],c,[128,17],c,[17,17],s,[3,4],30,31,s,[4,4],30,31,46,c,[51,4]])}),defaultActions:bda({idx:u([s,[5,19,1],26,27,34,35,38,39,42,43,45,46]),goto:u([s,[8,19,1],29,1,27,30,28,31,5,6,7,2])}),parseError:function parseError(l,m,v){if(m.recoverable){if(typeof this.trace==="function"){this.trace(l)}m.destroy()}else{if(typeof this.trace==="function"){this.trace(l)}if(!v){v=this.JisonParserError}throw new v(l,m)}},parse:function parse(l){var m=this;var v=new Array(128);var y=new Array(128);var w=new Array(128);var _=this.table;var k=0;var S=0;var E=this.TERROR;var C=this.EOF;var O=this.options.errorRecoveryTokenDiscardCount|0||3;var P=[0,47];var L;if(this.__lexer__){L=this.__lexer__}else{L=this.__lexer__=Object.create(this.lexer)}var T={parseError:undefined,quoteName:undefined,lexer:undefined,parser:undefined,pre_parse:undefined,post_parse:undefined,pre_lex:undefined,post_lex:undefined};var R;if(typeof assert!=="function"){R=function JisonAssert(l,m){if(!l){throw new Error("assertion failed: "+(m||"***"))}}}else{R=assert}this.yyGetSharedState=function yyGetSharedState(){return T};function shallow_copy_noclobber(l,m){for(var v in m){if(typeof l[v]==="undefined"&&Object.prototype.hasOwnProperty.call(m,v)){l[v]=m[v]}}}shallow_copy_noclobber(T,this.yy);T.lexer=L;T.parser=this;if(typeof T.parseError==="function"){this.parseError=function parseErrorAlt(l,m,v){if(!v){v=this.JisonParserError}return T.parseError.call(this,l,m,v)}}else{this.parseError=this.originalParseError}if(typeof T.quoteName==="function"){this.quoteName=function quoteNameAlt(l){return T.quoteName.call(this,l)}}else{this.quoteName=this.originalQuoteName}this.cleanupAfterParse=function parser_cleanupAfterParse(l,m,_){var S;if(m){var E;if(T.post_parse||this.post_parse){E=this.constructParseErrorInfo(null,null,null,false)}if(T.post_parse){S=T.post_parse.call(this,T,l,E);if(typeof S!=="undefined")l=S}if(this.post_parse){S=this.post_parse.call(this,T,l,E);if(typeof S!=="undefined")l=S}if(E&&E.destroy){E.destroy()}}if(this.__reentrant_call_depth>1)return l;if(L.cleanupAfterLex){L.cleanupAfterLex(_)}if(T){T.lexer=undefined;T.parser=undefined;if(L.yy===T){L.yy=undefined}}T=undefined;this.parseError=this.originalParseError;this.quoteName=this.originalQuoteName;v.length=0;y.length=0;w.length=0;k=0;if(!_){for(var C=this.__error_infos.length-1;C>=0;C--){var O=this.__error_infos[C];if(O&&typeof O.destroy==="function"){O.destroy()}}this.__error_infos.length=0}return l};this.constructParseErrorInfo=function parser_constructParseErrorInfo(l,m,_,E){var C={errStr:l,exception:m,text:L.match,value:L.yytext,token:this.describeSymbol(S)||S,token_id:S,line:L.yylineno,expected:_,recoverable:E,state:A,action:q,new_state:B,symbol_stack:v,state_stack:y,value_stack:w,stack_pointer:k,yy:T,lexer:L,parser:this,destroy:function destructParseErrorInfo(){var l=!!this.recoverable;for(var m in this){if(this.hasOwnProperty(m)&&typeof m==="object"){this[m]=undefined}}this.recoverable=l}};this.__error_infos.push(C);return C};function getNonTerminalFromCode(l){var v=m.getSymbolName(l);if(!v){v=l}return v}function stdLex(){var l=L.lex();if(typeof l!=="number"){l=m.symbols_[l]||l}return l||C}function fastLex(){var l=L.fastLex();if(typeof l!=="number"){l=m.symbols_[l]||l}return l||C}var D=stdLex;var A,q,F,$;var z={$:true,_$:undefined,yy:T};var V;var U;var W;var B;var Q=false;try{this.__reentrant_call_depth++;L.setInput(l,T);if(typeof L.canIUse==="function"){var Y=L.canIUse();if(Y.fastLex&&typeof fastLex==="function"){D=fastLex}}w[k]=null;y[k]=0;v[k]=0;++k;if(this.pre_parse){this.pre_parse.call(this,T)}if(T.pre_parse){T.pre_parse.call(this,T)}B=y[k-1];for(;;){A=B;if(this.defaultActions[A]){q=2;B=this.defaultActions[A]}else{if(!S){S=D()}$=_[A]&&_[A][S]||P;B=$[1];q=$[0];if(!q){var G;var J=this.describeSymbol(S)||S;var Z=this.collect_expected_token_set(A);if(typeof L.yylineno==="number"){G="Parse error on line "+(L.yylineno+1)+": "}else{G="Parse error: "}if(typeof L.showPosition==="function"){G+="\n"+L.showPosition(79-10,10)+"\n"}if(Z.length){G+="Expecting "+Z.join(", ")+", got unexpected "+J}else{G+="Unexpected "+J}V=this.constructParseErrorInfo(G,null,Z,false);F=this.parseError(V.errStr,V,this.JisonParserError);if(typeof F!=="undefined"){Q=F}break}}switch(q){default:if(q instanceof Array){V=this.constructParseErrorInfo("Parse Error: multiple actions possible at state: "+A+", token: "+S,null,null,false);F=this.parseError(V.errStr,V,this.JisonParserError);if(typeof F!=="undefined"){Q=F}break}V=this.constructParseErrorInfo("Parsing halted. No viable error recovery approach available due to internal system failure.",null,null,false);F=this.parseError(V.errStr,V,this.JisonParserError);if(typeof F!=="undefined"){Q=F}break;case 1:v[k]=S;w[k]=L.yytext;y[k]=B;++k;S=0;continue;case 2:W=this.productions_[B-1];U=W[1];F=this.performAction.call(z,B,k-1,w);if(typeof F!=="undefined"){Q=F;break}k-=U;var K=W[0];v[k]=K;w[k]=z.$;B=_[y[k-1]][K];y[k]=B;++k;continue;case 3:if(k!==-2){Q=true;k--;if(typeof w[k]!=="undefined"){Q=w[k]}}break}break}}catch(l){if(l instanceof this.JisonParserError){throw l}else if(L&&typeof L.JisonLexerError==="function"&&l instanceof L.JisonLexerError){throw l}V=this.constructParseErrorInfo("Parsing aborted due to exception.",l,null,false);Q=false;F=this.parseError(V.errStr,V,this.JisonParserError);if(typeof F!=="undefined"){Q=F}}finally{Q=this.cleanupAfterParse(Q,true,true);this.__reentrant_call_depth--}return Q}};l.originalParseError=l.parseError;l.originalQuoteName=l.quoteName;var m=function(){function JisonLexerError(l,m){Object.defineProperty(this,"name",{enumerable:false,writable:false,value:"JisonLexerError"});if(l==null)l="???";Object.defineProperty(this,"message",{enumerable:false,writable:true,value:l});this.hash=m;var v;if(m&&m.exception instanceof Error){var y=m.exception;this.message=y.message||l;v=y.stack}if(!v){if(Error.hasOwnProperty("captureStackTrace")){Error.captureStackTrace(this,this.constructor)}else{v=new Error(l).stack}}if(v){Object.defineProperty(this,"stack",{enumerable:false,writable:false,value:v})}}if(typeof Object.setPrototypeOf==="function"){Object.setPrototypeOf(JisonLexerError.prototype,Error.prototype)}else{JisonLexerError.prototype=Object.create(Error.prototype)}JisonLexerError.prototype.constructor=JisonLexerError;JisonLexerError.prototype.name="JisonLexerError";var l={EOF:1,ERROR:2,__currentRuleSet__:null,__error_infos:[],__decompressed:false,done:false,_backtrack:false,_input:"",_more:false,_signaled_error_token:false,conditionStack:[],match:"",matched:"",matches:false,yytext:"",offset:0,yyleng:0,yylineno:0,yylloc:null,constructLexErrorInfo:function lexer_constructLexErrorInfo(l,m,v){l=""+l;if(v==undefined){v=!(l.indexOf("\n")>0&&l.indexOf("^")>0)}if(this.yylloc&&v){if(typeof this.prettyPrintRange==="function"){var y=this.prettyPrintRange(this.yylloc);if(!/\n\s*$/.test(l)){l+="\n"}l+="\n Erroneous area:\n"+this.prettyPrintRange(this.yylloc)}else if(typeof this.showPosition==="function"){var w=this.showPosition();if(w){if(l.length&&l[l.length-1]!=="\n"&&w[0]!=="\n"){l+="\n"+w}else{l+=w}}}}var _={errStr:l,recoverable:!!m,text:this.match,token:null,line:this.yylineno,loc:this.yylloc,yy:this.yy,lexer:this,destroy:function destructLexErrorInfo(){var l=!!this.recoverable;for(var m in this){if(this.hasOwnProperty(m)&&typeof m==="object"){this[m]=undefined}}this.recoverable=l}};this.__error_infos.push(_);return _},parseError:function lexer_parseError(l,m,v){if(!v){v=this.JisonLexerError}if(this.yy){if(this.yy.parser&&typeof this.yy.parser.parseError==="function"){return this.yy.parser.parseError.call(this,l,m,v)||this.ERROR}else if(typeof this.yy.parseError==="function"){return this.yy.parseError.call(this,l,m,v)||this.ERROR}}throw new v(l,m)},yyerror:function yyError(l){var m="";if(this.yylloc){m=" on line "+(this.yylineno+1)}var v=this.constructLexErrorInfo("Lexical error"+m+": "+l,this.options.lexerErrorsAreRecoverable);var y=Array.prototype.slice.call(arguments,1);if(y.length){v.extra_error_attributes=y}return this.parseError(v.errStr,v,this.JisonLexerError)||this.ERROR},cleanupAfterLex:function lexer_cleanupAfterLex(l){this.setInput("",{});if(!l){for(var m=this.__error_infos.length-1;m>=0;m--){var v=this.__error_infos[m];if(v&&typeof v.destroy==="function"){v.destroy()}}this.__error_infos.length=0}return this},clear:function lexer_clear(){this.yytext="";this.yyleng=0;this.match="";this.matches=false;this._more=false;this._backtrack=false;var l=this.yylloc?this.yylloc.last_column:0;this.yylloc={first_line:this.yylineno+1,first_column:l,last_line:this.yylineno+1,last_column:l,range:[this.offset,this.offset]}},setInput:function lexer_setInput(l,m){this.yy=m||this.yy||{};if(!this.__decompressed){var v=this.rules;for(var y=0,w=v.length;y1){this.yylineno-=v.length-1;this.yylloc.last_line=this.yylineno+1;var y=this.match;var w=y.split(/(?:\r\n?|\n)/g);if(w.length===1){y=this.matched;w=y.split(/(?:\r\n?|\n)/g)}this.yylloc.last_column=w[w.length-1].length}else{this.yylloc.last_column-=m}this.yylloc.range[1]=this.yylloc.range[0]+this.yyleng;this.done=false;return this},more:function lexer_more(){this._more=true;return this},reject:function lexer_reject(){if(this.options.backtrack_lexer){this._backtrack=true}else{var l="";if(this.yylloc){l=" on line "+(this.yylineno+1)}var m=this.constructLexErrorInfo("Lexical error"+l+": You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).",false);this._signaled_error_token=this.parseError(m.errStr,m,this.JisonLexerError)||this.ERROR}return this},less:function lexer_less(l){return this.unput(this.match.slice(l))},pastInput:function lexer_pastInput(l,m){var v=this.matched.substring(0,this.matched.length-this.match.length);if(l<0)l=v.length;else if(!l)l=20;if(m<0)m=v.length;else if(!m)m=1;v=v.substr(-l*2-2);var y=v.replace(/\r\n|\r/g,"\n").split("\n");y=y.slice(-m);v=y.join("\n");if(v.length>l){v="..."+v.substr(-l)}return v},upcomingInput:function lexer_upcomingInput(l,m){var v=this.match;if(l<0)l=v.length+this._input.length;else if(!l)l=20;if(m<0)m=l;else if(!m)m=1;if(v.lengthl){v=v.substring(0,l)+"..."}return v},showPosition:function lexer_showPosition(l,m){var v=this.pastInput(l).replace(/\s/g," ");var y=new Array(v.length+1).join("-");return v+this.upcomingInput(m).replace(/\s/g," ")+"\n"+y+"^"},deriveLocationInfo:function lexer_deriveYYLLOC(l,m,v,y){var w={first_line:1,first_column:0,last_line:1,last_column:0,range:[0,0]};if(l){w.first_line=l.first_line|0;w.last_line=l.last_line|0;w.first_column=l.first_column|0;w.last_column=l.last_column|0;if(l.range){w.range[0]=l.range[0]|0;w.range[1]=l.range[1]|0}}if(w.first_line<=0||w.last_line=w.first_line)){w.last_line=y.last_line|0;w.last_column=y.last_column|0;if(y.range){w.range[1]=y.range[1]|0}}}if(w.last_line<=0){if(w.first_line<=0){w.first_line=this.yylloc.first_line;w.last_line=this.yylloc.last_line;w.first_column=this.yylloc.first_column;w.last_column=this.yylloc.last_column;w.range[0]=this.yylloc.range[0];w.range[1]=this.yylloc.range[1]}else{w.last_line=this.yylloc.last_line;w.last_column=this.yylloc.last_column;w.range[1]=this.yylloc.range[1]}}if(w.first_line<=0){w.first_line=w.last_line;w.first_column=0;w.range[1]=w.range[0]}if(w.first_column<0){w.first_column=0}if(w.last_column<0){w.last_column=w.first_column>0?w.first_column:80}return w},prettyPrintRange:function lexer_prettyPrintRange(l,m,v){l=this.deriveLocationInfo(l,m,v);const y=3;const w=1;const _=2;var k=this.matched+this._input;var S=k.split("\n");var E=Math.max(1,m?m.first_line:l.first_line-y);var C=Math.max(1,v?v.last_line:l.last_line+w);var O=1+Math.log10(C|1)|0;var P=new Array(O).join(" ");var L=[];var T=S.slice(E-1,C+1).map((function injectLineNumber(m,v){var y=v+E;var w=(P+y).substr(-O);var _=w+": "+m;var k=new Array(O+1).join("^");var S=2+1;var C=0;if(y===l.first_line){S+=l.first_column;C=Math.max(2,(y===l.last_line?l.last_column:m.length)-l.first_column+1)}else if(y===l.last_line){C=Math.max(2,l.last_column+1)}else if(y>l.first_line&&y0){L.push(v)}}_=_.replace(/\t/g," ");return _}));if(L.length>2*_){var R=L[_-1]+1;var D=L[L.length-_]-1;var A=new Array(O+1).join(" ")+" (...continued...)";A+="\n"+new Array(O+1).join("-")+" (---------------)";T.splice(R,D-R+1,A)}return T.join("\n")},describeYYLLOC:function lexer_describe_yylloc(l,m){var v=l.first_line;var y=l.last_line;var w=l.first_column;var _=l.last_column;var k=y-v;var S=_-w;var E;if(k===0){E="line "+v+", ";if(S<=1){E+="column "+w}else{E+="columns "+w+" .. "+_}}else{E="lines "+v+"(column "+w+") .. "+y+"(column "+_+")"}if(l.range&&m){var C=l.range[0];var O=l.range[1]-1;if(O<=C){E+=" {String Offset: "+C+"}"}else{E+=" {String Offset range: "+C+" .. "+O+"}"}}return E},test_match:function lexer_test_match(l,m){var v,y,w,_,k;if(this.options.backtrack_lexer){w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.yylloc.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column,range:this.yylloc.range.slice(0)},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done}}_=l[0];k=_.length;y=_.split(/(?:\r\n?|\n)/g);if(y.length>1){this.yylineno+=y.length-1;this.yylloc.last_line=this.yylineno+1;this.yylloc.last_column=y[y.length-1].length}else{this.yylloc.last_column+=k}this.yytext+=_;this.match+=_;this.matched+=_;this.matches=l;this.yyleng=this.yytext.length;this.yylloc.range[1]+=k;this.offset+=k;this._more=false;this._backtrack=false;this._input=this._input.slice(k);v=this.performAction.call(this,this.yy,m,this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input){this.done=false}if(v){return v}else if(this._backtrack){for(var S in w){this[S]=w[S]}this.__currentRuleSet__=null;return false}else if(this._signaled_error_token){v=this._signaled_error_token;this._signaled_error_token=false;return v}return false},next:function lexer_next(){if(this.done){this.clear();return this.EOF}if(!this._input){this.done=true}var l,m,v,y;if(!this._more){this.clear()}var w=this.__currentRuleSet__;if(!w){w=this.__currentRuleSet__=this._currentRules();if(!w||!w.rules){var _="";if(this.options.trackPosition){_=" on line "+(this.yylineno+1)}var k=this.constructLexErrorInfo("Internal lexer engine error"+_+': The lex grammar programmer pushed a non-existing condition name "'+this.topState()+'"; this is a fatal error and should be reported to the application programmer team!',false);return this.parseError(k.errStr,k,this.JisonLexerError)||this.ERROR}}var S=w.rules;var E=w.__rule_regexes;var C=w.__rule_count;for(var O=1;O<=C;O++){v=this._input.match(E[O]);if(v&&(!m||v[0].length>m[0].length)){m=v;y=O;if(this.options.backtrack_lexer){l=this.test_match(v,S[O]);if(l!==false){return l}else if(this._backtrack){m=undefined;continue}else{return false}}else if(!this.options.flex){break}}}if(m){l=this.test_match(m,S[y]);if(l!==false){return l}return false}if(!this._input){this.done=true;this.clear();return this.EOF}else{var _="";if(this.options.trackPosition){_=" on line "+(this.yylineno+1)}var k=this.constructLexErrorInfo("Lexical error"+_+": Unrecognized text.",this.options.lexerErrorsAreRecoverable);var P=this._input;var L=this.topState();var T=this.conditionStack.length;l=this.parseError(k.errStr,k,this.JisonLexerError)||this.ERROR;if(l===this.ERROR){if(!this.matches&&P===this._input&&L===this.topState()&&T===this.conditionStack.length){this.input()}}return l}},lex:function lexer_lex(){var l;if(typeof this.pre_lex==="function"){l=this.pre_lex.call(this,0)}if(typeof this.options.pre_lex==="function"){l=this.options.pre_lex.call(this,l)||l}if(this.yy&&typeof this.yy.pre_lex==="function"){l=this.yy.pre_lex.call(this,l)||l}while(!l){l=this.next()}if(this.yy&&typeof this.yy.post_lex==="function"){l=this.yy.post_lex.call(this,l)||l}if(typeof this.options.post_lex==="function"){l=this.options.post_lex.call(this,l)||l}if(typeof this.post_lex==="function"){l=this.post_lex.call(this,l)||l}return l},fastLex:function lexer_fastLex(){var l;while(!l){l=this.next()}return l},canIUse:function lexer_canIUse(){var l={fastLex:!(typeof this.pre_lex==="function"||typeof this.options.pre_lex==="function"||this.yy&&typeof this.yy.pre_lex==="function"||this.yy&&typeof this.yy.post_lex==="function"||typeof this.options.post_lex==="function"||typeof this.post_lex==="function")&&typeof this.fastLex==="function"};return l},begin:function lexer_begin(l){return this.pushState(l)},pushState:function lexer_pushState(l){this.conditionStack.push(l);this.__currentRuleSet__=null;return this},popState:function lexer_popState(){var l=this.conditionStack.length-1;if(l>0){this.__currentRuleSet__=null;return this.conditionStack.pop()}else{return this.conditionStack[0]}},topState:function lexer_topState(l){l=this.conditionStack.length-1-Math.abs(l||0);if(l>=0){return this.conditionStack[l]}else{return"INITIAL"}},_currentRules:function lexer__currentRules(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]){return this.conditions[this.conditionStack[this.conditionStack.length-1]]}else{return this.conditions["INITIAL"]}},stateStackSize:function lexer_stateStackSize(){return this.conditionStack.length},options:{trackPosition:true,caseInsensitive:true},JisonLexerError:JisonLexerError,performAction:function lexer__performAction(l,m,v){var y=this;var w=v;switch(m){case 0: /*! Conditions:: INITIAL */ /*! Rule:: \s+ */ -break;default:return this.simpleCaseActionClusters[v]}},simpleCaseActionClusters:{ +break;default:return this.simpleCaseActionClusters[m]}},simpleCaseActionClusters:{ /*! Conditions:: INITIAL */ /*! Rule:: (-(webkit|moz)-)?calc\b */ 1:3, @@ -187,4 +187,4 @@ break;default:return this.simpleCaseActionClusters[v]}},simpleCaseActionClusters 37:5, /*! Conditions:: INITIAL */ /*! Rule:: $ */ -38:1},rules:[/^(?:\s+)/i,/^(?:(-(webkit|moz)-)?calc\b)/i,/^(?:[a-z][\d\-a-z]*\s*\((?:(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|\([^)]*\)|[^()]*)*\))/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)em\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)ex\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)ch\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)rem\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vw\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vh\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vmin\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vmax\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)cm\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)mm\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)Q\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)in\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)pt\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)pc\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)px\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)deg\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)grad\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)rad\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)turn\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)s\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)ms\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)Hz\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)kHz\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)dpi\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)dpcm\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)dppx\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)%)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)-?([^\W\d]|[ -ÿ]|(\\[\dA-Fa-f]{1,6}(\r\n|[\t\n\f\r ])?|\\[^\d\n\f\rA-Fa-f]))([\w\-]|[ -ÿ]|(\\[\dA-Fa-f]{1,6}(\r\n|[\t\n\f\r ])?|\\[^\d\n\f\rA-Fa-f]))*\b)/i,/^(?:\()/i,/^(?:\))/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:true}}};return l}();l.lexer=v;function Parser(){this.yy={}}Parser.prototype=l;l.Parser=Parser;return new Parser}();if(true){v.parser=m;v.Parser=m.Parser;v.parse=function(){return m.parse.apply(m,arguments)}}},3426:(l,v,m)=>{"use strict";const y=m(5478);const{isSupported:_}=m(8390);const w=m(9285);const k=m(5429);function walk(l,v){l.nodes.forEach(((m,y)=>{const _=v(m,y,l);if(m.type==="function"&&_!==false){walk(m,v)}}))}const S=new Set(["ie 8","ie 9"]);const E=new Set(["calc","min","max","clamp"]);function isMathFunctionNode(l){if(l.type!=="function"){return false}return E.has(l.value.toLowerCase())}function transform(l,v){const m=w(l);walk(m,((l,m,y)=>{if(l.type==="function"){if(/^(rgb|hsl)a?$/i.test(l.value)){const{value:_}=l;l.value=k(w.stringify(l),v);l.type="word";const S=y.nodes[m+1];if(l.value!==_&&S&&(S.type==="word"||S.type==="function")){y.nodes.splice(m+1,0,{type:"space",value:" "})}}else if(isMathFunctionNode(l)){return false}}else if(l.type==="word"){l.value=k(l.value,v)}}));return m.toString()}function addPluginDefaults(l,v){const m={transparent:v.some((l=>S.has(l)))===false,alphaHex:_("css-rrggbbaa",v),name:true};return{...m,...l}}function pluginCreator(l={}){return{postcssPlugin:"postcss-colormin",prepare(v){const m=v.opts||{};const _=y(null,{stats:m.stats,path:__dirname,env:m.env});const w=new Map;const k=addPluginDefaults(l,_);return{OnceExit(l){l.walkDecls((l=>{if(/^(composes|font|filter|-webkit-tap-highlight-color)/i.test(l.prop)){return}const v=l.value;if(!v){return}const m=JSON.stringify({value:v,options:k,browsers:_});if(w.has(m)){l.value=w.get(m);return}const y=transform(v,k);l.value=y;w.set(m,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},5429:(l,v,m)=>{"use strict";const{colord:y,extend:_}=m(43);const w=m(4517);const k=m(3810);_([w,k]);l.exports=function minifyColor(l,v={}){const m=y(l);if(m.isValid()){const y=m.minify(v);return y.length{"use strict";const y=m(9285);const _=m(6421);const w=new Set(["em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","q","in","pt","pc","px"]);const k=new Set(["descent-override","ascent-override","font-stretch","size-adjust","line-gap-override"]);const S=new Set(["stroke-dashoffset","stroke-width","line-height"]);function stripLeadingDot(l){if(l.charCodeAt(0)===".".charCodeAt(0)){return l.slice(1)}else{return l}}function parseWord(l,v,m){const k=y.unit(l.value);if(k){const y=Number(k.number);const S=stripLeadingDot(k.unit);if(y===0){l.value=0+(m||!w.has(S.toLowerCase())&&S!=="%"?S:"")}else{l.value=_(y,S,v);if(typeof v.precision==="number"&&S.toLowerCase()==="px"&&k.number.includes(".")){const m=Math.pow(10,v.precision);l.value=Math.round(parseFloat(l.value)*m)/m+S}}}}function clampOpacity(l){const v=y.unit(l.value);if(!v){return}let m=Number(v.number);if(m>1){l.value=v.unit==="%"?m+v.unit:1+v.unit}else if(m<0){l.value=0+v.unit}}function shouldKeepZeroUnit(l){const{parent:v}=l;const m=l.prop.toLowerCase();return l.value.includes("%")&&(m==="max-height"||m==="height")||v&&v.parent&&v.parent.type==="atrule"&&v.parent.name.toLowerCase()==="keyframes"&&m==="stroke-dasharray"||S.has(m)}function transform(l,v){const m=v.prop.toLowerCase();if(m.includes("flex")||m.indexOf("--")===0||k.has(m)){return}v.value=y(v.value).walk((_=>{const w=_.value.toLowerCase();if(_.type==="word"){parseWord(_,l,shouldKeepZeroUnit(v));if(m==="opacity"||m==="shape-image-threshold"){clampOpacity(_)}}else if(_.type==="function"){if(w==="calc"||w==="min"||w==="max"||w==="clamp"||w==="hsl"||w==="hsla"){y.walk(_.nodes,(v=>{if(v.type==="word"){parseWord(v,l,true)}}));return false}if(w==="url"){return false}}})).toString()}const E="postcss-convert-values";function pluginCreator(l={precision:false}){return{postcssPlugin:E,OnceExit(v){v.walkDecls(transform.bind(null,l))}}}pluginCreator.postcss=true;l.exports=pluginCreator},6421:l=>{"use strict";const v=new Map([["in",96],["px",1],["pt",4/3],["pc",16]]);const m=new Map([["s",1e3],["ms",1]]);const y=new Map([["turn",360],["deg",1]]);function dropLeadingZero(l){const v=String(l);if(l%1){if(v[0]==="0"){return v.slice(1)}if(v[0]==="-"&&v[1]==="0"){return"-"+v.slice(2)}}return v}function transform(l,v,m){let y=[...m.keys()].filter((l=>v!==l));const _=l*m.get(v);return y.map((l=>dropLeadingZero(_/m.get(l))+l)).reduce(((l,v)=>l.length{"use strict";const y=m(7205);const _=m(4559);function pluginCreator(l={}){const v=new y(l);const m=new Map;const w=new Map;function matchesComments(l){if(m.has(l)){return m.get(l)}const v=_(l).filter((([l])=>l));m.set(l,v);return v}function replaceComments(l,m,y=" "){const k=l+"@|@"+y;if(w.has(k)){return w.get(k)}const S=_(l).reduce(((m,[_,w,k])=>{const S=l.slice(w,k);if(!_){return m+S}if(v.canRemove(S)){return m+y}return`${m}/*${S}*/`}),"");const E=m(S).join(" ");w.set(k,E);return E}return{postcssPlugin:"postcss-discard-comments",OnceExit(l,{list:m}){l.walk((l=>{if(l.type==="comment"&&v.canRemove(l.text)){l.remove();return}if(l.raws.between){l.raws.between=replaceComments(l.raws.between,m.space)}if(l.type==="decl"){if(l.raws.value&&l.raws.value.raw){if(l.raws.value.value===l.value){l.value=replaceComments(l.raws.value.raw,m.space)}else{l.value=replaceComments(l.value,m.space)}l.raws.value=null}if(l.raws.important){l.raws.important=replaceComments(l.raws.important,m.space);const v=matchesComments(l.raws.important);l.raws.important=v.length?l.raws.important:"!important"}else{l.value=replaceComments(l.value,m.space)}return}if(l.type==="rule"&&l.raws.selector&&l.raws.selector.raw){l.raws.selector.raw=replaceComments(l.raws.selector.raw,m.space,"");return}if(l.type==="atrule"){if(l.raws.afterName){const v=replaceComments(l.raws.afterName,m.space);if(!v.length){l.raws.afterName=v+" "}else{l.raws.afterName=" "+v+" "}}if(l.raws.params&&l.raws.params.raw){l.raws.params.raw=replaceComments(l.raws.params.raw,m.space)}}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},4559:l=>{"use strict";l.exports=function commentParser(l){const v=[];const m=l.length;let y=0;let _;while(y{"use strict";function CommentRemover(l){this.options=l}CommentRemover.prototype.canRemove=function(l){const v=this.options.remove;if(v){return v(l)}else{const v=l.indexOf("!")===0;if(!v){return true}if(this.options.removeAll||this._hasFirst){return true}else if(this.options.removeAllButFirst&&!this._hasFirst){this._hasFirst=true;return false}}};l.exports=CommentRemover},374:l=>{"use strict";function trimValue(l){return l?l.trim():l}function empty(l){return!l.nodes.filter((l=>l.type!=="comment")).length}function equals(l,v){const m=l;const y=v;if(m.type!==y.type){return false}if(m.important!==y.important){return false}if(m.raws&&!y.raws||!m.raws&&y.raws){return false}switch(m.type){case"rule":if(m.selector!==y.selector){return false}break;case"atrule":if(m.name!==y.name||m.params!==y.params){return false}if(m.raws&&trimValue(m.raws.before)!==trimValue(y.raws.before)){return false}if(m.raws&&trimValue(m.raws.afterName)!==trimValue(y.raws.afterName)){return false}break;case"decl":if(m.prop!==y.prop||m.value!==y.value){return false}if(m.raws&&trimValue(m.raws.before)!==trimValue(y.raws.before)){return false}break}if(m.nodes){if(m.nodes.length!==y.nodes.length){return false}for(let l=0;l=0){const y=v[m--];if(y&&y.type==="rule"&&y.selector===l.selector){l.each((l=>{if(l.type==="decl"){dedupeNode(l,y.nodes)}}));if(empty(y)){y.remove()}}}}function dedupeNode(l,v){let m=v.includes(l)?v.indexOf(l)-1:v.length-1;while(m>=0){const y=v[m--];if(y&&equals(y,l)){y.remove()}}}function dedupe(l){const{nodes:v}=l;if(!v){return}let m=v.length-1;while(m>=0){let l=v[m--];if(!l||!l.parent){continue}dedupe(l);if(l.type==="rule"){dedupeRule(l,v)}else if(l.type==="atrule"||l.type==="decl"){dedupeNode(l,v)}}}function pluginCreator(){return{postcssPlugin:"postcss-discard-duplicates",OnceExit(l){dedupe(l)}}}pluginCreator.postcss=true;l.exports=pluginCreator},428:l=>{"use strict";const v="postcss-discard-empty";function discardAndReport(l,m){function discardEmpty(l){const{type:y}=l;const _=l.nodes;if(_){l.each(discardEmpty)}if(y==="decl"&&!l.value&&!l.prop.startsWith("--")||y==="rule"&&!l.selector||_&&!_.length||y==="atrule"&&(!_&&!l.params||!l.params&&!_.length)){l.remove();m.messages.push({type:"removal",plugin:v,node:l})}}l.each(discardEmpty)}function pluginCreator(){return{postcssPlugin:v,OnceExit(l,{result:v}){discardAndReport(l,v)}}}pluginCreator.postcss=true;l.exports=pluginCreator},3440:l=>{"use strict";const v=new Set(["keyframes","counter-style"]);const m=new Set(["media","supports"]);function vendorUnprefixed(l){return l.replace(/^-\w+-/,"")}function isOverridable(l){return v.has(vendorUnprefixed(l.toLowerCase()))}function isScope(l){return m.has(vendorUnprefixed(l.toLowerCase()))}function getScope(l){let v=l.parent;const m=[l.name.toLowerCase(),l.params];while(v){if(v.type==="atrule"&&isScope(v.name)){m.unshift(v.name+" "+v.params)}v=v.parent}return m.join("|")}function pluginCreator(){return{postcssPlugin:"postcss-discard-overridden",prepare(){const l=new Map;const v=[];return{OnceExit(m){m.walkAtRules((m=>{if(isOverridable(m.name)){const y=getScope(m);l.set(y,m);v.push({node:m,scope:y})}}));v.forEach((v=>{if(l.get(v.scope)!==v.node){v.node.remove()}}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},4379:(l,v,m)=>{"use strict";const y=m(9718);function pluginCreator(){return{postcssPlugin:"postcss-merge-longhand",OnceExit(l){l.walkRules((l=>{y.forEach((v=>{v.explode(l);v.merge(l)}))}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},1957:(l,v,m)=>{"use strict";const y=m(1791);const _=new Set(["inherit","initial","unset","revert"]);l.exports=(l,v=true)=>{if(!l.value||v&&y(l)||l.value&&_.has(l.value.toLowerCase())){return false}return true}},1947:(l,v,m)=>{"use strict";const y=m(1791);const important=l=>l.important;const unimportant=l=>!l.important;const _=["inherit","initial","unset","revert"];l.exports=(l,v=true)=>{const m=new Set(l.map((l=>l.value.toLowerCase())));if(m.size>1){for(const l of _){if(m.has(l)){return false}}}if(v&&l.some(y)&&!l.every(y)){return false}return l.every(unimportant)||l.every(important)}},5975:l=>{"use strict";l.exports=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"])},2741:(l,v,m)=>{"use strict";const{list:y}=m(2043);const _=m(837);const w=m(7777);const k=m(587);const S=m(1950);const E=m(1382);const C=m(5665);const O=m(8890);const P=m(9146);const L=m(9927);const T=m(437);const A=m(1947);const R=m(1812);const D=m(9246);const q=m(1791);const F=m(1957);const $=m(5424);const V=m(1592);const{isValidWsc:B}=m(9275);const z=["width","style","color"];const U=["medium","none","currentcolor"];function borderProperty(...l){return`border-${l.join("-")}`}function mapBorderProperty(l){return borderProperty(l)}const W=D.map(mapBorderProperty);const Q=z.map(mapBorderProperty);const G=W.reduce(((l,v)=>l.concat(z.map((l=>`${v}-${l}`)))),[]);const Y=[["border"],W.concat(Q),G];const J=Y.reduce(((l,v)=>l.concat(v)));function getLevel(l){for(let v=0;vl!==undefined&&l.search(/var\s*\(\s*--/i)!==-1;function canMergeValues(l){return!l.some(isValueCustomProp)}function getColorValue(l){if(l.prop.substr(-5)==="color"){return l.value}return V(l.value)[2]||U[2]}function diffingProps(l,v){return z.reduce(((m,y,_)=>{if(l[_]===v[_]){return m}return[...m,y]}),[])}function mergeRedundant({values:l,nextValues:v,decl:m,nextDecl:y,index:w}){if(!A([m,y])){return}if(_.detect(m)||_.detect(y)){return}const S=diffingProps(l,v);if(S.length!==1){return}const E=S.pop();const C=z.indexOf(E);const O=`${y.prop}-${E}`;const P=`border-${E}`;let R=k(l[C]);R[w]=v[C];const D=l.filter(((l,v)=>v!==C)).join(" ");const q=L(R);const F=(T(m.value)+y.prop+y.value).length;const $=m.value.length+O.length+T(v[C]).length;const V=D.length+P.length+q.length;if(${if(!F(l,false)){return}if(_.detect(l)){return}const v=l.prop.toLowerCase();if(v==="border"){if(B(V(l.value))){W.forEach((v=>{w(l.parent,l,{prop:v})}));l.remove()}}if(W.some((l=>v===l))){let m=V(l.value);if(B(m)){z.forEach(((y,_)=>{w(l.parent,l,{prop:`${v}-${y}`,value:m[_]||U[_]})}));l.remove()}}z.some((m=>{if(v!==borderProperty(m)){return false}if(q(l)){l.prop=l.prop.toLowerCase();return false}k(l.value).forEach(((v,y)=>{w(l.parent,l,{prop:borderProperty(D[y],m),value:v})}));return l.remove()}))}))}function merge(l){D.forEach((v=>{const m=borderProperty(v);P(l,z.map((l=>borderProperty(v,l))),((l,v)=>{if(A(l,false)&&!l.some(_.detect)){w(v.parent,v,{prop:m,value:l.map(O).join(" ")});l.forEach(R);return true}return false}))}));z.forEach((v=>{const m=borderProperty(v);P(l,D.map((l=>borderProperty(l,v))),((l,v)=>{if(A(l)&&!l.some(_.detect)){w(v.parent,v,{prop:m,value:L(l.map(O).join(" "))});l.forEach(R);return true}return false}))}));P(l,W,((l,v)=>{if(l.some(_.detect)){return false}const m=l.map((({value:l})=>l));if(!canMergeValues(m)){return false}const y=m.map((l=>V(l)));if(!y.every(B)){return false}z.forEach(((l,m)=>{const _=y.map((l=>l[m]||U[m]));if(canMergeValues(_)){w(v.parent,v,{prop:borderProperty(l),value:L(_)})}else{w(v.parent,v)}}));l.forEach(R);return true}));P(l,Q,((v,m)=>{if(v.some(_.detect)){return false}const y=v.map((l=>k(l.value)));const S=[0,1,2,3].map((l=>[y[0][l],y[1][l],y[2][l]].join(" ")));if(!canMergeValues(S)){return false}const[E,C,P]=v;const L=getDistinctShorthands(S);if(isCloseEnough(S)&&A(v,false)){const y=S.indexOf(L[0])!==S.lastIndexOf(L[0]);const _=w(m.parent,m,{prop:"border",value:y?L[0]:L[1]});if(L[1]){const v=y?L[1]:L[0];const w=borderProperty(D[S.indexOf(v)]);l.insertAfter(_,Object.assign(m.clone(),{prop:w,value:v}))}v.forEach(R);return true}else if(L.length===1){l.insertBefore(P,Object.assign(m.clone(),{prop:"border",value:[E,C].map(O).join(" ")}));v.filter((l=>l.prop.toLowerCase()!==Q[2])).forEach(R);return true}return false}));P(l,Q,((v,m)=>{if(v.some(_.detect)){return false}const y=v.map((l=>k(l.value)));const w=[0,1,2,3].map((l=>[y[0][l],y[1][l],y[2][l]].join(" ")));const S=getDistinctShorthands(w);const E="medium none currentcolor";if(S.length>1&&S.length<4&&S.includes(E)){const y=w.filter((l=>l!==E));const _=S.sort(((l,v)=>w.filter((l=>l===v)).length-w.filter((v=>v===l)).length))[0];const k=S.length===2?y[0]:_;l.insertBefore(m,Object.assign(m.clone(),{prop:"border",value:k}));W.forEach(((v,y)=>{if(w[y]!==k){l.insertBefore(m,Object.assign(m.clone(),{prop:v,value:w[y]}))}}));v.forEach(R);return true}return false}));P(l,W,((v,m)=>{if(v.some(_.detect)){return false}const y=v.map((l=>{const v=V(l.value);if(!B(v)){return l.value}return v.map(((l,v)=>l||U[v])).join(" ")}));const w=getDistinctShorthands(y);if(isCloseEnough(y)){const _=y.indexOf(w[0])!==y.lastIndexOf(w[0]);l.insertBefore(m,Object.assign(m.clone(),{prop:"border",value:T(_?y[0]:y[1])}));if(w[1]){const v=_?w[1]:w[0];const k=W[y.indexOf(v)];l.insertBefore(m,Object.assign(m.clone(),{prop:k,value:T(v)}))}v.forEach(R);return true}return false}));W.forEach((v=>{z.forEach(((m,y)=>{const k=`${v}-${m}`;P(l,[v,k],((l,m)=>{if(m.prop!==v){return false}const S=V(m.value);if(!B(S)){return false}const E=l.filter((l=>l!==m))[0];if(!isValueCustomProp(S[y])||q(E)){return false}const C=S[y];S[y]=E.value;if(A(l,false)&&!l.some(_.detect)){w(m.parent,m,{prop:k,value:C});m.value=T(S);E.remove();return true}return false}))}))}));z.forEach(((v,m)=>{const y=borderProperty(v);P(l,["border",y],((l,v)=>{if(v.prop!=="border"){return false}const k=V(v.value);if(!B(k)){return false}const S=l.filter((l=>l!==v))[0];if(!isValueCustomProp(k[m])||q(S)){return false}const E=k[m];k[m]=S.value;if(A(l,false)&&!l.some(_.detect)){w(v.parent,v,{prop:y,value:E});v.value=T(k);S.remove();return true}return false}))}));let v=E(l,W);while(v.length){const m=v[v.length-1];z.forEach(((k,E)=>{const O=W.filter((l=>l!==m.prop)).map((l=>`${l}-${k}`));let P=l.nodes.slice(0,l.nodes.indexOf(m));const T=$(P,"border");if(T){P=P.slice(P.indexOf(T))}const A=P.filter((l=>l.type==="decl"&&O.includes(l.prop)&&l.important===m.important));const D=C(A,O);if(S(D,...O)&&!D.some(_.detect)){const l=D.map((l=>l?l.value:null));const _=l.filter(Boolean);const S=y.space(m.value)[E];l[W.indexOf(m.prop)]=S;let C=L(l.join(" "));if(_[0]===_[1]&&_[1]===_[2]){C=_[0]}let O=A[A.length-1];if(C===S){O=m;let l=y.space(m.value);l.splice(E,1);m.value=l.join(" ")}w(O.parent,O,{prop:borderProperty(k),value:C});v=v.filter((l=>!D.includes(l)));D.forEach(R)}}));v=v.filter((l=>l!==m))}l.walkDecls("border",(l=>{const v=l.next();if(!v||v.type!=="decl"){return false}const m=W.indexOf(v.prop);if(m===-1){return}const y=V(l.value);const _=V(v.value);if(!B(y)||!B(_)){return}const w={values:y,nextValues:_,decl:l,nextDecl:v,index:m};return mergeRedundant(w)}));l.walkDecls(/^border($|-(top|right|bottom|left)$)/i,(v=>{let m=V(v.value);if(!B(m)){return}const y=W.indexOf(v.prop);let _=[...W];_.splice(y,1);z.forEach(((y,k)=>{const S=_.map((l=>`${l}-${y}`));P(l,[v.prop,...S],(l=>{if(!l.includes(v)){return false}const _=l.filter((l=>l!==v));if(_[0].value.toLowerCase()===_[1].value.toLowerCase()&&_[1].value.toLowerCase()===_[2].value.toLowerCase()&&m[k]!==undefined&&_[0].value.toLowerCase()===m[k].toLowerCase()){_.forEach(R);w(v.parent,v,{prop:borderProperty(y),value:m[k]});m[k]=null}return false}));const E=m.join(" ");if(E){v.value=E}else{v.remove()}}))}));l.walkDecls(/^border($|-(top|right|bottom|left)$)/i,(l=>{l.value=T(l.value)}));l.walkDecls(/^border-spacing$/i,(l=>{const v=y.space(l.value);if(v.length>1&&v[0]===v[1]){l.value=v.slice(1).join(" ")}}));v=E(l,J);while(v.length){const l=v[v.length-1];const m=l.prop.split("-").pop();const y=v.filter((v=>!_.detect(l)&&!_.detect(v)&&!q(l)&&v!==l&&v.important===l.important&&getLevel(v.prop)>getLevel(l.prop)&&(v.prop.toLowerCase().includes(l.prop)||v.prop.toLowerCase().endsWith(m))));y.forEach(R);v=v.filter((l=>!y.includes(l)));let w=v.filter((v=>!_.detect(l)&&!_.detect(v)&&v!==l&&v.important===l.important&&v.prop===l.prop&&!(!q(v)&&q(l))));if(w.length){if(/hsla\(|rgba\(/i.test(getColorValue(l))){const l=w.filter((l=>!/hsla\(|rgba\(/i.test(getColorValue(l)))).pop();w=w.filter((v=>v!==l))}w.forEach(R)}v=v.filter((v=>v!==l&&!w.includes(v)))}}l.exports={explode:explode,merge:merge}},3052:(l,v,m)=>{"use strict";const y=m(837);const _=m(1947);const w=m(1382);const k=m(9927);const S=m(587);const E=m(7777);const C=m(9146);const O=m(2825);const P=m(1812);const L=m(9246);const T=m(1791);const A=m(1957);l.exports=l=>{const v=L.map((v=>`${l}-${v}`));const cleanup=m=>{let _=w(m,[l].concat(v));while(_.length){const v=_[_.length-1];const m=_.filter((m=>!y.detect(v)&&!y.detect(m)&&m!==v&&m.important===v.important&&v.prop===l&&m.prop!==v.prop));m.forEach(P);_=_.filter((l=>!m.includes(l)));let w=_.filter((l=>!y.detect(v)&&!y.detect(l)&&l!==v&&l.important===v.important&&l.prop===v.prop&&!(!T(l)&&T(v))));w.forEach(P);_=_.filter((l=>l!==v&&!w.includes(l)))}};const m={explode:m=>{m.walkDecls(new RegExp("^"+l+"$","i"),(l=>{if(!A(l)){return}if(y.detect(l)){return}const m=S(l.value);L.forEach(((y,_)=>{E(l.parent,l,{prop:v[_],value:m[_]})}));l.remove()}))},merge:m=>{C(m,v,((v,m)=>{if(_(v)&&!v.some(y.detect)){E(m.parent,m,{prop:l,value:k(O(...v))});v.forEach(P);return true}return false}));cleanup(m)}};return m}},3438:(l,v,m)=>{"use strict";const{list:y}=m(2043);const{unit:_}=m(9285);const w=m(837);const k=m(1947);const S=m(1382);const E=m(8890);const C=m(9146);const O=m(7777);const P=m(1812);const L=m(1791);const T=m(1957);const A=["column-width","column-count"];const R="auto";const D="inherit";function normalize(l){if(l[0].toLowerCase()===R){return l[1]}if(l[1].toLowerCase()===R){return l[0]}if(l[0].toLowerCase()===D&&l[1].toLowerCase()===D){return D}return l.join(" ")}function explode(l){l.walkDecls(/^columns$/i,(l=>{if(!T(l)){return}if(w.detect(l)){return}let v=y.space(l.value);if(v.length===1){v.push(R)}v.forEach(((v,m)=>{let y=A[1];const w=_(v);if(v.toLowerCase()===R){y=A[m]}else if(w&&w.unit!==""){y=A[0]}O(l.parent,l,{prop:y,value:v})}));l.remove()}))}function cleanup(l){let v=S(l,["columns"].concat(A));while(v.length){const l=v[v.length-1];const m=v.filter((v=>!w.detect(l)&&!w.detect(v)&&v!==l&&v.important===l.important&&l.prop==="columns"&&v.prop!==l.prop));m.forEach(P);v=v.filter((l=>!m.includes(l)));let y=v.filter((v=>!w.detect(l)&&!w.detect(v)&&v!==l&&v.important===l.important&&v.prop===l.prop&&!(!L(v)&&L(l))));y.forEach(P);v=v.filter((v=>v!==l&&!y.includes(v)))}}function merge(l){C(l,A,((l,v)=>{if(k(l)&&!l.some(w.detect)){O(v.parent,v,{prop:"columns",value:normalize(l.map(E))});l.forEach(P);return true}return false}));cleanup(l)}l.exports={explode:explode,merge:merge}},9718:(l,v,m)=>{"use strict";const y=m(2741);const _=m(3438);const w=m(8164);const k=m(1941);l.exports=[y,_,w,k]},8164:(l,v,m)=>{"use strict";const y=m(3052);l.exports=y("margin")},1941:(l,v,m)=>{"use strict";const y=m(3052);l.exports=y("padding")},1382:l=>{"use strict";l.exports=function getDecls(l,v){return l.nodes.filter((l=>l.type==="decl"&&v.includes(l.prop.toLowerCase())))}},5424:l=>{"use strict";l.exports=(l,v)=>l.filter((l=>l.type==="decl"&&l.prop.toLowerCase()===v)).pop()},5665:(l,v,m)=>{"use strict";const y=m(5424);l.exports=function getRules(l,v){return v.map((v=>y(l,v))).filter(Boolean)}},8890:l=>{"use strict";l.exports=function getValue({value:l}){return l}},1950:l=>{"use strict";l.exports=(l,...v)=>v.every((v=>l.some((l=>l.prop&&l.prop.toLowerCase().includes(v)))))},7777:l=>{"use strict";l.exports=function insertCloned(l,v,m){const y=Object.assign(v.clone(),m);l.insertAfter(v,y);return y}},1791:l=>{"use strict";l.exports=l=>l.value.search(/var\s*\(\s*--/i)!==-1},9146:(l,v,m)=>{"use strict";const y=m(1950);const _=m(1382);const w=m(5665);function isConflictingProp(l,v){if(!v.prop||v.important!==l.important){return false}const m=l.prop.split("-");return m.some((()=>{m.pop();return m.join("-")===v.prop}))}function hasConflicts(l,v){const m=Math.min(...l.map((l=>v.indexOf(l))));const y=Math.max(...l.map((l=>v.indexOf(l))));const _=v.slice(m+1,y);return l.some((l=>_.some((v=>isConflictingProp(l,v)))))}l.exports=function mergeRules(l,v,m){let k=_(l,v);while(k.length){const _=k[k.length-1];const S=k.filter((l=>l.important===_.important));const E=w(S,v);if(y(E,...v)&&!hasConflicts(E,l.nodes)){if(m(E,_,S)){k=k.filter((l=>!E.includes(l)))}}k=k.filter((l=>l!==_))}}},2825:(l,v,m)=>{"use strict";const y=m(8890);l.exports=(...l)=>l.map(y).join(" ")},9927:(l,v,m)=>{"use strict";const y=m(587);l.exports=l=>{const v=y(l);if(v[3]===v[1]){v.pop();if(v[2]===v[0]){v.pop();if(v[0]===v[1]){v.pop()}}}return v.join(" ")}},437:(l,v,m)=>{"use strict";const y=m(1592);const _=m(9927);const{isValidWsc:w}=m(9275);const k=["medium","none","currentcolor"];l.exports=l=>{const v=y(l);if(!w(v)){return _(l)}const m=[...v,""].reduceRight(((l,v,m,y)=>{if(v===undefined||v.toLowerCase()===k[m]&&(!m||(y[m-1]||"").toLowerCase()!==v.toLowerCase())){return l}return v+" "+l})).trim();return _(m||"none")}},587:(l,v,m)=>{"use strict";const{list:y}=m(2043);l.exports=l=>{const v=typeof l==="string"?y.space(l):l;return[v[0],v[1]||v[0],v[2]||v[0],v[3]||v[1]||v[0]]}},1592:(l,v,m)=>{"use strict";const{list:y}=m(2043);const{isWidth:_,isStyle:w,isColor:k}=m(9275);const S=/^\s*(none|medium)(\s+none(\s+(none|currentcolor))?)?\s*$/i;const E=/(^.*var)(.*\(.*--.*\))(.*)/i;const varPreserveCase=l=>`${l[1].toLowerCase()}${l[2]}${l[3].toLowerCase()}`;const toLower=l=>{const v=E.exec(l);return v?varPreserveCase(v):l.toLowerCase()};l.exports=function parseWsc(l){if(S.test(l)){return["medium","none","currentcolor"]}let v,m,E;const C=y.space(l);if(C.length>1&&w(C[1])&&C[0].toLowerCase()==="none"){C.unshift();v="0"}const O=[];C.forEach((l=>{if(w(l)){m=toLower(l)}else if(_(l)){v=toLower(l)}else if(k(l)){E=toLower(l)}else{O.push(l)}}));if(O.length){if(!v&&m&&E){v=O.pop()}if(v&&!m&&E){m=O.pop()}if(v&&m&&!E){E=O.pop()}}return[v,m,E]}},1812:l=>{"use strict";l.exports=function remove(l){return l.remove()}},9246:l=>{"use strict";l.exports=["top","right","bottom","left"]},9275:(l,v,m)=>{"use strict";const y=m(5975);const _=new Set(["thin","medium","thick"]);const w=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"]);function isStyle(l){return l!==undefined&&w.has(l.toLowerCase())}function isWidth(l){return l&&_.has(l.toLowerCase())||/^(\d+(\.\d+)?|\.\d+)(\w+)?$/.test(l)}function isColor(l){if(!l){return false}l=l.toLowerCase();if(/rgba?\(/.test(l)){return true}if(/hsla?\(/.test(l)){return true}if(/#([0-9a-z]{6}|[0-9a-z]{3})/.test(l)){return true}if(l==="transparent"){return true}if(l==="currentcolor"){return true}return y.has(l)}function isValidWsc(l){const v=isWidth(l[0]);const m=isStyle(l[1]);const y=isColor(l[2]);return v&&m||v&&y||m&&y}l.exports={isStyle:isStyle,isWidth:isWidth,isColor:isColor,isValidWsc:isValidWsc}},6121:(l,v,m)=>{"use strict";const y=m(5478);const{sameParent:_}=m(506);const{ensureCompatibility:w,sameVendor:k,noVendor:S}=m(1840);function declarationIsEqual(l,v){return l.important===v.important&&l.prop===v.prop&&l.value===v.value}function indexOfDeclaration(l,v){return l.findIndex((l=>declarationIsEqual(l,v)))}function intersect(l,v,m){return l.filter((l=>{const y=~indexOfDeclaration(v,l);return m?!y:y}))}function sameDeclarationsAndOrder(l,v){if(l.length!==v.length){return false}return l.every(((l,m)=>declarationIsEqual(l,v[m])))}function canMerge(l,v,m,y){const E=l.selectors;const C=v.selectors;const O=E.concat(C);if(!w(O,m,y)){return false}const P=_(l,v);const{name:L}=l.parent;if(P&&L&&L.includes("keyframes")){return false}return P&&(O.every(S)||k(E,C))}function getDecls(l){return l.nodes.filter((l=>l.type==="decl"))}const joinSelectors=(...l)=>l.map((l=>l.selector)).join();function ruleLength(...l){return l.map((l=>l.nodes.length?String(l):"")).join("").length}function splitProp(l){const v=l.split("-");if(l[0]!=="-"){return{prefix:"",base:v[0],rest:v.slice(1)}}if(l[1]==="-"){return{prefix:null,base:null,rest:[l]}}return{prefix:v[1],base:v[2],rest:v.slice(3)}}function isConflictingProp(l,v){if(l===v){return true}const m=splitProp(l);const y=splitProp(v);if(!m.base&&!y.base){return true}if(m.base!==y.base){return false}if(m.rest.length!==y.rest.length){return true}return m.rest.every(((l,v)=>y.rest[v]===l))}function mergeParents(l,v){if(!l.parent||!v.parent){return false}if(l.parent===v.parent){return false}v.remove();l.parent.append(v);return true}function partialMerge(l,v){let m=intersect(getDecls(l),getDecls(v));if(!m.length){return v}let y=v.next();if(!y){const l=v.parent.next();y=l&&l.nodes&&l.nodes[0]}if(y&&y.type==="rule"&&canMerge(v,y)){let _=intersect(getDecls(v),getDecls(y));if(_.length>m.length){mergeParents(v,y);l=v;v=y;m=_}}const _=getDecls(l);m=m.filter(((l,v)=>{const y=indexOfDeclaration(_,l);const w=_.slice(y+1).filter((v=>isConflictingProp(v.prop,l.prop)));if(!w.length){return true}const k=m.slice(v+1).filter((v=>isConflictingProp(v.prop,l.prop)));if(!k.length){return false}if(w.length!==k.length){return false}return w.every(((l,v)=>declarationIsEqual(l,k[v])))}));const w=getDecls(v);m=m.filter((l=>{const v=w.findIndex((v=>isConflictingProp(v.prop,l.prop)));if(v===-1){return false}if(!declarationIsEqual(w[v],l)){return false}if(l.prop.toLowerCase()!=="direction"&&l.prop.toLowerCase()!=="unicode-bidi"&&w.some((l=>l.prop.toLowerCase()==="all"))){return false}w.splice(v,1);return true}));if(!m.length){return v}const k=v.clone();k.selector=joinSelectors(l,v);k.nodes=[];v.parent.insertBefore(v,k);const S=l.clone();const E=v.clone();function moveDecl(l){return v=>{if(~indexOfDeclaration(m,v)){l.call(this,v)}}}S.walkDecls(moveDecl((l=>{l.remove();k.append(l)})));E.walkDecls(moveDecl((l=>l.remove())));const C=ruleLength(S,k,E);const O=ruleLength(l,v);if(C{if(!l.nodes.length){l.remove()}}));if(!E.parent){return k}return E}else{k.remove();return v}}function selectorMerger(l,v){let m=null;return function(y){if(!m||!canMerge(y,m,l,v)){m=y;return}if(m===y){m=y;return}mergeParents(m,y);if(sameDeclarationsAndOrder(getDecls(y),getDecls(m))){y.selector=joinSelectors(m,y);m.remove();m=y;return}if(m.selector===y.selector){const l=getDecls(m);y.walk((v=>{if(~indexOfDeclaration(l,v)){v.remove();return}m.append(v)}));y.remove();return}m=partialMerge(m,y)}}function pluginCreator(){return{postcssPlugin:"postcss-merge-rules",prepare(l){const v=l.opts||{};const m=y(null,{stats:v.stats,path:__dirname,env:v.env});const _=new Map;return{OnceExit(l){l.walkRules(selectorMerger(m,_))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},1840:(l,v,m)=>{"use strict";const{isSupported:y}=m(8390);const _=m(2997);const w=/^#?[-._a-z0-9 ]+$/i;const k="css-sel2";const S="css-sel3";const E="css-gencontent";const C="css-first-letter";const O="css-first-line";const P="css-in-out-of-range";const L="form-validation";const T=/-(ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)-/;const A=new Set(["=","~=","|="]);const R=new Set(["^=","$=","*="]);function filterPrefixes(l){return l.match(T)}const findMsInputPlaceholder=l=>~l.search(/-ms-input-placeholder/i);function sameVendor(l,v){let same=l=>l.map(filterPrefixes).join();let findMsVendor=l=>l.find(findMsInputPlaceholder);return same(l)===same(v)&&!(findMsVendor(l)&&findMsVendor(v))}function noVendor(l){return!T.test(l)}const D={":active":k,":after":E,":any-link":"css-any-link",":before":E,":checked":S,":default":"css-default-pseudo",":dir":"css-dir-pseudo",":disabled":S,":empty":S,":enabled":S,":first-child":k,":first-letter":C,":first-line":O,":first-of-type":S,":focus":k,":focus-within":"css-focus-within",":focus-visible":"css-focus-visible",":has":"css-has",":hover":k,":in-range":P,":indeterminate":"css-indeterminate-pseudo",":invalid":L,":is":"css-matches-pseudo",":lang":k,":last-child":S,":last-of-type":S,":link":k,":matches":"css-matches-pseudo",":not":S,":nth-child":S,":nth-last-child":S,":nth-last-of-type":S,":nth-of-type":S,":only-child":S,":only-of-type":S,":optional":"css-optional-pseudo",":out-of-range":P,":placeholder-shown":"css-placeholder-shown",":required":L,":root":S,":target":S,"::after":E,"::backdrop":"dialog","::before":E,"::first-letter":C,"::first-line":O,"::marker":"css-marker-pseudo","::placeholder":"css-placeholder","::selection":"css-selection",":valid":L,":visited":k};function isCssMixin(l){return l[l.length-1]===":"}function isHostPseudoClass(l){return l.includes(":host")}const q=new Map;function isSupportedCached(l,v){const m=JSON.stringify({feature:l,browsers:v});let _=q.get(m);if(!_){_=y(l,v);q.set(m,_)}return _}function ensureCompatibility(l,v,m){if(l.some(isCssMixin)){return false}if(l.some(isHostPseudoClass)){return false}return l.every((l=>{if(w.test(l)){return true}if(m&&m.has(l)){return m.get(l)}let y=true;_((l=>{l.walk((l=>{const{type:m,value:_}=l;if(m==="pseudo"){const l=D[_];if(!l&&noVendor(_)){y=false}if(l&&y){y=isSupportedCached(l,v)}}if(m==="combinator"){if(_.includes("~")){y=isSupportedCached(S,v)}if(_.includes(">")||_.includes("+")){y=isSupportedCached(k,v)}}if(m==="attribute"&&l.attribute){if(!l.operator){y=isSupportedCached(k,v)}if(_){if(A.has(l.operator)){y=isSupportedCached(k,v)}if(R.has(l.operator)){y=isSupportedCached(S,v)}}if(l.insensitive){y=isSupportedCached("css-case-insensitive",v)}}if(!y){return false}}))})).processSync(l);if(m){m.set(l,y)}return y}))}l.exports={sameVendor:sameVendor,noVendor:noVendor,pseudoElements:D,ensureCompatibility:ensureCompatibility}},2069:(l,v,m)=>{"use strict";const y=m(9285);const _=m(4270);const w=m(6283);const k=m(3876);function hasVariableFunction(l){const v=l.toLowerCase();return v.includes("var(")||v.includes("env(")}function transform(l,v,m){let S=l.toLowerCase();if(S==="font-weight"&&!hasVariableFunction(v)){return _(v)}else if(S==="font-family"&&!hasVariableFunction(v)){const l=y(v);l.nodes=w(l.nodes,m);return l.toString()}else if(S==="font"){const l=y(v);l.nodes=k(l.nodes,m);return l.toString()}return v}function pluginCreator(l){l=Object.assign({},{removeAfterKeyword:false,removeDuplicates:true,removeQuotes:true},l);return{postcssPlugin:"postcss-minify-font-values",prepare(){const v=new Map;return{OnceExit(m){m.walkDecls(/font/i,(m=>{const y=m.value;if(!y){return}const _=m.prop;const w=`${_}|${y}`;if(v.has(w)){m.value=v.get(w);return}const k=transform(_,y,l);m.value=k;v.set(w,k)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},7092:l=>{"use strict";l.exports={style:new Set(["italic","oblique"]),variant:new Set(["small-caps"]),weight:new Set(["100","200","300","400","500","600","700","800","900","bold","lighter","bolder"]),stretch:new Set(["ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"]),size:new Set(["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"])}},6283:(l,v,m)=>{"use strict";const{stringify:y}=m(9285);function uniqueFontFamilies(l){return l.filter(((v,m)=>{if(v.toLowerCase()==="monospace"){return true}return m===l.indexOf(v)}))}const _=["inherit","initial","unset"];const w=new Set(["sans-serif","serif","fantasy","cursive","monospace","system-ui"]);function makeArray(l,v){let m=[];while(v--){m[v]=l}return m}const k=/[ !"#$%&'()*+,.\/;<=>?@\[\\\]^`{|}~]/;function escape(l,v){let m=0;let y;let _;let w;let S="";while(m{const y=m.length;const _=Math.floor(y/2);const w=makeArray("\\ ",_);if(y%2){w[_-1]+="\\ "}return(v||"")+" "+w.join(" ")}));if(A.test(y)&&!T.test(y)){y=y.replace(A,"\\ ")}if(C.test(y)){y="\\ "+y.slice(1)}return y}l.exports=function(l,v){const m=[];let _=null;let k,E;l.forEach(((l,v,y)=>{if(l.type==="string"||l.type==="function"){m.push(l)}else if(l.type==="word"){if(!_){_={type:"word",value:""};m.push(_)}_.value+=l.value}else if(l.type==="space"){if(_&&v!==y.length-1){_.value+=" "}}else{_=null}}));let C=m.map((l=>{if(l.type==="string"){const m=S.test(l.value);if(!v.removeQuotes||m||/[0-9]/.test(l.value.slice(0,1))){return y(l)}let _=escapeIdentifierSequence(l.value);if(_.length{"use strict";const{unit:y}=m(9285);const _=m(7092);const w=m(6283);const k=m(4270);l.exports=function(l,v){let m,S,E,C;let O=NaN;let P=false;for(m=0,S=l.length;m{"use strict";l.exports=function(l){const v=l.toLowerCase();return v==="normal"?"400":v==="bold"?"700":l}},665:(l,v,m)=>{"use strict";const y=m(9285);const{getArguments:_}=m(506);const w=m(1001);const k={top:"0deg",right:"90deg",bottom:"180deg",left:"270deg"};function isLessThan(l,v){return l.unit.toLowerCase()===v.unit.toLowerCase()&&parseFloat(l.number)>=parseFloat(v.number)}function optimise(l){const v=l.value;if(!v){return}const m=v.toLowerCase();if(m.includes("var(")||m.includes("env(")){return}if(!m.includes("gradient")){return}l.value=y(v).walk((l=>{if(l.type!=="function"||!l.nodes.length){return false}const v=l.value.toLowerCase();if(v==="linear-gradient"||v==="repeating-linear-gradient"||v==="-webkit-linear-gradient"||v==="-webkit-repeating-linear-gradient"){let v=_(l);if(l.nodes[0].value.toLowerCase()==="to"&&v[0].length===3){l.nodes=l.nodes.slice(2);l.nodes[0].value=k[l.nodes[0].value.toLowerCase()]}let m;v.forEach(((l,_)=>{if(l.length!==3){return}let w=_===v.length-1;let k=y.unit(l[2].value);if(m===undefined){m=k;if(!w&&m&&m.number==="0"&&m.unit.toLowerCase()!=="deg"){l[1].value=l[2].value=""}return}if(m&&k&&isLessThan(m,k)){l[2].value="0"}m=k;if(w&&l[2].value==="100%"){l[1].value=l[2].value=""}}));return false}if(v==="radial-gradient"||v==="repeating-radial-gradient"){let v=_(l);let m;const w=v[0].find((l=>l.value.toLowerCase()==="at"));v.forEach(((l,v)=>{if(!l[2]||!v&&w){return}let _=y.unit(l[2].value);if(!m){m=_;return}if(m&&_&&isLessThan(m,_)){l[2].value="0"}m=_}));return false}if(v==="-webkit-radial-gradient"||v==="-webkit-repeating-radial-gradient"){let v=_(l);let m;v.forEach((l=>{let v;let _;if(l[2]!==undefined){if(l[0].type==="function"){v=`${l[0].value}(${y.stringify(l[0].nodes)})`}else{v=l[0].value}if(l[2].type==="function"){_=`${l[2].value}(${y.stringify(l[2].nodes)})`}else{_=l[2].value}}else{if(l[0].type==="function"){v=`${l[0].value}(${y.stringify(l[0].nodes)})`}v=l[0].value}v=v.toLowerCase();const k=_!==undefined?w(v,_.toLowerCase()):w(v);if(!k||!l[2]){return}let S=y.unit(l[2].value);if(!m){m=S;return}if(m&&S&&isLessThan(m,S)){l[2].value="0"}m=S}));return false}})).toString()}function pluginCreator(){return{postcssPlugin:"postcss-minify-gradients",OnceExit(l){l.walkDecls(optimise)}}}pluginCreator.postcss=true;l.exports=pluginCreator},1001:(l,v,m)=>{"use strict";const{unit:y}=m(9285);const{colord:_,extend:w}=m(43);const k=m(4517);w([k]);const S=new Set(["PX","IN","CM","MM","EM","REM","POINTS","PC","EX","CH","VW","VH","VMIN","VMAX","%"]);function isCSSLengthUnit(l){return S.has(l.toUpperCase())}function isStop(l){if(l){let v=false;const m=y(l);if(m){const l=Number(m.number);if(l===0||!isNaN(l)&&isCSSLengthUnit(m.unit)){v=true}}else{v=/^calc\(\S+\)$/g.test(l)}return v}return true}l.exports=function isColorStop(l,v){return _(l).isValid()&&isStop(v)}},6581:(l,v,m)=>{"use strict";const y=m(5478);const _=m(9285);const{getArguments:w}=m(506);function gcd(l,v){return v?gcd(v,l%v):l}function aspectRatio(l,v){const m=gcd(l,v);return[l/m,v/m]}function split(l){return l.map((l=>_.stringify(l))).join("")}function removeNode(l){l.value="";l.type="word"}function sortAndDedupe(l){const v=[...new Set(l)];v.sort();return v.join()}function transform(l,v){const m=v.name.toLowerCase();if(!v.params||!["media","supports"].includes(m)){return}const y=_(v.params);y.walk(((m,_)=>{if(m.type==="div"){m.before=m.after=""}else if(m.type==="function"){m.before="";if(m.nodes[0]&&m.nodes[0].type==="word"&&m.nodes[0].value.startsWith("--")&&m.nodes[2]===undefined){m.after=" "}else{m.after=""}if(m.nodes[4]&&m.nodes[0].value.toLowerCase().indexOf("-aspect-ratio")===3){const[l,v]=aspectRatio(Number(m.nodes[2].value),Number(m.nodes[4].value));m.nodes[2].value=l.toString();m.nodes[4].value=v.toString()}}else if(m.type==="space"){m.value=" "}else{const w=y.nodes[_-2];if(m.value.toLowerCase()==="all"&&v.name.toLowerCase()==="media"&&!w){const v=y.nodes[_+2];if(!l||v){removeNode(m)}if(v&&v.value.toLowerCase()==="and"){const l=y.nodes[_+1];const m=y.nodes[_+3];removeNode(v);removeNode(l);removeNode(m)}}}}),true);v.params=sortAndDedupe(w(y).map(split));if(!v.params.length){v.raws.afterName=""}}function hasAllBug(l){return["ie 10","ie 11"].includes(l)}function pluginCreator(l={}){const v=y(null,{stats:l.stats,path:__dirname,env:l.env});return{postcssPlugin:"postcss-minify-params",OnceExit(l){l.walkAtRules(transform.bind(null,v.some(hasAllBug)))}}}pluginCreator.postcss=true;l.exports=pluginCreator},9108:(l,v,m)=>{"use strict";const y=m(2997);const _=m(289);const w=new Set(["::before","::after","::first-letter","::first-line"]);function attribute(l){if(l.value){if(l.raws.value){l.raws.value=l.raws.value.replace(/\\\n/g,"").trim()}if(_(l.value)){l.quoteMark=null}if(l.operator){l.operator=l.operator.trim()}}l.rawSpaceBefore="";l.rawSpaceAfter="";l.spaces.attribute={before:"",after:""};l.spaces.operator={before:"",after:""};l.spaces.value={before:"",after:l.insensitive?" ":""};if(l.raws.spaces){l.raws.spaces.attribute={before:"",after:""};l.raws.spaces.operator={before:"",after:""};l.raws.spaces.value={before:"",after:l.insensitive?" ":""};if(l.insensitive){l.raws.spaces.insensitive={before:"",after:""}}}l.attribute=l.attribute.trim()}function combinator(l){const v=l.value.trim();l.spaces.before="";l.spaces.after="";l.rawSpaceBefore="";l.rawSpaceAfter="";l.value=v.length?v:" "}const k=new Map([[":nth-child",":first-child"],[":nth-of-type",":first-of-type"],[":nth-last-child",":last-child"],[":nth-last-of-type",":last-of-type"]]);function pseudo(l){const v=l.value.toLowerCase();if(l.nodes.length===1&&k.has(v)){const m=l.at(0);const _=m.at(0);if(m.length===1){if(_.value==="1"){l.replaceWith(y.pseudo({value:k.get(v)}))}if(_.value&&_.value.toLowerCase()==="even"){_.value="2n"}}if(m.length===3){const l=m.at(1);const v=m.at(2);if(_.value&&_.value.toLowerCase()==="2n"&&l.value==="+"&&v.value==="1"){_.value="odd";l.remove();v.remove()}}return}const m=new Set;l.walk((l=>{if(l.type==="selector"){const v=String(l);if(!m.has(v)){m.add(v)}else{l.remove()}}}));if(w.has(v)){l.value=l.value.slice(1)}}const S=new Map([["from","0%"],["100%","to"]]);function tag(l){const v=l.value.toLowerCase();if(S.has(v)){l.value=S.get(v)}}function universal(l){const v=l.next();if(v&&v.type!=="combinator"){l.remove()}}const E=new Map([["attribute",attribute],["combinator",combinator],["pseudo",pseudo],["tag",tag],["universal",universal]]);function pluginCreator(){return{postcssPlugin:"postcss-minify-selectors",OnceExit(l){const v=new Map;const m=y((l=>{const v=new Set;l.walk((l=>{l.spaces.before=l.spaces.after="";const m=E.get(l.type);if(m!==undefined){m(l);return}const y=String(l);if(l.type==="selector"&&l.parent&&l.parent.type!=="pseudo"){if(!v.has(y)){v.add(y)}else{l.remove()}}}));l.nodes.sort()}));l.walkRules((l=>{const y=l.raws.selector&&l.raws.selector.value===l.selector?l.raws.selector.raw:l.selector;if(y[y.length-1]===":"){return}if(v.has(y)){l.selector=v.get(y);return}const _=m.processSync(y);l.selector=_;v.set(y,_)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},289:l=>{"use strict";const v=/\\([0-9A-Fa-f]{1,6})[ \t\n\f\r]?/g;const m=/[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;l.exports=function canUnquote(l){if(l==="-"||l===""){return false}l=l.replace(v,"a").replace(/\\./g,"a");return!(m.test(l)||/^(?:-?\d|--)/.test(l))}},1064:l=>{"use strict";const v="charset";const m=/[^\x00-\x7F]/;function pluginCreator(l={}){return{postcssPlugin:"postcss-normalize-"+v,OnceExit(y,{AtRule:_}){let w;let k;y.walk((l=>{if(l.type==="atrule"&&l.name===v){if(!w){w=l}l.remove()}else if(!k&&l.parent===y&&m.test(l.toString())){k=l}}));if(k){if(!w&&l.add!==false){w=new _({name:v,params:'"utf-8"'})}if(w){w.source=k.source;y.prepend(w)}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},2066:(l,v,m)=>{"use strict";const y=m(9285);const _=m(8226);function transform(l){const{nodes:v}=y(l);if(v.length===1){return l}const m=v.filter(((l,v)=>v%2===0)).filter((l=>l.type==="word")).map((l=>l.value.toLowerCase()));if(m.length===0){return l}const w=_.get(m.toString());if(!w){return l}return w}function pluginCreator(){return{postcssPlugin:"postcss-normalize-display-values",prepare(){const l=new Map;return{OnceExit(v){v.walkDecls(/^display$/i,(v=>{const m=v.value;if(!m){return}if(l.has(m)){v.value=l.get(m);return}const y=transform(m);v.value=y;l.set(m,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},8226:l=>{"use strict";const v="block";const m="flex";const y="flow";const _="flow-root";const w="grid";const k="inline";const S="inline-block";const E="inline-flex";const C="inline-grid";const O="inline-table";const P="list-item";const L="ruby";const T="ruby-base";const A="ruby-text";const R="run-in";const D="table";const q="table-cell";const F="table-caption";l.exports=new Map([[[v,y].toString(),v],[[v,_].toString(),_],[[k,y].toString(),k],[[k,_].toString(),S],[[R,y].toString(),R],[[P,v,y].toString(),P],[[k,y,P].toString(),k+" "+P],[[v,m].toString(),m],[[k,m].toString(),E],[[v,w].toString(),w],[[k,w].toString(),C],[[k,L].toString(),L],[[v,D].toString(),D],[[k,D].toString(),O],[[q,y].toString(),q],[[F,y].toString(),F],[[T,y].toString(),T],[[A,y].toString(),A]])},1792:(l,v,m)=>{"use strict";const y=m(9285);const _=new Set(["top","right","bottom","left","center"]);const w="50%";const k=new Map([["right","100%"],["left","0"]]);const S=new Map([["bottom","100%"],["top","0"]]);const E=new Set(["calc","min","max","clamp"]);function isCommaNode(l){return l.type==="div"&&l.value===","}function isVariableFunctionNode(l){if(l.type!=="function"){return false}return["var","env"].includes(l.value.toLowerCase())}function isMathFunctionNode(l){if(l.type!=="function"){return false}return E.has(l.value.toLowerCase())}function isNumberNode(l){if(l.type!=="word"){return false}const v=parseFloat(l.value);return!isNaN(v)}function isDimensionNode(l){if(l.type!=="word"){return false}const v=y.unit(l.value);if(!v){return false}return v.unit!==""}function transform(l){const v=y(l);const m=[];let E=0;let C=true;v.nodes.forEach(((l,v)=>{if(isCommaNode(l)){E+=1;C=true;return}if(!C){return}if(l.type==="div"&&l.value==="/"){C=false;return}if(!m[E]){m[E]={start:null,end:null}}if(isVariableFunctionNode(l)){C=false;m[E].start=null;m[E].end=null;return}const y=l.type==="word"&&_.has(l.value.toLowerCase())||isDimensionNode(l)||isNumberNode(l)||isMathFunctionNode(l);if(m[E].start===null&&y){m[E].start=v;m[E].end=v;return}if(m[E].start!==null){if(l.type==="space"){return}else if(y){m[E].end=v;return}return}}));m.forEach((l=>{if(l.start===null){return}const m=v.nodes.slice(l.start,l.end+1);if(m.length>3){return}const y=m[0].value.toLowerCase();const E=m[2]&&m[2].value?m[2].value.toLowerCase():null;if(m.length===1||E==="center"){if(E){m[2].value=m[1].value=""}const l=new Map([...k,["center",w]]);if(l.has(y)){m[0].value=l.get(y)}return}if(E!==null){if(y==="center"&&_.has(E)){m[0].value=m[1].value="";if(k.has(E)){m[2].value=k.get(E)}return}if(k.has(y)&&S.has(E)){m[0].value=k.get(y);m[2].value=S.get(E);return}else if(S.has(y)&&k.has(E)){m[0].value=k.get(E);m[2].value=S.get(y);return}}}));return v.toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-positions",OnceExit(l){const v=new Map;l.walkDecls(/^(background(-position)?|(-\w+-)?perspective-origin)$/i,(l=>{const m=l.value;if(!m){return}if(v.has(m)){l.value=v.get(m);return}const y=transform(m);l.value=y;v.set(m,y)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},1026:(l,v,m)=>{"use strict";const y=m(9285);const _=m(1752);function evenValues(l,v){return v%2===0}const w=new Set(_.values());function isCommaNode(l){return l.type==="div"&&l.value===","}function isVariableFunctionNode(l){if(l.type!=="function"){return false}return["var","env"].includes(l.value.toLowerCase())}function transform(l){const v=y(l);if(v.nodes.length===1){return l}const m=[];let k=0;let S=true;v.nodes.forEach(((l,v)=>{if(isCommaNode(l)){k+=1;S=true;return}if(!S){return}if(l.type==="div"&&l.value==="/"){S=false;return}if(!m[k]){m[k]={start:null,end:null}}if(isVariableFunctionNode(l)){S=false;m[k].start=null;m[k].end=null;return}const y=l.type==="word"&&w.has(l.value.toLowerCase());if(m[k].start===null&&y){m[k].start=v;m[k].end=v;return}if(m[k].start!==null){if(l.type==="space"){return}else if(y){m[k].end=v;return}return}}));m.forEach((l=>{if(l.start===null){return}const m=v.nodes.slice(l.start,l.end+1);if(m.length!==3){return}const y=m.filter(evenValues).map((l=>l.value.toLowerCase())).toString();const w=_.get(y);if(w){m[0].value=w;m[1].value=m[2].value=""}}));return v.toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-repeat-style",prepare(){const l=new Map;return{OnceExit(v){v.walkDecls(/^(background(-repeat)?|(-\w+-)?mask-repeat)$/i,(v=>{const m=v.value;if(!m){return}if(l.has(m)){v.value=l.get(m);return}const y=transform(m);v.value=y;l.set(m,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},1752:l=>{"use strict";l.exports=new Map([[["repeat","no-repeat"].toString(),"repeat-x"],[["no-repeat","repeat"].toString(),"repeat-y"],[["repeat","repeat"].toString(),"repeat"],[["space","space"].toString(),"space"],[["round","round"].toString(),"round"],[["no-repeat","no-repeat"].toString(),"no-repeat"]])},625:(l,v,m)=>{"use strict";const y=m(9285);const _="'".charCodeAt(0);const w='"'.charCodeAt(0);const k="\\".charCodeAt(0);const S="\n".charCodeAt(0);const E=" ".charCodeAt(0);const C="\f".charCodeAt(0);const O="\t".charCodeAt(0);const P="\r".charCodeAt(0);const L=/[ \n\t\r\f'"\\]/g;const T="string";const A="escapedSingleQuote";const R="escapedDoubleQuote";const D="singleQuote";const q="doubleQuote";const F="newline";const $="single";const V=`'`;const B=`"`;const z=`\\\n`;const U={type:A,value:`\\'`};const W={type:R,value:`\\"`};const Q={type:D,value:V};const G={type:q,value:B};const Y={type:F,value:z};function stringify(l){return l.nodes.reduce(((l,{value:v})=>{if(v===z){return l}return l+v}),"")}function parse(l){let v,m,y;let F=0;let $=l.length;const V={nodes:[],types:{escapedSingleQuote:0,escapedDoubleQuote:0,singleQuote:0,doubleQuote:0},quotes:false};while(F<$){v=l.charCodeAt(F);switch(v){case E:case O:case P:case C:m=F;do{m+=1;v=l.charCodeAt(m)}while(v===E||v===S||v===O||v===P||v===C);V.nodes.push({type:"space",value:l.slice(F,m)});F=m-1;break;case _:V.nodes.push(Q);V.types[D]++;V.quotes=true;break;case w:V.nodes.push(G);V.types[q]++;V.quotes=true;break;case k:m=F+1;if(l.charCodeAt(m)===_){V.nodes.push(U);V.types[A]++;V.quotes=true;F=m;break}else if(l.charCodeAt(m)===w){V.nodes.push(W);V.types[R]++;V.quotes=true;F=m;break}else if(l.charCodeAt(m)===S){V.nodes.push(Y);F=m;break}default:L.lastIndex=F+1;L.test(l);if(L.lastIndex===0){m=$-1}else{m=L.lastIndex-2}y=l.slice(F,m+1);V.nodes.push({type:T,value:y});F=m}F++}return V}function changeWrappingQuotes(l,v){const{types:m}=v;if(m[D]||m[q]){return}if(l.quote===V&&m[A]>0&&!m[R]){l.quote=B}if(l.quote===B&&m[R]>0&&!m[A]){l.quote=V}v.nodes=changeChildQuotes(v.nodes,l.quote)}function changeChildQuotes(l,v){const m=[];for(const y of l){if(y.type===R&&v===V){m.push(G)}else if(y.type===A&&v===B){m.push(Q)}else{m.push(y)}}return m}function normalize(l,v){if(!l||!l.length){return l}return y(l).walk((l=>{if(l.type!==T){return}const m=parse(l.value);if(m.quotes){changeWrappingQuotes(l,m)}else if(v===$){l.quote=V}else{l.quote=B}l.value=stringify(m)})).toString()}function minify(l,v,m){const y=l+"|"+m;if(v.has(y)){return v.get(y)}const _=normalize(l,m);v.set(y,_);return _}function pluginCreator(l){const{preferredQuote:v}=Object.assign({},{preferredQuote:"double"},l);return{postcssPlugin:"postcss-normalize-string",OnceExit(l){const m=new Map;l.walk((l=>{switch(l.type){case"rule":l.selector=minify(l.selector,m,v);break;case"decl":l.value=minify(l.value,m,v);break;case"atrule":l.params=minify(l.params,m,v);break}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},1347:(l,v,m)=>{"use strict";const y=m(9285);const getValue=l=>parseFloat(l.value);const _=new Map([[[.25,.1,.25,1].toString(),"ease"],[[0,0,1,1].toString(),"linear"],[[.42,0,1,1].toString(),"ease-in"],[[0,0,.58,1].toString(),"ease-out"],[[.42,0,.58,1].toString(),"ease-in-out"]]);function reduce(l){if(l.type!=="function"){return false}if(!l.value){return}const v=l.value.toLowerCase();if(v==="steps"){if(l.nodes[0].type==="word"&&getValue(l.nodes[0])===1&&l.nodes[2]&&l.nodes[2].type==="word"&&(l.nodes[2].value.toLowerCase()==="start"||l.nodes[2].value.toLowerCase()==="jump-start")){l.type="word";l.value="step-start";delete l.nodes;return}if(l.nodes[0].type==="word"&&getValue(l.nodes[0])===1&&l.nodes[2]&&l.nodes[2].type==="word"&&(l.nodes[2].value.toLowerCase()==="end"||l.nodes[2].value.toLowerCase()==="jump-end")){l.type="word";l.value="step-end";delete l.nodes;return}if(l.nodes[2]&&l.nodes[2].type==="word"&&(l.nodes[2].value.toLowerCase()==="end"||l.nodes[2].value.toLowerCase()==="jump-end")){l.nodes=[l.nodes[0]];return}return false}if(v==="cubic-bezier"){const v=l.nodes.filter(((l,v)=>v%2===0)).map(getValue);if(v.length!==4){return}const m=_.get(v.toString());if(m){l.type="word";l.value=m;delete l.nodes;return}}}function transform(l){return y(l).walk(reduce).toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-timing-functions",OnceExit(l){const v=new Map;l.walkDecls(/^(-\w+-)?(animation|transition)(-timing-function)?$/i,(l=>{const m=l.value;if(v.has(m)){l.value=v.get(m);return}const y=transform(m);l.value=y;v.set(m,y)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},5187:(l,v,m)=>{"use strict";const y=m(5478);const _=m(9285);const w=/^u(?=\+)/;function unicode(l){const v=l.slice(2).split("-");if(v.length<2){return l}const m=v[0].split("");const y=v[1].split("");if(m.length!==y.length){return l}const _=mergeRangeBounds(m,y);if(_){return _}return l}function mergeRangeBounds(l,v){let m=0;let y="u+";for(const[_,w]of l.entries()){if(w===v[_]&&m===0){y=y+w}else if(w==="0"&&v[_]==="f"){m++;y=y+"?"}else{return false}}if(m<6){return y}else{return false}}function hasLowerCaseUPrefixBug(l){return y("ie <=11, edge <= 15").includes(l)}function transform(l,v=false){return _(l).walk((l=>{if(l.type==="unicode-range"){const m=unicode(l.value.toLowerCase());l.value=v?m.replace(w,"U"):m}return false})).toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-unicode",prepare(l){const v=new Map;const m=l.opts||{};const _=y(null,{stats:m.stats,path:__dirname,env:m.env});const w=_.some(hasLowerCaseUPrefixBug);return{OnceExit(l){l.walkDecls(/^unicode-range$/i,(l=>{const m=l.value;if(v.has(m)){l.value=v.get(m);return}const y=transform(m,w);l.value=y;v.set(m,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},6680:(l,v,m)=>{"use strict";const y=m(5622);const _=m(9285);const w=m(499);const k=/\\[\r\n]/;const S=/([\s\(\)"'])/g;const E=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/;const C=/^[a-zA-Z]:\\/;function isAbsolute(l){if(C.test(l)){return false}return E.test(l)}function convert(l,v){if(isAbsolute(l)||l.startsWith("//")){let m;try{m=w(l,v)}catch(v){m=l}return m}return y.normalize(l).replace(new RegExp("\\"+y.sep,"g"),"/")}function transformNamespace(l){l.params=_(l.params).walk((l=>{if(l.type==="function"&&l.value.toLowerCase()==="url"&&l.nodes.length){l.type="string";l.quote=l.nodes[0].type==="string"?l.nodes[0].quote:'"';l.value=l.nodes[0].value}if(l.type==="string"){l.value=l.value.trim()}return false})).toString()}function transformDecl(l,v){l.value=_(l.value).walk((l=>{if(l.type!=="function"||l.value.toLowerCase()!=="url"){return false}l.before=l.after="";if(!l.nodes.length){return false}let m=l.nodes[0];let y;m.value=m.value.trim().replace(k,"");if(m.value.length===0){m.quote="";return false}if(/^data:(.*)?,/i.test(m.value)){return false}if(!/^.+-extension:\//i.test(m.value)){m.value=convert(m.value,v)}if(S.test(m.value)&&m.type==="string"){y=m.value.replace(S,"\\$1");if(y.length{if(v.type==="decl"){return transformDecl(v,l)}else if(v.type==="atrule"&&v.name.toLowerCase()==="namespace"){return transformNamespace(v)}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},9585:(l,v,m)=>{"use strict";const y=m(9285);const _="atrule";const w="decl";const k="rule";const S=new Set(["var","env","constant"]);function reduceCalcWhitespaces(l){if(l.type==="space"){l.value=" "}else if(l.type==="function"){if(!S.has(l.value.toLowerCase())){l.before=l.after=""}}}function reduceWhitespaces(l){if(l.type==="space"){l.value=" "}else if(l.type==="div"){l.before=l.after=""}else if(l.type==="function"){if(!S.has(l.value.toLowerCase())){l.before=l.after=""}if(l.value.toLowerCase()==="calc"){y.walk(l.nodes,reduceCalcWhitespaces);return false}}}function pluginCreator(){return{postcssPlugin:"postcss-normalize-whitespace",OnceExit(l){const v=new Map;l.walk((l=>{const{type:m}=l;if([w,k,_].includes(m)&&l.raws.before){l.raws.before=l.raws.before.replace(/\s/g,"")}if(m===w){if(l.important){l.raws.important="!important"}l.value=l.value.replace(/\s*(\\9)\s*/,"$1");const m=l.value;if(v.has(m)){l.value=v.get(m)}else{const _=y(l.value);const w=_.walk(reduceWhitespaces).toString();l.value=w;v.set(m,w)}if(l.prop.startsWith("--")&&l.value===""){l.value=" "}if(l.raws.before){const v=l.prev();if(v&&v.type!==k){l.raws.before=l.raws.before.replace(/;/g,"")}}l.raws.between=":";l.raws.semicolon=false}else if(m===k||m===_){l.raws.between=l.raws.after="";l.raws.semicolon=false}}));l.raws.after=""}}}pluginCreator.postcss=true;l.exports=pluginCreator},6691:(l,v,m)=>{"use strict";const y=m(9285);const{normalizeGridAutoFlow:_,normalizeGridColumnRowGap:w,normalizeGridColumnRow:k}=m(2583);const S=m(4342);const E=m(2023);const C=m(3738);const O=m(3542);const P=m(1407);const L=m(9986);const T=m(1785);const A=m(3688);const R=[["border",E],["border-block",E],["border-inline",E],["border-block-end",E],["border-block-start",E],["border-inline-end",E],["border-inline-start",E],["border-top",E],["border-right",E],["border-bottom",E],["border-left",E]];const D=[["grid-auto-flow",_],["grid-column-gap",w],["grid-row-gap",w],["grid-column",k],["grid-row",k],["grid-row-start",k],["grid-row-end",k],["grid-column-start",k],["grid-column-end",k]];const q=[["column-rule",E],["columns",T]];const F=new Map([["animation",S],["outline",E],["box-shadow",C],["flex-flow",O],["list-style",L],["transition",P],...R,...D,...q]);function isVariableFunctionNode(l){if(l.type!=="function"){return false}return["var","env"].includes(l.value.toLowerCase())}function shouldAbort(l){let v=false;l.walk((l=>{if(l.type==="comment"||isVariableFunctionNode(l)||l.type==="word"&&l.value.includes(`___CSS_LOADER_IMPORT___`)){v=true;return false}}));return v}function getValue(l){let{value:v,raws:m}=l;if(m&&m.value&&m.value.raw){v=m.value.raw}return v}function pluginCreator(){return{postcssPlugin:"postcss-ordered-values",prepare(){const l=new Map;return{OnceExit(v){v.walkDecls((v=>{const m=v.prop.toLowerCase();const _=A(m);const w=F.get(_);if(!w){return}const k=getValue(v);if(l.has(k)){v.value=l.get(k);return}const S=y(k);if(S.nodes.length<2||shouldAbort(S)){l.set(k,k);return}const E=w(S);v.value=E.toString();l.set(k,E.toString())}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},8585:l=>{"use strict";l.exports=function addSpace(){return{type:"space",value:" "}}},8002:(l,v,m)=>{"use strict";const{stringify:y}=m(9285);l.exports=function getValue(l){return y(flatten(l))};function flatten(l){const v=[];for(const[m,y]of l.entries()){y.forEach(((_,w)=>{if(w===y.length-1&&m===l.length-1&&_.type==="space"){return}v.push(_)}));if(m!==l.length-1){v[v.length-1].type="div";v[v.length-1].value=","}}return v}},3478:l=>{"use strict";l.exports=function joinGridVal(l){return l.join(" / ").trim()}},5114:l=>{"use strict";l.exports=new Set(["calc","clamp","max","min"])},3688:l=>{"use strict";function vendorUnprefixed(l){return l.replace(/^-\w+-/,"")}l.exports=vendorUnprefixed},4342:(l,v,m)=>{"use strict";const{unit:y}=m(9285);const{getArguments:_}=m(506);const w=m(8585);const k=m(8002);const S=new Set(["steps","cubic-bezier","frames"]);const E=new Set(["ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start"]);const C=new Set(["normal","reverse","alternate","alternate-reverse"]);const O=new Set(["none","forwards","backwards","both"]);const P=new Set(["running","paused"]);const L=new Set(["ms","s"]);const isTimingFunction=(l,v)=>v==="function"&&S.has(l)||E.has(l);const isDirection=l=>C.has(l);const isFillMode=l=>O.has(l);const isPlayState=l=>P.has(l);const isTime=l=>{const v=y(l);return v&&L.has(v.unit)};const isIterationCount=l=>{const v=y(l);return l==="infinite"||v&&!v.unit};const T=[{property:"duration",delegate:isTime},{property:"timingFunction",delegate:isTimingFunction},{property:"delay",delegate:isTime},{property:"iterationCount",delegate:isIterationCount},{property:"direction",delegate:isDirection},{property:"fillMode",delegate:isFillMode},{property:"playState",delegate:isPlayState}];function normalize(l){const v=[];for(const m of l){const l={name:[],duration:[],timingFunction:[],delay:[],iterationCount:[],direction:[],fillMode:[],playState:[]};m.forEach((v=>{let{type:m,value:y}=v;if(m==="space"){return}y=y.toLowerCase();const _=T.some((({property:_,delegate:k})=>{if(k(y,m)&&!l[_].length){l[_]=[v,w()];return true}}));if(!_){l.name=[...l.name,v,w()]}}));v.push([...l.name,...l.duration,...l.timingFunction,...l.delay,...l.iterationCount,...l.direction,...l.fillMode,...l.playState])}return v}l.exports=function normalizeAnimation(l){const v=normalize(_(l));return k(v)}},2023:(l,v,m)=>{"use strict";const{unit:y,stringify:_}=m(9285);const w=m(5114);const k=new Set(["thin","medium","thick"]);const S=new Set(["none","auto","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"]);l.exports=function normalizeBorder(l){const v={width:"",style:"",color:""};l.walk((l=>{const{type:m,value:E}=l;if(m==="word"){if(S.has(E.toLowerCase())){v.style=E;return false}if(k.has(E.toLowerCase())||y(E.toLowerCase())){if(v.width!==""){v.width=`${v.width} ${E}`;return false}v.width=E;return false}v.color=E;return false}if(m==="function"){if(w.has(E.toLowerCase())){v.width=_(l)}else{v.color=_(l)}return false}}));return`${v.width} ${v.style} ${v.color}`.trim()}},3738:(l,v,m)=>{"use strict";const{unit:y}=m(9285);const{getArguments:_}=m(506);const w=m(8585);const k=m(8002);const S=m(5114);const E=m(3688);l.exports=function normalizeBoxShadow(l){let v=_(l);const m=normalize(v);if(m===false){return l.toString()}return k(m)};function normalize(l){const v=[];let m=false;for(const _ of l){let l=[];let k={inset:[],color:[]};_.forEach((v=>{const{type:_,value:C}=v;if(_==="function"&&S.has(E(C.toLowerCase()))){m=true;return}if(_==="space"){return}if(y(C)){l=[...l,v,w()]}else if(C.toLowerCase()==="inset"){k.inset=[...k.inset,v,w()]}else{k.color=[...k.color,v,w()]}}));if(m){return false}v.push([...k.inset,...l,...k.color])}return v}},1785:(l,v,m)=>{"use strict";const{unit:y}=m(9285);function hasUnit(l){const v=y(l);return v&&v.unit!==""}l.exports=l=>{const v=[];const m=[];l.walk((l=>{const{type:y,value:_}=l;if(y==="word"){if(hasUnit(_)){v.push(_)}else{m.push(_)}}}));if(m.length===1&&v.length===1){return`${v[0].trimStart()} ${m[0].trimStart()}`}return l}},3542:l=>{"use strict";const v=new Set(["row","row-reverse","column","column-reverse"]);const m=new Set(["nowrap","wrap","wrap-reverse"]);l.exports=function normalizeFlexFlow(l){let y={direction:"",wrap:""};l.walk((({value:l})=>{if(v.has(l.toLowerCase())){y.direction=l;return}if(m.has(l.toLowerCase())){y.wrap=l;return}}));return`${y.direction} ${y.wrap}`.trim()}},2583:(l,v,m)=>{"use strict";const y=m(3478);const normalizeGridAutoFlow=l=>{let v={front:"",back:""};let m=false;l.walk((l=>{if(l.value==="dense"){m=true;v.back=l.value}else if(["row","column"].includes(l.value.trim().toLowerCase())){m=true;v.front=l.value}else{m=false}}));if(m){return`${v.front.trim()} ${v.back.trim()}`}return l};const normalizeGridColumnRowGap=l=>{let v={front:"",back:""};let m=false;l.walk((l=>{if(l.value==="normal"){m=true;v.front=l.value}else{v.back=`${v.back} ${l.value}`}}));if(m){return`${v.front.trim()} ${v.back.trim()}`}return l};const normalizeGridColumnRow=l=>{let v=l.toString().split("/");if(v.length>1){return y(v.map((l=>{let v={front:"",back:""};l=l.trim();l.split(" ").forEach((l=>{if(l==="span"){v.front=l}else{v.back=`${v.back} ${l}`}}));return`${v.front.trim()} ${v.back.trim()}`})))}return v.map((l=>{let v={front:"",back:""};l=l.trim();l.split(" ").forEach((l=>{if(l==="span"){v.front=l}else{v.back=`${v.back} ${l}`}}));return`${v.front.trim()} ${v.back.trim()}`}))};l.exports={normalizeGridAutoFlow:normalizeGridAutoFlow,normalizeGridColumnRowGap:normalizeGridColumnRowGap,normalizeGridColumnRow:normalizeGridColumnRow}},9986:(l,v,m)=>{"use strict";const y=m(9285);const _=m(8360);const w=new Set(_["list-style-type"]);const k=new Set(["inside","outside"]);l.exports=function listStyleNormalizer(l){const v={type:"",position:"",image:""};l.walk((l=>{if(l.type==="word"){if(w.has(l.value)){v.type=`${v.type} ${l.value}`}else if(k.has(l.value)){v.position=`${v.position} ${l.value}`}else if(l.value==="none"){if(v.type.split(" ").filter((l=>l!==""&&l!==" ")).includes("none")){v.image=`${v.image} ${l.value}`}else{v.type=`${v.type} ${l.value}`}}else{v.type=`${v.type} ${l.value}`}}if(l.type==="function"){v.image=`${v.image} ${y.stringify(l)}`}}));return`${v.type.trim()} ${v.position.trim()} ${v.image.trim()}`.trim()}},1407:(l,v,m)=>{"use strict";const{unit:y}=m(9285);const{getArguments:_}=m(506);const w=m(8585);const k=m(8002);const S=new Set(["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"]);function normalize(l){const v=[];for(const m of l){let l={timingFunction:[],property:[],time1:[],time2:[]};m.forEach((v=>{const{type:m,value:_}=v;if(m==="space"){return}if(m==="function"&&new Set(["steps","cubic-bezier"]).has(_.toLowerCase())){l.timingFunction=[...l.timingFunction,v,w()]}else if(y(_)){if(!l.time1.length){l.time1=[...l.time1,v,w()]}else{l.time2=[...l.time2,v,w()]}}else if(S.has(_.toLowerCase())){l.timingFunction=[...l.timingFunction,v,w()]}else{l.property=[...l.property,v,w()]}}));v.push([...l.property,...l.time1,...l.timingFunction,...l.time2])}return v}l.exports=function normalizeTransition(l){const v=normalize(_(l));return k(v)}},9549:(l,v,m)=>{"use strict";const y=m(5478);const{isSupported:_}=m(8390);const w=m(173);const k=m(7433);const S="initial";const E=["writing-mode","transform-box"];function pluginCreator(){return{postcssPlugin:"postcss-reduce-initial",prepare(l){const v=l.opts||{};const m=y(null,{stats:v.stats,path:__dirname,env:v.env});const C=_("css-initial-value",m);return{OnceExit(l){l.walkDecls((l=>{const m=l.prop.toLowerCase();const y=new Set(E.concat(v.ignore||[]));if(y.has(m)){return}if(C&&Object.prototype.hasOwnProperty.call(k,m)&&l.value.toLowerCase()===k[m]){l.value=S;return}if(l.value.toLowerCase()!==S||!w[m]){return}l.value=w[m]}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},8936:(l,v,m)=>{"use strict";const y=m(9285);function getValues(l,v,m){if(m%2===0){let m=NaN;if(v.type==="function"&&(v.value==="var"||v.value==="env")&&v.nodes.length===1){m=y.stringify(v.nodes)}else if(v.type==="word"){m=parseFloat(v.value)}return[...l,m]}return l}function matrix3d(l,v){if(v.length!==16){return}if(v[15]&&v[2]===0&&v[3]===0&&v[6]===0&&v[7]===0&&v[8]===0&&v[9]===0&&v[10]===1&&v[11]===0&&v[14]===0&&v[15]===1){const{nodes:v}=l;l.value="matrix";l.nodes=[v[0],v[1],v[2],v[3],v[8],v[9],v[10],v[11],v[24],v[25],v[26]]}}const _=new Map([[[1,0,0].toString(),"rotateX"],[[0,1,0].toString(),"rotateY"],[[0,0,1].toString(),"rotate"]]);function rotate3d(l,v){if(v.length!==4){return}const{nodes:m}=l;const y=_.get(v.slice(0,3).toString());if(y){l.value=y;l.nodes=[m[6]]}}function rotateZ(l,v){if(v.length!==1){return}l.value="rotate"}function scale(l,v){if(v.length!==2){return}const{nodes:m}=l;const[y,_]=v;if(y===_){l.nodes=[m[0]];return}if(_===1){l.value="scaleX";l.nodes=[m[0]];return}if(y===1){l.value="scaleY";l.nodes=[m[2]];return}}function scale3d(l,v){if(v.length!==3){return}const{nodes:m}=l;const[y,_,w]=v;if(_===1&&w===1){l.value="scaleX";l.nodes=[m[0]];return}if(y===1&&w===1){l.value="scaleY";l.nodes=[m[2]];return}if(y===1&&_===1){l.value="scaleZ";l.nodes=[m[4]];return}}function translate(l,v){if(v.length!==2){return}const{nodes:m}=l;if(v[1]===0){l.nodes=[m[0]];return}if(v[0]===0){l.value="translateY";l.nodes=[m[2]];return}}function translate3d(l,v){if(v.length!==3){return}const{nodes:m}=l;if(v[0]===0&&v[1]===0){l.value="translateZ";l.nodes=[m[4]]}}const w=new Map([["matrix3d",matrix3d],["rotate3d",rotate3d],["rotateZ",rotateZ],["scale",scale],["scale3d",scale3d],["translate",translate],["translate3d",translate3d]]);function normalizeReducerName(l){const v=l.toLowerCase();if(v==="rotatez"){return"rotateZ"}return v}function reduce(l){if(l.type==="function"){const v=normalizeReducerName(l.value);const m=w.get(v);if(m!==undefined){m(l,l.nodes.reduce(getValues,[]))}}return false}function pluginCreator(){return{postcssPlugin:"postcss-reduce-transforms",prepare(){const l=new Map;return{OnceExit(v){v.walkDecls(/transform$/i,(v=>{const m=v.value;if(!m){return}if(l.has(m)){v.value=l.get(m);return}const _=y(m).walk(reduce).toString();v.value=_;l.set(m,_)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},2997:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(390));var _=_interopRequireWildcard(m(1483));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var v=_getRequireWildcardCache();if(v&&v.has(l)){return v.get(l)}var m={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in l){if(Object.prototype.hasOwnProperty.call(l,_)){var w=y?Object.getOwnPropertyDescriptor(l,_):null;if(w&&(w.get||w.set)){Object.defineProperty(m,_,w)}else{m[_]=l[_]}}}m["default"]=l;if(v){v.set(l,m)}return m}function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var w=function parser(l){return new y["default"](l)};Object.assign(w,_);delete w.__esModule;var k=w;v.default=k;l.exports=v.default},8526:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(4804));var _=_interopRequireDefault(m(7370));var w=_interopRequireDefault(m(9780));var k=_interopRequireDefault(m(974));var S=_interopRequireDefault(m(2050));var E=_interopRequireDefault(m(9646));var C=_interopRequireDefault(m(2391));var O=_interopRequireDefault(m(8681));var P=_interopRequireWildcard(m(326));var L=_interopRequireDefault(m(4843));var T=_interopRequireDefault(m(8765));var A=_interopRequireDefault(m(2821));var R=_interopRequireDefault(m(8520));var D=_interopRequireWildcard(m(3370));var q=_interopRequireWildcard(m(6684));var F=_interopRequireWildcard(m(6895));var $=m(3621);var V,B;function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var v=_getRequireWildcardCache();if(v&&v.has(l)){return v.get(l)}var m={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in l){if(Object.prototype.hasOwnProperty.call(l,_)){var w=y?Object.getOwnPropertyDescriptor(l,_):null;if(w&&(w.get||w.set)){Object.defineProperty(m,_,w)}else{m[_]=l[_]}}}m["default"]=l;if(v){v.set(l,m)}return m}function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,v){for(var m=0;m0){var y=this.current.last;if(y){var _=this.convertWhitespaceNodesToSpace(m),w=_.space,k=_.rawSpace;if(k!==undefined){y.rawSpaceAfter+=k}y.spaces.after+=w}else{m.forEach((function(v){return l.newNode(v)}))}}return}var S=this.currToken;var E=undefined;if(v>this.position){E=this.parseWhitespaceEquivalentTokens(v)}var C;if(this.isNamedCombinator()){C=this.namedCombinator()}else if(this.currToken[D.FIELDS.TYPE]===q.combinator){C=new T["default"]({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[D.FIELDS.START_POS]});this.position++}else if(z[this.currToken[D.FIELDS.TYPE]]){}else if(!E){this.unexpected()}if(C){if(E){var O=this.convertWhitespaceNodesToSpace(E),P=O.space,L=O.rawSpace;C.spaces.before=P;C.rawSpaceBefore=L}}else{var A=this.convertWhitespaceNodesToSpace(E,true),R=A.space,F=A.rawSpace;if(!F){F=R}var $={};var V={spaces:{}};if(R.endsWith(" ")&&F.endsWith(" ")){$.before=R.slice(0,R.length-1);V.spaces.before=F.slice(0,F.length-1)}else if(R.startsWith(" ")&&F.startsWith(" ")){$.after=R.slice(1);V.spaces.after=F.slice(1)}else{V.value=F}C=new T["default"]({value:" ",source:getTokenSourceSpan(S,this.tokens[this.position-1]),sourceIndex:S[D.FIELDS.START_POS],spaces:$,raws:V})}if(this.currToken&&this.currToken[D.FIELDS.TYPE]===q.space){C.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(C)};l.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var l=new _["default"]({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(l);this.current=l;this.position++};l.comment=function comment(){var l=this.currToken;this.newNode(new k["default"]({value:this.content(),source:getTokenSource(l),sourceIndex:l[D.FIELDS.START_POS]}));this.position++};l.error=function error(l,v){throw this.root.error(l,v)};l.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[D.FIELDS.START_POS]})};l.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[D.FIELDS.START_POS])};l.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[D.FIELDS.START_POS])};l.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[D.FIELDS.START_POS])};l.namespace=function namespace(){var l=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[D.FIELDS.TYPE]===q.word){this.position++;return this.word(l)}else if(this.nextToken[D.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(l)}};l.nesting=function nesting(){if(this.nextToken){var l=this.content(this.nextToken);if(l==="|"){this.position++;return}}var v=this.currToken;this.newNode(new A["default"]({value:this.content(),source:getTokenSource(v),sourceIndex:v[D.FIELDS.START_POS]}));this.position++};l.parentheses=function parentheses(){var l=this.current.last;var v=1;this.position++;if(l&&l.type===F.PSEUDO){var m=new _["default"]({source:{start:tokenStart(this.tokens[this.position-1])}});var y=this.current;l.append(m);this.current=m;while(this.position1&&l.nextToken&&l.nextToken[D.FIELDS.TYPE]===q.openParenthesis){l.error("Misplaced parenthesis.",{index:l.nextToken[D.FIELDS.START_POS]})}}))}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[D.FIELDS.START_POS])}};l.space=function space(){var l=this.content();if(this.position===0||this.prevToken[D.FIELDS.TYPE]===q.comma||this.prevToken[D.FIELDS.TYPE]===q.openParenthesis||this.current.nodes.every((function(l){return l.type==="comment"}))){this.spaces=this.optionalSpace(l);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[D.FIELDS.TYPE]===q.comma||this.nextToken[D.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(l);this.position++}else{this.combinator()}};l.string=function string(){var l=this.currToken;this.newNode(new C["default"]({value:this.content(),source:getTokenSource(l),sourceIndex:l[D.FIELDS.START_POS]}));this.position++};l.universal=function universal(l){var v=this.nextToken;if(v&&this.content(v)==="|"){this.position++;return this.namespace()}var m=this.currToken;this.newNode(new L["default"]({value:this.content(),source:getTokenSource(m),sourceIndex:m[D.FIELDS.START_POS]}),l);this.position++};l.splitWord=function splitWord(l,v){var m=this;var y=this.nextToken;var _=this.content();while(y&&~[q.dollar,q.caret,q.equals,q.word].indexOf(y[D.FIELDS.TYPE])){this.position++;var k=this.content();_+=k;if(k.lastIndexOf("\\")===k.length-1){var C=this.nextToken;if(C&&C[D.FIELDS.TYPE]===q.space){_+=this.requiredSpace(this.content(C));this.position++}}y=this.nextToken}var O=indexesOf(_,".").filter((function(l){var v=_[l-1]==="\\";var m=/^\d+\.\d+%$/.test(_);return!v&&!m}));var P=indexesOf(_,"#").filter((function(l){return _[l-1]!=="\\"}));var L=indexesOf(_,"#{");if(L.length){P=P.filter((function(l){return!~L.indexOf(l)}))}var T=(0,R["default"])(uniqs([0].concat(O,P)));T.forEach((function(y,k){var C=T[k+1]||_.length;var L=_.slice(y,C);if(k===0&&v){return v.call(m,L,T.length)}var A;var R=m.currToken;var q=R[D.FIELDS.START_POS]+T[k];var F=getSource(R[1],R[2]+y,R[3],R[2]+(C-1));if(~O.indexOf(y)){var $={value:L.slice(1),source:F,sourceIndex:q};A=new w["default"](unescapeProp($,"value"))}else if(~P.indexOf(y)){var V={value:L.slice(1),source:F,sourceIndex:q};A=new S["default"](unescapeProp(V,"value"))}else{var B={value:L,source:F,sourceIndex:q};unescapeProp(B,"value");A=new E["default"](B)}m.newNode(A,l);l=null}));this.position++};l.word=function word(l){var v=this.nextToken;if(v&&this.content(v)==="|"){this.position++;return this.namespace()}return this.splitWord(l)};l.loop=function loop(){while(this.position{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(8526));function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var _=function(){function Processor(l,v){this.func=l||function noop(){};this.funcRes=null;this.options=v}var l=Processor.prototype;l._shouldUpdateSelector=function _shouldUpdateSelector(l,v){if(v===void 0){v={}}var m=Object.assign({},this.options,v);if(m.updateSelector===false){return false}else{return typeof l!=="string"}};l._isLossy=function _isLossy(l){if(l===void 0){l={}}var v=Object.assign({},this.options,l);if(v.lossless===false){return true}else{return false}};l._root=function _root(l,v){if(v===void 0){v={}}var m=new y["default"](l,this._parseOptions(v));return m.root};l._parseOptions=function _parseOptions(l){return{lossy:this._isLossy(l)}};l._run=function _run(l,v){var m=this;if(v===void 0){v={}}return new Promise((function(y,_){try{var w=m._root(l,v);Promise.resolve(m.func(w)).then((function(y){var _=undefined;if(m._shouldUpdateSelector(l,v)){_=w.toString();l.selector=_}return{transform:y,root:w,string:_}})).then(y,_)}catch(l){_(l);return}}))};l._runSync=function _runSync(l,v){if(v===void 0){v={}}var m=this._root(l,v);var y=this.func(m);if(y&&typeof y.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var _=undefined;if(v.updateSelector&&typeof l!=="string"){_=m.toString();l.selector=_}return{transform:y,root:m,string:_}};l.ast=function ast(l,v){return this._run(l,v).then((function(l){return l.root}))};l.astSync=function astSync(l,v){return this._runSync(l,v).root};l.transform=function transform(l,v){return this._run(l,v).then((function(l){return l.transform}))};l.transformSync=function transformSync(l,v){return this._runSync(l,v).transform};l.process=function process(l,v){return this._run(l,v).then((function(l){return l.string||l.root.toString()}))};l.processSync=function processSync(l,v){var m=this._runSync(l,v);return m.string||m.root.toString()};return Processor}();v.default=_;l.exports=v.default},326:(l,v,m)=>{"use strict";v.__esModule=true;v.unescapeValue=unescapeValue;v.default=void 0;var y=_interopRequireDefault(m(3120));var _=_interopRequireDefault(m(2897));var w=_interopRequireDefault(m(5669));var k=m(6895);var S;function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,v){for(var m=0;m0&&!l.quoted&&m.before.length===0&&!(l.spaces.value&&l.spaces.value.after)){m.before=" "}return defaultAttrConcat(v,m)})))}v.push("]");v.push(this.rawSpaceAfter);return v.join("")};_createClass(Attribute,[{key:"quoted",get:function get(){var l=this.quoteMark;return l==="'"||l==='"'},set:function set(l){P()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(l){if(!this._constructed){this._quoteMark=l;return}if(this._quoteMark!==l){this._quoteMark=l;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(l){if(this._constructed){var v=unescapeValue(l),m=v.deprecatedUsage,y=v.unescaped,_=v.quoteMark;if(m){O()}if(y===this._value&&_===this._quoteMark){return}this._value=y;this._quoteMark=_;this._syncRawValue()}else{this._value=l}}},{key:"attribute",get:function get(){return this._attribute},set:function set(l){this._handleEscapes("attribute",l);this._attribute=l}}]);return Attribute}(w["default"]);v.default=T;T.NO_QUOTE=null;T.SINGLE_QUOTE="'";T.DOUBLE_QUOTE='"';var A=(S={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},S[null]={isIdentifier:true},S);function defaultAttrConcat(l,v){return""+v.before+l+v.after}},9780:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3120));var _=m(3621);var w=_interopRequireDefault(m(3206));var k=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,v){for(var m=0;m{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3206));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Combinator,l);function Combinator(v){var m;m=l.call(this,v)||this;m.type=_.COMBINATOR;return m}return Combinator}(y["default"]);v.default=w;l.exports=v.default},974:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3206));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Comment,l);function Comment(v){var m;m=l.call(this,v)||this;m.type=_.COMMENT;return m}return Comment}(y["default"]);v.default=w;l.exports=v.default},5850:(l,v,m)=>{"use strict";v.__esModule=true;v.universal=v.tag=v.string=v.selector=v.root=v.pseudo=v.nesting=v.id=v.comment=v.combinator=v.className=v.attribute=void 0;var y=_interopRequireDefault(m(326));var _=_interopRequireDefault(m(9780));var w=_interopRequireDefault(m(8765));var k=_interopRequireDefault(m(974));var S=_interopRequireDefault(m(2050));var E=_interopRequireDefault(m(2821));var C=_interopRequireDefault(m(8681));var O=_interopRequireDefault(m(4804));var P=_interopRequireDefault(m(7370));var L=_interopRequireDefault(m(2391));var T=_interopRequireDefault(m(9646));var A=_interopRequireDefault(m(4843));function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var R=function attribute(l){return new y["default"](l)};v.attribute=R;var D=function className(l){return new _["default"](l)};v.className=D;var q=function combinator(l){return new w["default"](l)};v.combinator=q;var F=function comment(l){return new k["default"](l)};v.comment=F;var $=function id(l){return new S["default"](l)};v.id=$;var V=function nesting(l){return new E["default"](l)};v.nesting=V;var B=function pseudo(l){return new C["default"](l)};v.pseudo=B;var z=function root(l){return new O["default"](l)};v.root=z;var U=function selector(l){return new P["default"](l)};v.selector=U;var W=function string(l){return new L["default"](l)};v.string=W;var Q=function tag(l){return new T["default"](l)};v.tag=Q;var G=function universal(l){return new A["default"](l)};v.universal=G},7240:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3206));var _=_interopRequireWildcard(m(6895));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var v=_getRequireWildcardCache();if(v&&v.has(l)){return v.get(l)}var m={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in l){if(Object.prototype.hasOwnProperty.call(l,_)){var w=y?Object.getOwnPropertyDescriptor(l,_):null;if(w&&(w.get||w.set)){Object.defineProperty(m,_,w)}else{m[_]=l[_]}}}m["default"]=l;if(v){v.set(l,m)}return m}function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _createForOfIteratorHelperLoose(l,v){var m;if(typeof Symbol==="undefined"||l[Symbol.iterator]==null){if(Array.isArray(l)||(m=_unsupportedIterableToArray(l))||v&&l&&typeof l.length==="number"){if(m)l=m;var y=0;return function(){if(y>=l.length)return{done:true};return{done:false,value:l[y++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}m=l[Symbol.iterator]();return m.next.bind(m)}function _unsupportedIterableToArray(l,v){if(!l)return;if(typeof l==="string")return _arrayLikeToArray(l,v);var m=Object.prototype.toString.call(l).slice(8,-1);if(m==="Object"&&l.constructor)m=l.constructor.name;if(m==="Map"||m==="Set")return Array.from(l);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return _arrayLikeToArray(l,v)}function _arrayLikeToArray(l,v){if(v==null||v>l.length)v=l.length;for(var m=0,y=new Array(v);m=l){this.indexes[m]=v-1}}return this};v.removeAll=function removeAll(){for(var l=_createForOfIteratorHelperLoose(this.nodes),v;!(v=l()).done;){var m=v.value;m.parent=undefined}this.nodes=[];return this};v.empty=function empty(){return this.removeAll()};v.insertAfter=function insertAfter(l,v){v.parent=this;var m=this.index(l);this.nodes.splice(m+1,0,v);v.parent=this;var y;for(var _ in this.indexes){y=this.indexes[_];if(m<=y){this.indexes[_]=y+1}}return this};v.insertBefore=function insertBefore(l,v){v.parent=this;var m=this.index(l);this.nodes.splice(m,0,v);v.parent=this;var y;for(var _ in this.indexes){y=this.indexes[_];if(y<=m){this.indexes[_]=y+1}}return this};v._findChildAtPosition=function _findChildAtPosition(l,v){var m=undefined;this.each((function(y){if(y.atPosition){var _=y.atPosition(l,v);if(_){m=_;return false}}else if(y.isAtPosition(l,v)){m=y;return false}}));return m};v.atPosition=function atPosition(l,v){if(this.isAtPosition(l,v)){return this._findChildAtPosition(l,v)||this}else{return undefined}};v._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};v.each=function each(l){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var v=this.lastEach;this.indexes[v]=0;if(!this.length){return undefined}var m,y;while(this.indexes[v]{"use strict";v.__esModule=true;v.isNode=isNode;v.isPseudoElement=isPseudoElement;v.isPseudoClass=isPseudoClass;v.isContainer=isContainer;v.isNamespace=isNamespace;v.isUniversal=v.isTag=v.isString=v.isSelector=v.isRoot=v.isPseudo=v.isNesting=v.isIdentifier=v.isComment=v.isCombinator=v.isClassName=v.isAttribute=void 0;var y=m(6895);var _;var w=(_={},_[y.ATTRIBUTE]=true,_[y.CLASS]=true,_[y.COMBINATOR]=true,_[y.COMMENT]=true,_[y.ID]=true,_[y.NESTING]=true,_[y.PSEUDO]=true,_[y.ROOT]=true,_[y.SELECTOR]=true,_[y.STRING]=true,_[y.TAG]=true,_[y.UNIVERSAL]=true,_);function isNode(l){return typeof l==="object"&&w[l.type]}function isNodeType(l,v){return isNode(v)&&v.type===l}var k=isNodeType.bind(null,y.ATTRIBUTE);v.isAttribute=k;var S=isNodeType.bind(null,y.CLASS);v.isClassName=S;var E=isNodeType.bind(null,y.COMBINATOR);v.isCombinator=E;var C=isNodeType.bind(null,y.COMMENT);v.isComment=C;var O=isNodeType.bind(null,y.ID);v.isIdentifier=O;var P=isNodeType.bind(null,y.NESTING);v.isNesting=P;var L=isNodeType.bind(null,y.PSEUDO);v.isPseudo=L;var T=isNodeType.bind(null,y.ROOT);v.isRoot=T;var A=isNodeType.bind(null,y.SELECTOR);v.isSelector=A;var R=isNodeType.bind(null,y.STRING);v.isString=R;var D=isNodeType.bind(null,y.TAG);v.isTag=D;var q=isNodeType.bind(null,y.UNIVERSAL);v.isUniversal=q;function isPseudoElement(l){return L(l)&&l.value&&(l.value.startsWith("::")||l.value.toLowerCase()===":before"||l.value.toLowerCase()===":after")}function isPseudoClass(l){return L(l)&&!isPseudoElement(l)}function isContainer(l){return!!(isNode(l)&&l.walk)}function isNamespace(l){return k(l)||D(l)}},2050:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3206));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(ID,l);function ID(v){var m;m=l.call(this,v)||this;m.type=_.ID;return m}var v=ID.prototype;v.valueToString=function valueToString(){return"#"+l.prototype.valueToString.call(this)};return ID}(y["default"]);v.default=w;l.exports=v.default},1483:(l,v,m)=>{"use strict";v.__esModule=true;var y=m(6895);Object.keys(y).forEach((function(l){if(l==="default"||l==="__esModule")return;if(l in v&&v[l]===y[l])return;v[l]=y[l]}));var _=m(5850);Object.keys(_).forEach((function(l){if(l==="default"||l==="__esModule")return;if(l in v&&v[l]===_[l])return;v[l]=_[l]}));var w=m(5873);Object.keys(w).forEach((function(l){if(l==="default"||l==="__esModule")return;if(l in v&&v[l]===w[l])return;v[l]=w[l]}))},5669:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3120));var _=m(3621);var w=_interopRequireDefault(m(3206));function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,v){for(var m=0;m{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3206));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Nesting,l);function Nesting(v){var m;m=l.call(this,v)||this;m.type=_.NESTING;m.value="&";return m}return Nesting}(y["default"]);v.default=w;l.exports=v.default},3206:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=m(3621);function _defineProperties(l,v){for(var m=0;ml){return false}if(this.source.end.linev){return false}if(this.source.end.line===l&&this.source.end.column{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(7240));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Pseudo,l);function Pseudo(v){var m;m=l.call(this,v)||this;m.type=_.PSEUDO;return m}var v=Pseudo.prototype;v.toString=function toString(){var l=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),l,this.rawSpaceAfter].join("")};return Pseudo}(y["default"]);v.default=w;l.exports=v.default},4804:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(7240));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,v){for(var m=0;m{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(7240));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Selector,l);function Selector(v){var m;m=l.call(this,v)||this;m.type=_.SELECTOR;return m}return Selector}(y["default"]);v.default=w;l.exports=v.default},2391:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(3206));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(String,l);function String(v){var m;m=l.call(this,v)||this;m.type=_.STRING;return m}return String}(y["default"]);v.default=w;l.exports=v.default},9646:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(5669));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Tag,l);function Tag(v){var m;m=l.call(this,v)||this;m.type=_.TAG;return m}return Tag}(y["default"]);v.default=w;l.exports=v.default},6895:(l,v)=>{"use strict";v.__esModule=true;v.UNIVERSAL=v.ATTRIBUTE=v.CLASS=v.COMBINATOR=v.COMMENT=v.ID=v.NESTING=v.PSEUDO=v.ROOT=v.SELECTOR=v.STRING=v.TAG=void 0;var m="tag";v.TAG=m;var y="string";v.STRING=y;var _="selector";v.SELECTOR=_;var w="root";v.ROOT=w;var k="pseudo";v.PSEUDO=k;var S="nesting";v.NESTING=S;var E="id";v.ID=E;var C="comment";v.COMMENT=C;var O="combinator";v.COMBINATOR=O;var P="class";v.CLASS=P;var L="attribute";v.ATTRIBUTE=L;var T="universal";v.UNIVERSAL=T},4843:(l,v,m)=>{"use strict";v.__esModule=true;v.default=void 0;var y=_interopRequireDefault(m(5669));var _=m(6895);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,v){l.prototype=Object.create(v.prototype);l.prototype.constructor=l;_setPrototypeOf(l,v)}function _setPrototypeOf(l,v){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,v){l.__proto__=v;return l};return _setPrototypeOf(l,v)}var w=function(l){_inheritsLoose(Universal,l);function Universal(v){var m;m=l.call(this,v)||this;m.type=_.UNIVERSAL;m.value="*";return m}return Universal}(y["default"]);v.default=w;l.exports=v.default},8520:(l,v)=>{"use strict";v.__esModule=true;v.default=sortAscending;function sortAscending(l){return l.sort((function(l,v){return l-v}))}l.exports=v.default},6684:(l,v)=>{"use strict";v.__esModule=true;v.combinator=v.word=v.comment=v.str=v.tab=v.newline=v.feed=v.cr=v.backslash=v.bang=v.slash=v.doubleQuote=v.singleQuote=v.space=v.greaterThan=v.pipe=v.equals=v.plus=v.caret=v.tilde=v.dollar=v.closeSquare=v.openSquare=v.closeParenthesis=v.openParenthesis=v.semicolon=v.colon=v.comma=v.at=v.asterisk=v.ampersand=void 0;var m=38;v.ampersand=m;var y=42;v.asterisk=y;var _=64;v.at=_;var w=44;v.comma=w;var k=58;v.colon=k;var S=59;v.semicolon=S;var E=40;v.openParenthesis=E;var C=41;v.closeParenthesis=C;var O=91;v.openSquare=O;var P=93;v.closeSquare=P;var L=36;v.dollar=L;var T=126;v.tilde=T;var A=94;v.caret=A;var R=43;v.plus=R;var D=61;v.equals=D;var q=124;v.pipe=q;var F=62;v.greaterThan=F;var $=32;v.space=$;var V=39;v.singleQuote=V;var B=34;v.doubleQuote=B;var z=47;v.slash=z;var U=33;v.bang=U;var W=92;v.backslash=W;var Q=13;v.cr=Q;var G=12;v.feed=G;var Y=10;v.newline=Y;var J=9;v.tab=J;var Z=V;v.str=Z;var X=-1;v.comment=X;var K=-2;v.word=K;var ee=-3;v.combinator=ee},3370:(l,v,m)=>{"use strict";v.__esModule=true;v.default=tokenize;v.FIELDS=void 0;var y=_interopRequireWildcard(m(6684));var _,w;function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var v=_getRequireWildcardCache();if(v&&v.has(l)){return v.get(l)}var m={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in l){if(Object.prototype.hasOwnProperty.call(l,_)){var w=y?Object.getOwnPropertyDescriptor(l,_):null;if(w&&(w.get||w.set)){Object.defineProperty(m,_,w)}else{m[_]=l[_]}}}m["default"]=l;if(v){v.set(l,m)}return m}var k=(_={},_[y.tab]=true,_[y.newline]=true,_[y.cr]=true,_[y.feed]=true,_);var S=(w={},w[y.space]=true,w[y.tab]=true,w[y.newline]=true,w[y.cr]=true,w[y.feed]=true,w[y.ampersand]=true,w[y.asterisk]=true,w[y.bang]=true,w[y.comma]=true,w[y.colon]=true,w[y.semicolon]=true,w[y.openParenthesis]=true,w[y.closeParenthesis]=true,w[y.openSquare]=true,w[y.closeSquare]=true,w[y.singleQuote]=true,w[y.doubleQuote]=true,w[y.plus]=true,w[y.pipe]=true,w[y.tilde]=true,w[y.greaterThan]=true,w[y.equals]=true,w[y.dollar]=true,w[y.caret]=true,w[y.slash]=true,w);var E={};var C="0123456789abcdefABCDEF";for(var O=0;O0){$=S+D;V=F-q[D].length}else{$=S;V=k}z=y.comment;S=$;T=$;L=F-V}else if(O===y.slash){F=E;z=O;T=S;L=E-k;C=F+1}else{F=consumeWord(m,E);z=y.word;T=S;L=F-k}C=F+1;break}v.push([z,S,E-k,T,L,E,C]);if(V){k=V;V=null}E=C}return v}},3573:(l,v)=>{"use strict";v.__esModule=true;v.default=ensureObject;function ensureObject(l){for(var v=arguments.length,m=new Array(v>1?v-1:0),y=1;y0){var _=m.shift();if(!l[_]){l[_]={}}l=l[_]}}l.exports=v.default},3514:(l,v)=>{"use strict";v.__esModule=true;v.default=getProp;function getProp(l){for(var v=arguments.length,m=new Array(v>1?v-1:0),y=1;y0){var _=m.shift();if(!l[_]){return undefined}l=l[_]}return l}l.exports=v.default},3621:(l,v,m)=>{"use strict";v.__esModule=true;v.stripComments=v.ensureObject=v.getProp=v.unesc=void 0;var y=_interopRequireDefault(m(2897));v.unesc=y["default"];var _=_interopRequireDefault(m(3514));v.getProp=_["default"];var w=_interopRequireDefault(m(3573));v.ensureObject=w["default"];var k=_interopRequireDefault(m(7142));v.stripComments=k["default"];function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}},7142:(l,v)=>{"use strict";v.__esModule=true;v.default=stripComments;function stripComments(l){var v="";var m=l.indexOf("/*");var y=0;while(m>=0){v=v+l.slice(y,m);var _=l.indexOf("*/",m+2);if(_<0){return v}y=_+2;m=l.indexOf("/*",y)}v=v+l.slice(y);return v}l.exports=v.default},2897:(l,v)=>{"use strict";v.__esModule=true;v.default=unesc;function gobbleHex(l){var v=l.toLowerCase();var m="";var y=false;for(var _=0;_<6&&v[_]!==undefined;_++){var w=v.charCodeAt(_);var k=w>=97&&w<=102||w>=48&&w<=57;y=w===32;if(!k){break}m+=v[_]}if(m.length===0){return undefined}var S=parseInt(m,16);var E=S>=55296&&S<=57343;if(E||S===0||S>1114111){return["�",m.length+(y?1:0)]}return[String.fromCodePoint(S),m.length+(y?1:0)]}var m=/\\/;function unesc(l){var v=m.test(l);if(!v){return l}var y="";for(var _=0;_{function pluginCreator(){return{postcssPlugin:"postcss-plugin-stub",prepare(){return{}}}}pluginCreator.postcss=true;Object.defineProperty(v,"__esModule",{value:true});v.default=pluginCreator},5317:(l,v,m)=>{"use strict";const y=m(2997);function parseSelectors(l,v){return y(v).processSync(l)}function unique(l){const v=[...new Set(l.selectors)];v.sort();return v.join()}function pluginCreator(){return{postcssPlugin:"postcss-unique-selectors",OnceExit(l){l.walkRules((l=>{let v=[];const removeAndSaveComments=l=>{l.walk((l=>{if(l.type==="comment"){v.push(l.value);l.remove();return}else{return}}))};if(l.raws.selector&&l.raws.selector.raw){parseSelectors(l.raws.selector.raw,removeAndSaveComments);l.raws.selector.raw=unique(l)}l.selector=parseSelectors(l.selector,removeAndSaveComments);l.selector=unique(l);l.selectors=l.selectors.concat(v)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},9285:(l,v,m)=>{var y=m(5920);var _=m(9987);var w=m(7952);function ValueParser(l){if(this instanceof ValueParser){this.nodes=y(l);return this}return new ValueParser(l)}ValueParser.prototype.toString=function(){return Array.isArray(this.nodes)?w(this.nodes):""};ValueParser.prototype.walk=function(l,v){_(this.nodes,l,v);return this};ValueParser.unit=m(5148);ValueParser.walk=_;ValueParser.stringify=w;l.exports=ValueParser},5920:l=>{var v="(".charCodeAt(0);var m=")".charCodeAt(0);var y="'".charCodeAt(0);var _='"'.charCodeAt(0);var w="\\".charCodeAt(0);var k="/".charCodeAt(0);var S=",".charCodeAt(0);var E=":".charCodeAt(0);var C="*".charCodeAt(0);var O="u".charCodeAt(0);var P="U".charCodeAt(0);var L="+".charCodeAt(0);var T=/^[a-f0-9?-]+$/i;l.exports=function(l){var A=[];var R=l;var D,q,F,$,V,B,z,U;var W=0;var Q=R.charCodeAt(W);var G=R.length;var Y=[{nodes:A}];var J=0;var Z;var X="";var K="";var ee="";while(W{function stringifyNode(l,v){var m=l.type;var y=l.value;var _;var w;if(v&&(w=v(l))!==undefined){return w}else if(m==="word"||m==="space"){return y}else if(m==="string"){_=l.quote||"";return _+y+(l.unclosed?"":_)}else if(m==="comment"){return"/*"+y+(l.unclosed?"":"*/")}else if(m==="div"){return(l.before||"")+y+(l.after||"")}else if(Array.isArray(l.nodes)){_=stringify(l.nodes,v);if(m!=="function"){return _}return y+"("+(l.before||"")+_+(l.after||"")+(l.unclosed?"":")")}return y}function stringify(l,v){var m,y;if(Array.isArray(l)){m="";for(y=l.length-1;~y;y-=1){m=stringifyNode(l[y],v)+m}return m}return stringifyNode(l,v)}l.exports=stringify},5148:l=>{var v="-".charCodeAt(0);var m="+".charCodeAt(0);var y=".".charCodeAt(0);var _="e".charCodeAt(0);var w="E".charCodeAt(0);function likeNumber(l){var _=l.charCodeAt(0);var w;if(_===m||_===v){w=l.charCodeAt(1);if(w>=48&&w<=57){return true}var k=l.charCodeAt(2);if(w===y&&k>=48&&k<=57){return true}return false}if(_===y){w=l.charCodeAt(1);if(w>=48&&w<=57){return true}return false}if(_>=48&&_<=57){return true}return false}l.exports=function(l){var k=0;var S=l.length;var E;var C;var O;if(S===0||!likeNumber(l)){return false}E=l.charCodeAt(k);if(E===m||E===v){k++}while(k57){break}k+=1}E=l.charCodeAt(k);C=l.charCodeAt(k+1);if(E===y&&C>=48&&C<=57){k+=2;while(k57){break}k+=1}}E=l.charCodeAt(k);C=l.charCodeAt(k+1);O=l.charCodeAt(k+2);if((E===_||E===w)&&(C>=48&&C<=57||(C===m||C===v)&&O>=48&&O<=57)){k+=C===m||C===v?3:2;while(k57){break}k+=1}}return{number:l.slice(0,k),unit:l.slice(k)}}},9987:l=>{l.exports=function walk(l,v,m){var y,_,w,k;for(y=0,_=l.length;y<_;y+=1){w=l[y];if(!m){k=v(w,y,l)}if(k!==false&&w.type==="function"&&Array.isArray(w.nodes)){walk(w.nodes,v,m)}if(m){v(w,y,l)}}}},9227:l=>{"use strict";const v="firefox 2";const m="ie 5.5";const y="ie 6";const _="ie 7";const w="ie 8";const k="opera 9";l.exports={FF_2:v,IE_5_5:m,IE_6:y,IE_7:_,IE_8:w,OP_9:k}},6261:l=>{"use strict";const v="media query";const m="property";const y="selector";const _="value";l.exports={MEDIA_QUERY:v,PROPERTY:m,SELECTOR:y,VALUE:_}},9287:l=>{"use strict";const v="atrule";const m="decl";const y="rule";l.exports={ATRULE:v,DECL:m,RULE:y}},7135:l=>{"use strict";const v="body";const m="html";l.exports={BODY:v,HTML:m}},5125:l=>{"use strict";l.exports=function exists(l,v,m){const y=l.at(v);return y&&y.value&&y.value.toLowerCase()===m}},837:(l,v,m)=>{"use strict";const y=m(5478);const _=m(2837);function pluginCreator(l={}){return{postcssPlugin:"stylehacks",OnceExit(v,{result:m}){const w=m.opts||{};const k=y(null,{stats:w.stats,path:__dirname,env:w.env});const S=[];for(const l of _){const v=new l(m);if(!k.some((l=>v.targets.has(l)))){S.push(v)}}v.walk((v=>{S.forEach((m=>{if(!m.nodeTypes.has(v.type)){return}if(l.lint){return m.detectAndWarn(v)}return m.detectAndResolve(v)}))}))}}}pluginCreator.detect=l=>_.some((v=>{const m=new v;return m.any(l)}));pluginCreator.postcss=true;l.exports=pluginCreator},751:l=>{"use strict";l.exports=function isMixin(l){const{selector:v}=l;if(!v||v[v.length-1]===":"){return true}return false}},3368:l=>{"use strict";l.exports=class BasePlugin{constructor(l,v,m){this.nodes=[];this.targets=new Set(l);this.nodeTypes=new Set(v);this.result=m}push(l,v){l._stylehacks=Object.assign({},v,{message:`Bad ${v.identifier}: ${v.hack}`,browsers:this.targets});this.nodes.push(l)}any(l){if(this.nodeTypes.has(l.type)){this.detect(l);return l._stylehacks!==undefined}return false}detectAndResolve(l){this.nodes=[];this.detect(l);return this.resolve()}detectAndWarn(l){this.nodes=[];this.detect(l);return this.warn()}detect(l){throw new Error("You need to implement this method in a subclass.")}resolve(){return this.nodes.forEach((l=>l.remove()))}warn(){return this.nodes.forEach((l=>{const{message:v,browsers:m,identifier:y,hack:_}=l._stylehacks;return l.warn(this.result,v+JSON.stringify({browsers:m,identifier:y,hack:_}))}))}}},3385:(l,v,m)=>{"use strict";const y=m(2997);const _=m(5125);const w=m(751);const k=m(3368);const{FF_2:S}=m(9227);const{SELECTOR:E}=m(6261);const{RULE:C}=m(9287);const{BODY:O}=m(7135);l.exports=class BodyEmpty extends k{constructor(l){super([S],[C],l)}detect(l){if(w(l)){return}y(this.analyse(l)).processSync(l.selector)}analyse(l){return v=>{v.each((v=>{if(_(v,0,O)&&_(v,1,":empty")&&_(v,2," ")&&v.at(3)){this.push(l,{identifier:E,hack:v.toString()})}}))}}}},3526:(l,v,m)=>{"use strict";const y=m(2997);const _=m(5125);const w=m(751);const k=m(3368);const{IE_5_5:S,IE_6:E,IE_7:C}=m(9227);const{SELECTOR:O}=m(6261);const{RULE:P}=m(9287);const{BODY:L,HTML:T}=m(7135);l.exports=class HtmlCombinatorCommentBody extends k{constructor(l){super([S,E,C],[P],l)}detect(l){if(w(l)){return}if(l.raws.selector&&l.raws.selector.raw){y(this.analyse(l)).processSync(l.raws.selector.raw)}}analyse(l){return v=>{v.each((v=>{if(_(v,0,T)&&(_(v,1,">")||_(v,1,"~"))&&v.at(2)&&v.at(2).type==="comment"&&_(v,3," ")&&_(v,4,L)&&_(v,5," ")&&v.at(6)){this.push(l,{identifier:O,hack:v.toString()})}}))}}}},496:(l,v,m)=>{"use strict";const y=m(2997);const _=m(5125);const w=m(751);const k=m(3368);const{OP_9:S}=m(9227);const{SELECTOR:E}=m(6261);const{RULE:C}=m(9287);const{HTML:O}=m(7135);l.exports=class HtmlFirstChild extends k{constructor(l){super([S],[C],l)}detect(l){if(w(l)){return}y(this.analyse(l)).processSync(l.selector)}analyse(l){return v=>{v.each((v=>{if(_(v,0,O)&&_(v,1,":first-child")&&_(v,2," ")&&v.at(3)){this.push(l,{identifier:E,hack:v.toString()})}}))}}}},3076:(l,v,m)=>{"use strict";const y=m(3368);const{IE_5_5:_,IE_6:w,IE_7:k}=m(9227);const{DECL:S}=m(9287);l.exports=class Important extends y{constructor(l){super([_,w,k],[S],l)}detect(l){const v=l.value.match(/!\w/);if(v&&v.index){const m=l.value.substr(v.index,l.value.length-1);this.push(l,{identifier:"!important",hack:m})}}}},2837:(l,v,m)=>{"use strict";const y=m(3385);const _=m(3526);const w=m(496);const k=m(3076);const S=m(2611);const E=m(633);const C=m(5035);const O=m(103);const P=m(4461);const L=m(4032);const T=m(4479);const A=m(7352);l.exports=[y,_,w,k,S,E,C,O,P,L,T,A]},2611:(l,v,m)=>{"use strict";const y=m(3368);const{IE_5_5:_,IE_6:w,IE_7:k}=m(9227);const{PROPERTY:S}=m(6261);const{ATRULE:E,DECL:C}=m(9287);const O="!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|".split("_");l.exports=class LeadingStar extends y{constructor(l){super([_,w,k],[E,C],l)}detect(l){if(l.type===C){O.forEach((v=>{if(!l.prop.indexOf(v)){this.push(l,{identifier:S,hack:l.prop})}}));const{before:v}=l.raws;if(!v){return}O.forEach((m=>{if(v.includes(m)){this.push(l,{identifier:S,hack:`${v.trim()}${l.prop}`})}}))}else{const{name:v}=l;const m=v.length-1;if(v.lastIndexOf(":")===m){this.push(l,{identifier:S,hack:`@${v.substr(0,m)}`})}}}}},633:(l,v,m)=>{"use strict";const y=m(3368);const{IE_6:_}=m(9227);const{PROPERTY:w}=m(6261);const{DECL:k}=m(9287);function vendorPrefix(l){let v=l.match(/^(-\w+-)/);if(v){return v[0]}return""}l.exports=class LeadingUnderscore extends y{constructor(l){super([_],[k],l)}detect(l){const{before:v}=l.raws;if(v&&v.includes("_")){this.push(l,{identifier:w,hack:`${v.trim()}${l.prop}`})}if(l.prop[0]==="-"&&l.prop[1]!=="-"&&vendorPrefix(l.prop)===""){this.push(l,{identifier:w,hack:l.prop})}}}},5035:(l,v,m)=>{"use strict";const y=m(3368);const{IE_8:_}=m(9227);const{MEDIA_QUERY:w}=m(6261);const{ATRULE:k}=m(9287);l.exports=class MediaSlash0 extends y{constructor(l){super([_],[k],l)}detect(l){const v=l.params.trim();if(v.toLowerCase()==="\\0screen"){this.push(l,{identifier:w,hack:v})}}}},103:(l,v,m)=>{"use strict";const y=m(3368);const{IE_5_5:_,IE_6:w,IE_7:k,IE_8:S}=m(9227);const{MEDIA_QUERY:E}=m(6261);const{ATRULE:C}=m(9287);l.exports=class MediaSlash0Slash9 extends y{constructor(l){super([_,w,k,S],[C],l)}detect(l){const v=l.params.trim();if(v.toLowerCase()==="\\0screen\\,screen\\9"){this.push(l,{identifier:E,hack:v})}}}},4461:(l,v,m)=>{"use strict";const y=m(3368);const{IE_5_5:_,IE_6:w,IE_7:k}=m(9227);const{MEDIA_QUERY:S}=m(6261);const{ATRULE:E}=m(9287);l.exports=class MediaSlash9 extends y{constructor(l){super([_,w,k],[E],l)}detect(l){const v=l.params.trim();if(v.toLowerCase()==="screen\\9"){this.push(l,{identifier:S,hack:v})}}}},4032:(l,v,m)=>{"use strict";const y=m(3368);const{IE_6:_,IE_7:w,IE_8:k}=m(9227);const{VALUE:S}=m(6261);const{DECL:E}=m(9287);l.exports=class Slash9 extends y{constructor(l){super([_,w,k],[E],l)}detect(l){let v=l.value;if(v&&v.length>2&&v.indexOf("\\9")===v.length-2){this.push(l,{identifier:S,hack:v})}}}},4479:(l,v,m)=>{"use strict";const y=m(2997);const _=m(5125);const w=m(751);const k=m(3368);const{IE_5_5:S,IE_6:E}=m(9227);const{SELECTOR:C}=m(6261);const{RULE:O}=m(9287);const{HTML:P}=m(7135);l.exports=class StarHtml extends k{constructor(l){super([S,E],[O],l)}detect(l){if(w(l)){return}y(this.analyse(l)).processSync(l.selector)}analyse(l){return v=>{v.each((v=>{if(_(v,0,"*")&&_(v,1," ")&&_(v,2,P)&&_(v,3," ")&&v.at(4)){this.push(l,{identifier:C,hack:v.toString()})}}))}}}},7352:(l,v,m)=>{"use strict";const y=m(3368);const _=m(751);const{IE_5_5:w,IE_6:k,IE_7:S}=m(9227);const{SELECTOR:E}=m(6261);const{RULE:C}=m(9287);l.exports=class TrailingSlashComma extends y{constructor(l){super([w,k,S],[C],l)}detect(l){if(_(l)){return}const{selector:v}=l;const m=v.trim();if(m.lastIndexOf(",")===v.length-1||m.lastIndexOf("\\")===v.length-1){this.push(l,{identifier:E,hack:v})}}}},4534:function(l,v){(function(l,m){if(typeof define==="function"&&define.amd){define("timsort",["exports"],m)}else if(true){m(v)}else{var y}})(this,(function(l){"use strict";l.__esModule=true;l.sort=sort;function _classCallCheck(l,v){if(!(l instanceof v)){throw new TypeError("Cannot call a class as a function")}}var v=32;var m=7;var y=256;var _=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function log10(l){if(l<1e5){if(l<100){return l<10?0:1}if(l<1e4){return l<1e3?2:3}return 4}if(l<1e7){return l<1e6?5:6}if(l<1e9){return l<1e8?7:8}return 9}function alphabeticalCompare(l,v){if(l===v){return 0}if(~~l===l&&~~v===v){if(l===0||v===0){return l=0){return-1}if(l>=0){return 1}l=-l;v=-v}var m=log10(l);var y=log10(v);var w=0;if(my){v*=_[m-y-1];l/=10;w=1}if(l===v){return w}return l=v){m|=l&1;l>>=1}return l+m}function makeAscendingRun(l,v,m,y){var _=v+1;if(_===m){return 1}if(y(l[_++],l[v])<0){while(_=0){_++}}return _-v}function reverseRun(l,v,m){m--;while(v>>1;if(_(w,l[E])<0){S=E}else{k=E+1}}var C=y-k;switch(C){case 3:l[k+3]=l[k+2];case 2:l[k+2]=l[k+1];case 1:l[k+1]=l[k];break;default:while(C>0){l[k+C]=l[k+C-1];C--}}l[k]=w}}function gallopLeft(l,v,m,y,_,w){var k=0;var S=0;var E=1;if(w(l,v[m+_])>0){S=y-_;while(E0){k=E;E=(E<<1)+1;if(E<=0){E=S}}if(E>S){E=S}k+=_;E+=_}else{S=_+1;while(ES){E=S}var C=k;k=_-E;E=_-C}k++;while(k>>1);if(w(l,v[m+O])>0){k=O+1}else{E=O}}return E}function gallopRight(l,v,m,y,_,w){var k=0;var S=0;var E=1;if(w(l,v[m+_])<0){S=_+1;while(ES){E=S}var C=k;k=_-E;E=_-C}else{S=y-_;while(E=0){k=E;E=(E<<1)+1;if(E<=0){E=S}}if(E>S){E=S}k+=_;E+=_}k++;while(k>>1);if(w(l,v[m+O])<0){E=O}else{k=O+1}}return E}var w=function(){function TimSort(l,v){_classCallCheck(this,TimSort);this.array=null;this.compare=null;this.minGallop=m;this.length=0;this.tmpStorageLength=y;this.stackLength=0;this.runStart=null;this.runLength=null;this.stackSize=0;this.array=l;this.compare=v;this.length=l.length;if(this.length<2*y){this.tmpStorageLength=this.length>>>1}this.tmp=new Array(this.tmpStorageLength);this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40;this.runStart=new Array(this.stackLength);this.runLength=new Array(this.stackLength)}TimSort.prototype.pushRun=function pushRun(l,v){this.runStart[this.stackSize]=l;this.runLength[this.stackSize]=v;this.stackSize+=1};TimSort.prototype.mergeRuns=function mergeRuns(){while(this.stackSize>1){var l=this.stackSize-2;if(l>=1&&this.runLength[l-1]<=this.runLength[l]+this.runLength[l+1]||l>=2&&this.runLength[l-2]<=this.runLength[l]+this.runLength[l-1]){if(this.runLength[l-1]this.runLength[l+1]){break}this.mergeAt(l)}};TimSort.prototype.forceMergeRuns=function forceMergeRuns(){while(this.stackSize>1){var l=this.stackSize-2;if(l>0&&this.runLength[l-1]=m||A>=m);if(R){break}if(L<0){L=0}L+=2}this.minGallop=L;if(L<1){this.minGallop=1}if(v===1){for(E=0;E<_;E++){k[P+E]=k[O+E]}k[P+_]=S[C]}else if(v===0){throw new Error("mergeLow preconditions were not respected")}else{for(E=0;E=0;E--){k[T+E]=k[L+E]}k[P]=S[O];return}var A=this.minGallop;while(true){var R=0;var D=0;var q=false;do{if(w(S[O],k[C])<0){k[P--]=k[C--];R++;D=0;if(--v===0){q=true;break}}else{k[P--]=S[O--];D++;R=0;if(--_===1){q=true;break}}}while((R|D)=0;E--){k[T+E]=k[L+E]}if(v===0){q=true;break}}k[P--]=S[O--];if(--_===1){q=true;break}D=_-gallopLeft(k[C],S,0,_,_-1,w);if(D!==0){P-=D;O-=D;_-=D;T=P+1;L=O+1;for(E=0;E=m||D>=m);if(q){break}if(A<0){A=0}A+=2}this.minGallop=A;if(A<1){this.minGallop=1}if(_===1){P-=v;C-=v;T=P+1;L=C+1;for(E=v-1;E>=0;E--){k[T+E]=k[L+E]}k[P]=S[O]}else if(_===0){throw new Error("mergeHigh preconditions were not respected")}else{L=P-(_-1);for(E=0;E<_;E++){k[L+E]=S[E]}}};return TimSort}();function sort(l,m,y,_){if(!Array.isArray(l)){throw new TypeError("Can only sort arrays")}if(!m){m=alphabeticalCompare}else if(typeof m!=="function"){_=y;y=m;m=alphabeticalCompare}if(!y){y=0}if(!_){_=l.length}var k=_-y;if(k<2){return}var S=0;if(kC){O=C}binaryInsertionSort(l,y,y+O,y+S,m);S=O}E.pushRun(y,S);E.mergeRuns();k-=S;y+=S}while(k!==0);E.forceMergeRuns()}}))},6655:(l,v,m)=>{l.exports=m(4534)},5278:(l,v,m)=>{l.exports=m(1669).deprecate},4351:(l,v,m)=>{const y=m(9528);l.exports=function(l={}){const v=Object.assign({},{cssDeclarationSorter:{exclude:true},calc:{exclude:true}},l);return y(v)}},4102:(l,v,m)=>{"use strict";var y=m(6655);function _interopNamespace(l){if(l&&l.__esModule)return l;var v=Object.create(null);if(l){Object.keys(l).forEach((function(m){if(m!=="default"){var y=Object.getOwnPropertyDescriptor(l,m);Object.defineProperty(v,m,y.get?y:{enumerable:true,get:function(){return l[m]}})}}))}v["default"]=l;return Object.freeze(v)}const _={animation:["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state"],background:["background-image","background-size","background-position","background-repeat","background-origin","background-clip","background-attachment","background-color"],border:["border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color"],"border-top":["border-width","border-style","border-color","border-top-width","border-top-style","border-top-color"],"border-right":["border-width","border-style","border-color","border-right-width","border-right-style","border-right-color"],"border-bottom":["border-width","border-style","border-color","border-bottom-width","border-bottom-style","border-bottom-color"],"border-left":["border-width","border-style","border-color","border-left-width","border-left-style","border-left-color"],"border-color":["border-top-color","border-bottom-color","border-left-color","border-right-color"],"border-width":["border-top-width","border-bottom-width","border-left-width","border-right-width"],"border-style":["border-top-style","border-bottom-style","border-left-style","border-right-style"],"border-radius":["border-top-right-radius","border-top-left-radius","border-bottom-right-radius","border-bottom-left-radius"],"border-block-start":["border-block-start-width","border-block-start-style","border-block-start-color"],"border-block-end":["border-block-end-width","border-block-end-style","border-block-end-color"],"border-image":["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],"border-inline-start":["border-inline-start-width","border-inline-start-style","border-inline-start-color"],"border-inline-end":["border-inline-end-width","border-inline-end-style","border-inline-end-color"],columns:["column-width","column-count"],"column-rule":["column-rule-width","column-rule-style","column-rule-color"],flex:["flex-grow","flex-shrink","flex-basis"],"flex-flow":["flex-direction","flex-wrap"],font:["font-style","font-variant","font-weight","font-stretch","font-size","font-family","line-height"],grid:["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow","column-gap","row-gap"],"grid-area":["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],"grid-column":["grid-column-start","grid-column-end"],"grid-row":["grid-row-start","grid-row-end"],"grid-template":["grid-template-columns","grid-template-rows","grid-template-areas"],"list-style":["list-style-type","list-style-position","list-style-image"],margin:["margin-top","margin-right","margin-bottom","margin-left"],mask:["mask-image","mask-mode","mask-position","mask-size","mask-repeat","mask-origin","mask-clip","mask-composite"],outline:["outline-color","outline-style","outline-width"],overflow:["overflow-x","overflow-y"],padding:["padding-top","padding-right","padding-bottom","padding-left"],"padding-inline":["padding-inline-start","padding-inline-end"],"padding-inline-start":["padding-top","padding-right","padding-bottom","padding-left"],"padding-inline-end":["padding-top","padding-right","padding-bottom","padding-left"],"place-content":["align-content","justify-content"],"place-items":["align-items","justify-items"],"place-self":["align-self","justify-self"],"text-decoration":["text-decoration-color","text-decoration-style","text-decoration-line"],transition:["transition-delay","transition-duration","transition-property","transition-timing-function"],"text-emphasis":["text-emphasis-style","text-emphasis-color"]};const w=["alphabetical","concentric-css","smacss"];const pluginEntrypoint=({order:l="alphabetical",keepOverrides:v=false}={})=>({postcssPlugin:"css-declaration-sorter",OnceExit(y){let withKeepOverrides=l=>l;if(v){withKeepOverrides=withOverridesComparator(_)}if(typeof l==="function"){return processCss({css:y,comparator:withKeepOverrides(l)})}if(!w.includes(l))return Promise.reject(Error([`Invalid built-in order '${l}' provided.`,`Available built-in orders are: ${w}`].join("\n")));return function(l){return Promise.resolve().then((function(){return _interopNamespace(m(4472)(l))}))}(`../orders/${l}.cjs`).then((({properties:l})=>processCss({css:y,comparator:withKeepOverrides(orderComparator(l))})))}});pluginEntrypoint.postcss=true;function processCss({css:l,comparator:v}){const m=[];const y=[];l.walk((l=>{const v=l.nodes;const _=l.type;if(_==="comment"){const v=l.raws.before&&l.raws.before.includes("\n");const y=v&&!l.next();const _=!l.prev()&&!l.next()||!l.parent;if(y||_||l.parent.type==="root"){return}if(v){const v=l.next()||l.prev();if(v){m.unshift({comment:l,pairedNode:v,insertPosition:l.next()?"Before":"After"});l.remove()}}else{const v=l.prev()||l.next();if(v){m.push({comment:l,pairedNode:v,insertPosition:"After"});l.remove()}}return}const w=_==="rule"||_==="atrule";if(w&&v&&v.length>1){y.push(v)}}));y.forEach((l=>{sortCssDeclarations({nodes:l,comparator:v})}));m.forEach((l=>{const v=l.pairedNode;l.comment.remove();v.parent&&v.parent["insert"+l.insertPosition](v,l.comment)}))}function sortCssDeclarations({nodes:l,comparator:v}){y.sort(l,((l,m)=>{if(l.type==="decl"&&m.type==="decl"){return v(l.prop,m.prop)}else{return compareDifferentType(l,m)}}))}function withOverridesComparator(l){return function(v){return function(m,y){m=removeVendorPrefix(m);y=removeVendorPrefix(y);if(l[m]&&l[m].includes(y))return 0;if(l[y]&&l[y].includes(m))return 0;return v(m,y)}}}function orderComparator(l){return function(v,m){return l.indexOf(v)-l.indexOf(m)}}function compareDifferentType(l,v){if(v.type==="atrule"){return 0}return l.type==="decl"?-1:v.type==="decl"?1:0}function removeVendorPrefix(l){return l.replace(/^-\w+-/,"")}l.exports=pluginEntrypoint},8440:l=>{function webpackEmptyContext(l){var v=new Error("Cannot find module '"+l+"'");v.code="MODULE_NOT_FOUND";throw v}webpackEmptyContext.keys=()=>[];webpackEmptyContext.resolve=webpackEmptyContext;webpackEmptyContext.id=8440;l.exports=webpackEmptyContext},4472:l=>{function webpackEmptyContext(l){var v=new Error("Cannot find module '"+l+"'");v.code="MODULE_NOT_FOUND";throw v}webpackEmptyContext.keys=()=>[];webpackEmptyContext.resolve=webpackEmptyContext;webpackEmptyContext.id=4472;l.exports=webpackEmptyContext},3835:l=>{"use strict";l.exports=JSON.parse('[{"name":"nodejs","version":"0.2.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.3.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.4.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.5.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.6.0","date":"2011-11-04","lts":false,"security":false},{"name":"nodejs","version":"0.7.0","date":"2012-01-17","lts":false,"security":false},{"name":"nodejs","version":"0.8.0","date":"2012-06-22","lts":false,"security":false},{"name":"nodejs","version":"0.9.0","date":"2012-07-20","lts":false,"security":false},{"name":"nodejs","version":"0.10.0","date":"2013-03-11","lts":false,"security":false},{"name":"nodejs","version":"0.11.0","date":"2013-03-28","lts":false,"security":false},{"name":"nodejs","version":"0.12.0","date":"2015-02-06","lts":false,"security":false},{"name":"nodejs","version":"4.0.0","date":"2015-09-08","lts":false,"security":false},{"name":"nodejs","version":"4.1.0","date":"2015-09-17","lts":false,"security":false},{"name":"nodejs","version":"4.2.0","date":"2015-10-12","lts":"Argon","security":false},{"name":"nodejs","version":"4.3.0","date":"2016-02-09","lts":"Argon","security":false},{"name":"nodejs","version":"4.4.0","date":"2016-03-08","lts":"Argon","security":false},{"name":"nodejs","version":"4.5.0","date":"2016-08-16","lts":"Argon","security":false},{"name":"nodejs","version":"4.6.0","date":"2016-09-27","lts":"Argon","security":true},{"name":"nodejs","version":"4.7.0","date":"2016-12-06","lts":"Argon","security":false},{"name":"nodejs","version":"4.8.0","date":"2017-02-21","lts":"Argon","security":false},{"name":"nodejs","version":"4.9.0","date":"2018-03-28","lts":"Argon","security":true},{"name":"nodejs","version":"5.0.0","date":"2015-10-29","lts":false,"security":false},{"name":"nodejs","version":"5.1.0","date":"2015-11-17","lts":false,"security":false},{"name":"nodejs","version":"5.2.0","date":"2015-12-09","lts":false,"security":false},{"name":"nodejs","version":"5.3.0","date":"2015-12-15","lts":false,"security":false},{"name":"nodejs","version":"5.4.0","date":"2016-01-06","lts":false,"security":false},{"name":"nodejs","version":"5.5.0","date":"2016-01-21","lts":false,"security":false},{"name":"nodejs","version":"5.6.0","date":"2016-02-09","lts":false,"security":false},{"name":"nodejs","version":"5.7.0","date":"2016-02-23","lts":false,"security":false},{"name":"nodejs","version":"5.8.0","date":"2016-03-09","lts":false,"security":false},{"name":"nodejs","version":"5.9.0","date":"2016-03-16","lts":false,"security":false},{"name":"nodejs","version":"5.10.0","date":"2016-04-01","lts":false,"security":false},{"name":"nodejs","version":"5.11.0","date":"2016-04-21","lts":false,"security":false},{"name":"nodejs","version":"5.12.0","date":"2016-06-23","lts":false,"security":false},{"name":"nodejs","version":"6.0.0","date":"2016-04-26","lts":false,"security":false},{"name":"nodejs","version":"6.1.0","date":"2016-05-05","lts":false,"security":false},{"name":"nodejs","version":"6.2.0","date":"2016-05-17","lts":false,"security":false},{"name":"nodejs","version":"6.3.0","date":"2016-07-06","lts":false,"security":false},{"name":"nodejs","version":"6.4.0","date":"2016-08-12","lts":false,"security":false},{"name":"nodejs","version":"6.5.0","date":"2016-08-26","lts":false,"security":false},{"name":"nodejs","version":"6.6.0","date":"2016-09-14","lts":false,"security":false},{"name":"nodejs","version":"6.7.0","date":"2016-09-27","lts":false,"security":true},{"name":"nodejs","version":"6.8.0","date":"2016-10-12","lts":false,"security":false},{"name":"nodejs","version":"6.9.0","date":"2016-10-18","lts":"Boron","security":false},{"name":"nodejs","version":"6.10.0","date":"2017-02-21","lts":"Boron","security":false},{"name":"nodejs","version":"6.11.0","date":"2017-06-06","lts":"Boron","security":false},{"name":"nodejs","version":"6.12.0","date":"2017-11-06","lts":"Boron","security":false},{"name":"nodejs","version":"6.13.0","date":"2018-02-10","lts":"Boron","security":false},{"name":"nodejs","version":"6.14.0","date":"2018-03-28","lts":"Boron","security":true},{"name":"nodejs","version":"6.15.0","date":"2018-11-27","lts":"Boron","security":true},{"name":"nodejs","version":"6.16.0","date":"2018-12-26","lts":"Boron","security":false},{"name":"nodejs","version":"6.17.0","date":"2019-02-28","lts":"Boron","security":true},{"name":"nodejs","version":"7.0.0","date":"2016-10-25","lts":false,"security":false},{"name":"nodejs","version":"7.1.0","date":"2016-11-08","lts":false,"security":false},{"name":"nodejs","version":"7.2.0","date":"2016-11-22","lts":false,"security":false},{"name":"nodejs","version":"7.3.0","date":"2016-12-20","lts":false,"security":false},{"name":"nodejs","version":"7.4.0","date":"2017-01-04","lts":false,"security":false},{"name":"nodejs","version":"7.5.0","date":"2017-01-31","lts":false,"security":false},{"name":"nodejs","version":"7.6.0","date":"2017-02-21","lts":false,"security":false},{"name":"nodejs","version":"7.7.0","date":"2017-02-28","lts":false,"security":false},{"name":"nodejs","version":"7.8.0","date":"2017-03-29","lts":false,"security":false},{"name":"nodejs","version":"7.9.0","date":"2017-04-11","lts":false,"security":false},{"name":"nodejs","version":"7.10.0","date":"2017-05-02","lts":false,"security":false},{"name":"nodejs","version":"8.0.0","date":"2017-05-30","lts":false,"security":false},{"name":"nodejs","version":"8.1.0","date":"2017-06-08","lts":false,"security":false},{"name":"nodejs","version":"8.2.0","date":"2017-07-19","lts":false,"security":false},{"name":"nodejs","version":"8.3.0","date":"2017-08-08","lts":false,"security":false},{"name":"nodejs","version":"8.4.0","date":"2017-08-15","lts":false,"security":false},{"name":"nodejs","version":"8.5.0","date":"2017-09-12","lts":false,"security":false},{"name":"nodejs","version":"8.6.0","date":"2017-09-26","lts":false,"security":false},{"name":"nodejs","version":"8.7.0","date":"2017-10-11","lts":false,"security":false},{"name":"nodejs","version":"8.8.0","date":"2017-10-24","lts":false,"security":false},{"name":"nodejs","version":"8.9.0","date":"2017-10-31","lts":"Carbon","security":false},{"name":"nodejs","version":"8.10.0","date":"2018-03-06","lts":"Carbon","security":false},{"name":"nodejs","version":"8.11.0","date":"2018-03-28","lts":"Carbon","security":true},{"name":"nodejs","version":"8.12.0","date":"2018-09-10","lts":"Carbon","security":false},{"name":"nodejs","version":"8.13.0","date":"2018-11-20","lts":"Carbon","security":false},{"name":"nodejs","version":"8.14.0","date":"2018-11-27","lts":"Carbon","security":true},{"name":"nodejs","version":"8.15.0","date":"2018-12-26","lts":"Carbon","security":false},{"name":"nodejs","version":"8.16.0","date":"2019-04-16","lts":"Carbon","security":false},{"name":"nodejs","version":"8.17.0","date":"2019-12-17","lts":"Carbon","security":true},{"name":"nodejs","version":"9.0.0","date":"2017-10-31","lts":false,"security":false},{"name":"nodejs","version":"9.1.0","date":"2017-11-07","lts":false,"security":false},{"name":"nodejs","version":"9.2.0","date":"2017-11-14","lts":false,"security":false},{"name":"nodejs","version":"9.3.0","date":"2017-12-12","lts":false,"security":false},{"name":"nodejs","version":"9.4.0","date":"2018-01-10","lts":false,"security":false},{"name":"nodejs","version":"9.5.0","date":"2018-01-31","lts":false,"security":false},{"name":"nodejs","version":"9.6.0","date":"2018-02-21","lts":false,"security":false},{"name":"nodejs","version":"9.7.0","date":"2018-03-01","lts":false,"security":false},{"name":"nodejs","version":"9.8.0","date":"2018-03-07","lts":false,"security":false},{"name":"nodejs","version":"9.9.0","date":"2018-03-21","lts":false,"security":false},{"name":"nodejs","version":"9.10.0","date":"2018-03-28","lts":false,"security":true},{"name":"nodejs","version":"9.11.0","date":"2018-04-04","lts":false,"security":false},{"name":"nodejs","version":"10.0.0","date":"2018-04-24","lts":false,"security":false},{"name":"nodejs","version":"10.1.0","date":"2018-05-08","lts":false,"security":false},{"name":"nodejs","version":"10.2.0","date":"2018-05-23","lts":false,"security":false},{"name":"nodejs","version":"10.3.0","date":"2018-05-29","lts":false,"security":false},{"name":"nodejs","version":"10.4.0","date":"2018-06-06","lts":false,"security":false},{"name":"nodejs","version":"10.5.0","date":"2018-06-20","lts":false,"security":false},{"name":"nodejs","version":"10.6.0","date":"2018-07-04","lts":false,"security":false},{"name":"nodejs","version":"10.7.0","date":"2018-07-18","lts":false,"security":false},{"name":"nodejs","version":"10.8.0","date":"2018-08-01","lts":false,"security":false},{"name":"nodejs","version":"10.9.0","date":"2018-08-15","lts":false,"security":false},{"name":"nodejs","version":"10.10.0","date":"2018-09-06","lts":false,"security":false},{"name":"nodejs","version":"10.11.0","date":"2018-09-19","lts":false,"security":false},{"name":"nodejs","version":"10.12.0","date":"2018-10-10","lts":false,"security":false},{"name":"nodejs","version":"10.13.0","date":"2018-10-30","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.14.0","date":"2018-11-27","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.15.0","date":"2018-12-26","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.16.0","date":"2019-05-28","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.17.0","date":"2019-10-22","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.18.0","date":"2019-12-17","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.19.0","date":"2020-02-05","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.20.0","date":"2020-03-26","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.21.0","date":"2020-06-02","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.22.0","date":"2020-07-21","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.23.0","date":"2020-10-27","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.24.0","date":"2021-02-23","lts":"Dubnium","security":true},{"name":"nodejs","version":"11.0.0","date":"2018-10-23","lts":false,"security":false},{"name":"nodejs","version":"11.1.0","date":"2018-10-30","lts":false,"security":false},{"name":"nodejs","version":"11.2.0","date":"2018-11-15","lts":false,"security":false},{"name":"nodejs","version":"11.3.0","date":"2018-11-27","lts":false,"security":true},{"name":"nodejs","version":"11.4.0","date":"2018-12-07","lts":false,"security":false},{"name":"nodejs","version":"11.5.0","date":"2018-12-18","lts":false,"security":false},{"name":"nodejs","version":"11.6.0","date":"2018-12-26","lts":false,"security":false},{"name":"nodejs","version":"11.7.0","date":"2019-01-17","lts":false,"security":false},{"name":"nodejs","version":"11.8.0","date":"2019-01-24","lts":false,"security":false},{"name":"nodejs","version":"11.9.0","date":"2019-01-30","lts":false,"security":false},{"name":"nodejs","version":"11.10.0","date":"2019-02-14","lts":false,"security":false},{"name":"nodejs","version":"11.11.0","date":"2019-03-05","lts":false,"security":false},{"name":"nodejs","version":"11.12.0","date":"2019-03-14","lts":false,"security":false},{"name":"nodejs","version":"11.13.0","date":"2019-03-28","lts":false,"security":false},{"name":"nodejs","version":"11.14.0","date":"2019-04-10","lts":false,"security":false},{"name":"nodejs","version":"11.15.0","date":"2019-04-30","lts":false,"security":false},{"name":"nodejs","version":"12.0.0","date":"2019-04-23","lts":false,"security":false},{"name":"nodejs","version":"12.1.0","date":"2019-04-29","lts":false,"security":false},{"name":"nodejs","version":"12.2.0","date":"2019-05-07","lts":false,"security":false},{"name":"nodejs","version":"12.3.0","date":"2019-05-21","lts":false,"security":false},{"name":"nodejs","version":"12.4.0","date":"2019-06-04","lts":false,"security":false},{"name":"nodejs","version":"12.5.0","date":"2019-06-26","lts":false,"security":false},{"name":"nodejs","version":"12.6.0","date":"2019-07-03","lts":false,"security":false},{"name":"nodejs","version":"12.7.0","date":"2019-07-23","lts":false,"security":false},{"name":"nodejs","version":"12.8.0","date":"2019-08-06","lts":false,"security":false},{"name":"nodejs","version":"12.9.0","date":"2019-08-20","lts":false,"security":false},{"name":"nodejs","version":"12.10.0","date":"2019-09-04","lts":false,"security":false},{"name":"nodejs","version":"12.11.0","date":"2019-09-25","lts":false,"security":false},{"name":"nodejs","version":"12.12.0","date":"2019-10-11","lts":false,"security":false},{"name":"nodejs","version":"12.13.0","date":"2019-10-21","lts":"Erbium","security":false},{"name":"nodejs","version":"12.14.0","date":"2019-12-17","lts":"Erbium","security":true},{"name":"nodejs","version":"12.15.0","date":"2020-02-05","lts":"Erbium","security":true},{"name":"nodejs","version":"12.16.0","date":"2020-02-11","lts":"Erbium","security":false},{"name":"nodejs","version":"12.17.0","date":"2020-05-26","lts":"Erbium","security":false},{"name":"nodejs","version":"12.18.0","date":"2020-06-02","lts":"Erbium","security":true},{"name":"nodejs","version":"12.19.0","date":"2020-10-06","lts":"Erbium","security":false},{"name":"nodejs","version":"12.20.0","date":"2020-11-24","lts":"Erbium","security":false},{"name":"nodejs","version":"12.21.0","date":"2021-02-23","lts":"Erbium","security":true},{"name":"nodejs","version":"12.22.0","date":"2021-03-30","lts":"Erbium","security":false},{"name":"nodejs","version":"13.0.0","date":"2019-10-22","lts":false,"security":false},{"name":"nodejs","version":"13.1.0","date":"2019-11-05","lts":false,"security":false},{"name":"nodejs","version":"13.2.0","date":"2019-11-21","lts":false,"security":false},{"name":"nodejs","version":"13.3.0","date":"2019-12-03","lts":false,"security":false},{"name":"nodejs","version":"13.4.0","date":"2019-12-17","lts":false,"security":true},{"name":"nodejs","version":"13.5.0","date":"2019-12-18","lts":false,"security":false},{"name":"nodejs","version":"13.6.0","date":"2020-01-07","lts":false,"security":false},{"name":"nodejs","version":"13.7.0","date":"2020-01-21","lts":false,"security":false},{"name":"nodejs","version":"13.8.0","date":"2020-02-05","lts":false,"security":true},{"name":"nodejs","version":"13.9.0","date":"2020-02-18","lts":false,"security":false},{"name":"nodejs","version":"13.10.0","date":"2020-03-04","lts":false,"security":false},{"name":"nodejs","version":"13.11.0","date":"2020-03-12","lts":false,"security":false},{"name":"nodejs","version":"13.12.0","date":"2020-03-26","lts":false,"security":false},{"name":"nodejs","version":"13.13.0","date":"2020-04-14","lts":false,"security":false},{"name":"nodejs","version":"13.14.0","date":"2020-04-29","lts":false,"security":false},{"name":"nodejs","version":"14.0.0","date":"2020-04-21","lts":false,"security":false},{"name":"nodejs","version":"14.1.0","date":"2020-04-29","lts":false,"security":false},{"name":"nodejs","version":"14.2.0","date":"2020-05-05","lts":false,"security":false},{"name":"nodejs","version":"14.3.0","date":"2020-05-19","lts":false,"security":false},{"name":"nodejs","version":"14.4.0","date":"2020-06-02","lts":false,"security":true},{"name":"nodejs","version":"14.5.0","date":"2020-06-30","lts":false,"security":false},{"name":"nodejs","version":"14.6.0","date":"2020-07-20","lts":false,"security":false},{"name":"nodejs","version":"14.7.0","date":"2020-07-29","lts":false,"security":false},{"name":"nodejs","version":"14.8.0","date":"2020-08-11","lts":false,"security":false},{"name":"nodejs","version":"14.9.0","date":"2020-08-27","lts":false,"security":false},{"name":"nodejs","version":"14.10.0","date":"2020-09-08","lts":false,"security":false},{"name":"nodejs","version":"14.11.0","date":"2020-09-15","lts":false,"security":true},{"name":"nodejs","version":"14.12.0","date":"2020-09-22","lts":false,"security":false},{"name":"nodejs","version":"14.13.0","date":"2020-09-29","lts":false,"security":false},{"name":"nodejs","version":"14.14.0","date":"2020-10-15","lts":false,"security":false},{"name":"nodejs","version":"14.15.0","date":"2020-10-27","lts":"Fermium","security":false},{"name":"nodejs","version":"14.16.0","date":"2021-02-23","lts":"Fermium","security":true},{"name":"nodejs","version":"14.17.0","date":"2021-05-11","lts":"Fermium","security":false},{"name":"nodejs","version":"14.18.0","date":"2021-09-28","lts":"Fermium","security":false},{"name":"nodejs","version":"14.19.0","date":"2022-02-01","lts":"Fermium","security":false},{"name":"nodejs","version":"15.0.0","date":"2020-10-20","lts":false,"security":false},{"name":"nodejs","version":"15.1.0","date":"2020-11-04","lts":false,"security":false},{"name":"nodejs","version":"15.2.0","date":"2020-11-10","lts":false,"security":false},{"name":"nodejs","version":"15.3.0","date":"2020-11-24","lts":false,"security":false},{"name":"nodejs","version":"15.4.0","date":"2020-12-09","lts":false,"security":false},{"name":"nodejs","version":"15.5.0","date":"2020-12-22","lts":false,"security":false},{"name":"nodejs","version":"15.6.0","date":"2021-01-14","lts":false,"security":false},{"name":"nodejs","version":"15.7.0","date":"2021-01-25","lts":false,"security":false},{"name":"nodejs","version":"15.8.0","date":"2021-02-02","lts":false,"security":false},{"name":"nodejs","version":"15.9.0","date":"2021-02-18","lts":false,"security":false},{"name":"nodejs","version":"15.10.0","date":"2021-02-23","lts":false,"security":true},{"name":"nodejs","version":"15.11.0","date":"2021-03-03","lts":false,"security":false},{"name":"nodejs","version":"15.12.0","date":"2021-03-17","lts":false,"security":false},{"name":"nodejs","version":"15.13.0","date":"2021-03-31","lts":false,"security":false},{"name":"nodejs","version":"15.14.0","date":"2021-04-06","lts":false,"security":false},{"name":"nodejs","version":"16.0.0","date":"2021-04-20","lts":false,"security":false},{"name":"nodejs","version":"16.1.0","date":"2021-05-04","lts":false,"security":false},{"name":"nodejs","version":"16.2.0","date":"2021-05-19","lts":false,"security":false},{"name":"nodejs","version":"16.3.0","date":"2021-06-03","lts":false,"security":false},{"name":"nodejs","version":"16.4.0","date":"2021-06-23","lts":false,"security":false},{"name":"nodejs","version":"16.5.0","date":"2021-07-14","lts":false,"security":false},{"name":"nodejs","version":"16.6.0","date":"2021-07-29","lts":false,"security":true},{"name":"nodejs","version":"16.7.0","date":"2021-08-18","lts":false,"security":false},{"name":"nodejs","version":"16.8.0","date":"2021-08-25","lts":false,"security":false},{"name":"nodejs","version":"16.9.0","date":"2021-09-07","lts":false,"security":false},{"name":"nodejs","version":"16.10.0","date":"2021-09-22","lts":false,"security":false},{"name":"nodejs","version":"16.11.0","date":"2021-10-08","lts":false,"security":false},{"name":"nodejs","version":"16.12.0","date":"2021-10-20","lts":false,"security":false},{"name":"nodejs","version":"16.13.0","date":"2021-10-26","lts":"Gallium","security":false},{"name":"nodejs","version":"17.0.0","date":"2021-10-19","lts":false,"security":false},{"name":"nodejs","version":"17.1.0","date":"2021-11-09","lts":false,"security":false},{"name":"nodejs","version":"17.2.0","date":"2021-11-30","lts":false,"security":false},{"name":"nodejs","version":"17.3.0","date":"2021-12-17","lts":false,"security":false},{"name":"nodejs","version":"17.4.0","date":"2022-01-18","lts":false,"security":false}]')},5659:l=>{"use strict";l.exports=JSON.parse('{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"v0.10":{"start":"2013-03-11","end":"2016-10-31"},"v0.12":{"start":"2015-02-06","end":"2016-12-31"},"v4":{"start":"2015-09-08","lts":"2015-10-12","maintenance":"2017-04-01","end":"2018-04-30","codename":"Argon"},"v5":{"start":"2015-10-29","maintenance":"2016-04-30","end":"2016-06-30"},"v6":{"start":"2016-04-26","lts":"2016-10-18","maintenance":"2018-04-30","end":"2019-04-30","codename":"Boron"},"v7":{"start":"2016-10-25","maintenance":"2017-04-30","end":"2017-06-30"},"v8":{"start":"2017-05-30","lts":"2017-10-31","maintenance":"2019-01-01","end":"2019-12-31","codename":"Carbon"},"v9":{"start":"2017-10-01","maintenance":"2018-04-01","end":"2018-06-30"},"v10":{"start":"2018-04-24","lts":"2018-10-30","maintenance":"2020-05-19","end":"2021-04-30","codename":"Dubnium"},"v11":{"start":"2018-10-23","maintenance":"2019-04-22","end":"2019-06-01"},"v12":{"start":"2019-04-23","lts":"2019-10-21","maintenance":"2020-11-30","end":"2022-04-30","codename":"Erbium"},"v13":{"start":"2019-10-22","maintenance":"2020-04-01","end":"2020-06-01"},"v14":{"start":"2020-04-21","lts":"2020-10-27","maintenance":"2021-10-19","end":"2023-04-30","codename":"Fermium"},"v15":{"start":"2020-10-20","maintenance":"2021-04-01","end":"2021-06-01"},"v16":{"start":"2021-04-20","lts":"2021-10-26","maintenance":"2022-10-18","end":"2024-04-30","codename":"Gallium"},"v17":{"start":"2021-10-19","maintenance":"2022-04-01","end":"2022-06-01"},"v18":{"start":"2022-04-19","lts":"2022-10-25","maintenance":"2023-10-18","end":"2025-04-30","codename":""}}')},8360:l=>{"use strict";l.exports=JSON.parse('{"list-style-type":["afar","amharic","amharic-abegede","arabic-indic","armenian","asterisks","bengali","binary","cambodian","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","decimal","decimal-leading-zero","devanagari","disc","disclosure-closed","disclosure-open","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","footnotes","georgian","gujarati","gurmukhi","hangul","hangul-consonant","hebrew","hiragana","hiragana-iroha","japanese-formal","japanese-informal","kannada","katakana","katakana-iroha","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","lao","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","malayalam","mongolian","myanmar","octal","oriya","oromo","persian","sidama","simp-chinese-formal","simp-chinese-informal","somali","square","string","symbols","tamil","telugu","thai","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","trad-chinese-formal","trad-chinese-informal","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","urdu"]}')},173:l=>{"use strict";l.exports=JSON.parse('{"-webkit-line-clamp":"none","accent-color":"auto","align-content":"normal","align-items":"normal","align-self":"auto","align-tracks":"normal","animation-delay":"0s","animation-direction":"normal","animation-duration":"0s","animation-fill-mode":"none","animation-iteration-count":"1","animation-name":"none","animation-timing-function":"ease","appearance":"auto","aspect-ratio":"auto","azimuth":"center","backdrop-filter":"none","background-attachment":"scroll","background-blend-mode":"normal","background-image":"none","background-position":"0% 0%","background-position-x":"left","background-position-y":"top","background-repeat":"repeat","block-overflow":"clip","block-size":"auto","border-block-style":"none","border-block-width":"medium","border-block-end-style":"none","border-block-end-width":"medium","border-block-start-style":"none","border-block-start-width":"medium","border-bottom-left-radius":"0","border-bottom-right-radius":"0","border-bottom-style":"none","border-bottom-width":"medium","border-end-end-radius":"0","border-end-start-radius":"0","border-image-outset":"0","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-inline-style":"none","border-inline-width":"medium","border-inline-end-style":"none","border-inline-end-width":"medium","border-inline-start-style":"none","border-inline-start-width":"medium","border-left-style":"none","border-left-width":"medium","border-right-style":"none","border-right-width":"medium","border-spacing":"0","border-start-end-radius":"0","border-start-start-radius":"0","border-top-left-radius":"0","border-top-right-radius":"0","border-top-style":"none","border-top-width":"medium","bottom":"auto","box-decoration-break":"slice","box-shadow":"none","break-after":"auto","break-before":"auto","break-inside":"auto","caption-side":"top","caret-color":"auto","clear":"none","clip":"auto","clip-path":"none","color-scheme":"normal","column-count":"auto","column-gap":"normal","column-rule-style":"none","column-rule-width":"medium","column-span":"none","column-width":"auto","contain":"none","content":"normal","counter-increment":"none","counter-reset":"none","counter-set":"none","cursor":"auto","direction":"ltr","empty-cells":"show","filter":"none","flex-basis":"auto","flex-direction":"row","flex-grow":"0","flex-shrink":"1","flex-wrap":"nowrap","float":"none","font-feature-settings":"normal","font-kerning":"auto","font-language-override":"normal","font-optical-sizing":"auto","font-variation-settings":"normal","font-size":"medium","font-size-adjust":"none","font-stretch":"normal","font-style":"normal","font-variant":"normal","font-variant-alternates":"normal","font-variant-caps":"normal","font-variant-east-asian":"normal","font-variant-ligatures":"normal","font-variant-numeric":"normal","font-variant-position":"normal","font-weight":"normal","forced-color-adjust":"auto","grid-auto-columns":"auto","grid-auto-flow":"row","grid-auto-rows":"auto","grid-column-end":"auto","grid-column-gap":"0","grid-column-start":"auto","grid-row-end":"auto","grid-row-gap":"0","grid-row-start":"auto","grid-template-areas":"none","grid-template-columns":"none","grid-template-rows":"none","hanging-punctuation":"none","height":"auto","hyphens":"manual","image-rendering":"auto","image-resolution":"1dppx","ime-mode":"auto","initial-letter":"normal","initial-letter-align":"auto","inline-size":"auto","inset":"auto","inset-block":"auto","inset-block-end":"auto","inset-block-start":"auto","inset-inline":"auto","inset-inline-end":"auto","inset-inline-start":"auto","isolation":"auto","justify-content":"normal","justify-items":"legacy","justify-self":"auto","justify-tracks":"normal","left":"auto","letter-spacing":"normal","line-break":"auto","line-clamp":"none","line-height":"normal","line-height-step":"0","list-style-image":"none","list-style-type":"disc","margin-block":"0","margin-block-end":"0","margin-block-start":"0","margin-bottom":"0","margin-inline":"0","margin-inline-end":"0","margin-inline-start":"0","margin-left":"0","margin-right":"0","margin-top":"0","margin-trim":"none","mask-border-mode":"alpha","mask-border-outset":"0","mask-border-slice":"0","mask-border-source":"none","mask-border-width":"auto","mask-composite":"add","mask-image":"none","mask-position":"center","mask-repeat":"repeat","mask-size":"auto","masonry-auto-flow":"pack","math-style":"normal","max-block-size":"0","max-height":"none","max-inline-size":"0","max-lines":"none","max-width":"none","min-block-size":"0","min-height":"auto","min-inline-size":"0","min-width":"auto","mix-blend-mode":"normal","object-fit":"fill","offset-anchor":"auto","offset-distance":"0","offset-path":"none","offset-position":"auto","offset-rotate":"auto","opacity":"1.0","order":"0","orphans":"2","outline-offset":"0","outline-style":"none","outline-width":"medium","overflow-anchor":"auto","overflow-block":"auto","overflow-clip-margin":"0px","overflow-inline":"auto","overflow-wrap":"normal","overscroll-behavior":"auto","overscroll-behavior-block":"auto","overscroll-behavior-inline":"auto","overscroll-behavior-x":"auto","overscroll-behavior-y":"auto","padding-block":"0","padding-block-end":"0","padding-block-start":"0","padding-bottom":"0","padding-inline":"0","padding-inline-end":"0","padding-inline-start":"0","padding-left":"0","padding-right":"0","padding-top":"0","page-break-after":"auto","page-break-before":"auto","page-break-inside":"auto","paint-order":"normal","perspective":"none","place-content":"normal","pointer-events":"auto","position":"static","resize":"none","right":"auto","rotate":"none","row-gap":"normal","scale":"none","scrollbar-color":"auto","scrollbar-gutter":"auto","scrollbar-width":"auto","scroll-behavior":"auto","scroll-margin":"0","scroll-margin-block":"0","scroll-margin-block-start":"0","scroll-margin-block-end":"0","scroll-margin-bottom":"0","scroll-margin-inline":"0","scroll-margin-inline-start":"0","scroll-margin-inline-end":"0","scroll-margin-left":"0","scroll-margin-right":"0","scroll-margin-top":"0","scroll-padding":"auto","scroll-padding-block":"auto","scroll-padding-block-start":"auto","scroll-padding-block-end":"auto","scroll-padding-bottom":"auto","scroll-padding-inline":"auto","scroll-padding-inline-start":"auto","scroll-padding-inline-end":"auto","scroll-padding-left":"auto","scroll-padding-right":"auto","scroll-padding-top":"auto","scroll-snap-align":"none","scroll-snap-coordinate":"none","scroll-snap-points-x":"none","scroll-snap-points-y":"none","scroll-snap-stop":"normal","scroll-snap-type":"none","scroll-snap-type-x":"none","scroll-snap-type-y":"none","shape-image-threshold":"0.0","shape-margin":"0","shape-outside":"none","tab-size":"8","table-layout":"auto","text-align-last":"auto","text-combine-upright":"none","text-decoration-line":"none","text-decoration-skip-ink":"auto","text-decoration-style":"solid","text-decoration-thickness":"auto","text-emphasis-style":"none","text-indent":"0","text-justify":"auto","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-transform":"none","text-underline-offset":"auto","text-underline-position":"auto","top":"auto","touch-action":"auto","transform":"none","transform-style":"flat","transition-delay":"0s","transition-duration":"0s","transition-property":"all","transition-timing-function":"ease","translate":"none","unicode-bidi":"normal","user-select":"auto","white-space":"normal","widows":"2","width":"auto","will-change":"auto","word-break":"normal","word-spacing":"normal","word-wrap":"normal","z-index":"auto"}')},7433:l=>{"use strict";l.exports=JSON.parse('{"background-clip":"border-box","background-color":"transparent","background-origin":"padding-box","background-size":"auto auto","border-block-color":"currentcolor","border-block-end-color":"currentcolor","border-block-start-color":"currentcolor","border-bottom-color":"currentcolor","border-collapse":"separate","border-inline-color":"currentcolor","border-inline-end-color":"currentcolor","border-inline-start-color":"currentcolor","border-left-color":"currentcolor","border-right-color":"currentcolor","border-top-color":"currentcolor","box-sizing":"content-box","column-rule-color":"currentcolor","font-synthesis":"weight style","image-orientation":"from-image","mask-clip":"border-box","mask-mode":"match-source","mask-origin":"border-box","mask-type":"luminance","ruby-align":"space-around","ruby-merge":"separate","ruby-position":"alternate","text-decoration-color":"currentcolor","text-emphasis-color":"currentcolor","text-emphasis-position":"over right","transform-box":"view-box","transform-origin":"50% 50% 0","vertical-align":"baseline","writing-mode":"horizontal-tb"}')},4338:l=>{"use strict";l.exports=__nccwpck_require__(613)},4971:l=>{"use strict";l.exports=__nccwpck_require__(768)},30:l=>{"use strict";l.exports=__nccwpck_require__(711)},9761:l=>{"use strict";l.exports=__nccwpck_require__(225)},5747:l=>{"use strict";l.exports=__nccwpck_require__(147)},5622:l=>{"use strict";l.exports=__nccwpck_require__(17)},2043:l=>{"use strict";l.exports=__nccwpck_require__(977)},1669:l=>{"use strict";l.exports=__nccwpck_require__(837)}};var __webpack_module_cache__={};function __nccwpck_require2_(l){var v=__webpack_module_cache__[l];if(v!==undefined){return v.exports}var m=__webpack_module_cache__[l]={exports:{}};var y=true;try{__webpack_modules__[l].call(m.exports,m,m.exports,__nccwpck_require2_);y=false}finally{if(y)delete __webpack_module_cache__[l]}return m.exports}(()=>{__nccwpck_require2_.o=(l,v)=>Object.prototype.hasOwnProperty.call(l,v)})();if(typeof __nccwpck_require2_!=="undefined")__nccwpck_require2_.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require2_(4351);module.exports=__webpack_exports__})()},770:(l,v,m)=>{const y=m(304);l.exports=(l={},v=m(977))=>{const _=Boolean(l&&l.excludeAll);const w=Object.assign({},l);if(_){for(const l in w){if(!w.hasOwnProperty(l))continue;const v=w[l];if(!Boolean(v)){continue}if(Object.prototype.toString.call(v)==="[object Object]"){w[l]=Object.assign({},{exclude:false},v)}}}const k=Object.assign({},_?{rawCache:true}:undefined,w);const S=[];y(k).plugins.forEach((l=>{if(Array.isArray(l)){let[v,m]=l;v=v.default||v;const y=!_&&typeof m==="undefined"||typeof m==="boolean"&&m||!_&&m&&typeof m==="object"&&!m.exclude||_&&m&&typeof m==="object"&&m.exclude===false;if(y){S.push(v(m))}}else{S.push(l)}}));return v(S)};l.exports.postcss=true},613:l=>{"use strict";l.exports=require("caniuse-lite")},768:l=>{"use strict";l.exports=require("caniuse-lite/dist/unpacker/agents")},711:l=>{"use strict";l.exports=require("caniuse-lite/dist/unpacker/feature")},225:l=>{"use strict";l.exports=require("caniuse-lite/dist/unpacker/region")},147:l=>{"use strict";l.exports=require("fs")},17:l=>{"use strict";l.exports=require("path")},977:l=>{"use strict";l.exports=require("postcss")},837:l=>{"use strict";l.exports=require("util")}};var __webpack_module_cache__={};function __nccwpck_require__(l){var v=__webpack_module_cache__[l];if(v!==undefined){return v.exports}var m=__webpack_module_cache__[l]={exports:{}};var y=true;try{__webpack_modules__[l](m,m.exports,__nccwpck_require__);y=false}finally{if(y)delete __webpack_module_cache__[l]}return m.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(770);module.exports=__webpack_exports__})(); \ No newline at end of file +38:1},rules:[/^(?:\s+)/i,/^(?:(-(webkit|moz)-)?calc\b)/i,/^(?:[a-z][\d\-a-z]*\s*\((?:(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|\([^)]*\)|[^()]*)*\))/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)em\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)ex\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)ch\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)rem\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vw\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vh\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vmin\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)vmax\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)cm\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)mm\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)Q\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)in\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)pt\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)pc\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)px\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)deg\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)grad\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)rad\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)turn\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)s\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)ms\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)Hz\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)kHz\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)dpi\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)dpcm\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)dppx\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)%)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)\b)/i,/^(?:((\d+(\.\d+)?|\.\d+)(e(\+|-)\d+)?)-?([^\W\d]|[ -ÿ]|(\\[\dA-Fa-f]{1,6}(\r\n|[\t\n\f\r ])?|\\[^\d\n\f\rA-Fa-f]))([\w\-]|[ -ÿ]|(\\[\dA-Fa-f]{1,6}(\r\n|[\t\n\f\r ])?|\\[^\d\n\f\rA-Fa-f]))*\b)/i,/^(?:\()/i,/^(?:\))/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:true}}};return l}();l.lexer=m;function Parser(){this.yy={}}Parser.prototype=l;l.Parser=Parser;return new Parser}();if(true){m.parser=v;m.Parser=v.Parser;m.parse=function(){return v.parse.apply(v,arguments)}}},8258:(l,m,v)=>{"use strict";const y=v(4907);const{isSupported:w}=v(6615);const _=v(2045);const k=v(3922);function walk(l,m){l.nodes.forEach(((v,y)=>{const w=m(v,y,l);if(v.type==="function"&&w!==false){walk(v,m)}}))}const S=new Set(["ie 8","ie 9"]);const E=new Set(["calc","min","max","clamp"]);function isMathFunctionNode(l){if(l.type!=="function"){return false}return E.has(l.value.toLowerCase())}function transform(l,m){const v=_(l);walk(v,((l,v,y)=>{if(l.type==="function"){if(/^(rgb|hsl)a?$/i.test(l.value)){const{value:w}=l;l.value=k(_.stringify(l),m);l.type="word";const S=y.nodes[v+1];if(l.value!==w&&S&&(S.type==="word"||S.type==="function")){y.nodes.splice(v+1,0,{type:"space",value:" "})}}else if(isMathFunctionNode(l)){return false}}else if(l.type==="word"){l.value=k(l.value,m)}}));return v.toString()}function addPluginDefaults(l,m){const v={transparent:m.some((l=>S.has(l)))===false,alphaHex:w("css-rrggbbaa",m),name:true};return{...v,...l}}function pluginCreator(l={}){return{postcssPlugin:"postcss-colormin",prepare(m){const v=m.opts||{};const w=y(null,{stats:v.stats,path:__dirname,env:v.env});const _=new Map;const k=addPluginDefaults(l,w);return{OnceExit(l){l.walkDecls((l=>{if(/^(composes|font|src$|filter|-webkit-tap-highlight-color)/i.test(l.prop)){return}const m=l.value;if(!m){return}const v=JSON.stringify({value:m,options:k,browsers:w});if(_.has(v)){l.value=_.get(v);return}const y=transform(m,k);l.value=y;_.set(v,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},3922:(l,m,v)=>{"use strict";const{colord:y,extend:w}=v(3251);const _=v(2338);const k=v(47);w([_,k]);l.exports=function minifyColor(l,m={}){const v=y(l);if(v.isValid()){const y=v.minify(m);return y.length{"use strict";const y=v(2045);const w=v(4907);const _=v(6771);const k=new Set(["em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","q","in","pt","pc","px"]);const S=new Set(["descent-override","ascent-override","font-stretch","size-adjust","line-gap-override"]);const E=new Set(["stroke-dashoffset","stroke-width","line-height"]);const C=new Set(["max-height","height","min-width"]);function stripLeadingDot(l){if(l.charCodeAt(0)===".".charCodeAt(0)){return l.slice(1)}else{return l}}function parseWord(l,m,v){const w=y.unit(l.value);if(w){const y=Number(w.number);const S=stripLeadingDot(w.unit);if(y===0){l.value=0+(v||!k.has(S.toLowerCase())&&S!=="%"?S:"")}else{l.value=_(y,S,m);if(typeof m.precision==="number"&&S.toLowerCase()==="px"&&w.number.includes(".")){const v=Math.pow(10,m.precision);l.value=Math.round(parseFloat(l.value)*v)/v+S}}}}function clampOpacity(l){const m=y.unit(l.value);if(!m){return}let v=Number(m.number);if(v>1){l.value=m.unit==="%"?v+m.unit:1+m.unit}else if(v<0){l.value=0+m.unit}}function shouldKeepZeroUnit(l,m){const{parent:v}=l;const y=l.prop.toLowerCase();return l.value.includes("%")&&C.has(y)&&m.includes("ie 11")||v&&v.parent&&v.parent.type==="atrule"&&v.parent.name.toLowerCase()==="keyframes"&&y==="stroke-dasharray"||E.has(y)}function transform(l,m,v){const w=v.prop.toLowerCase();if(w.includes("flex")||w.indexOf("--")===0||S.has(w)){return}v.value=y(v.value).walk((_=>{const k=_.value.toLowerCase();if(_.type==="word"){parseWord(_,l,shouldKeepZeroUnit(v,m));if(w==="opacity"||w==="shape-image-threshold"){clampOpacity(_)}}else if(_.type==="function"){if(k==="calc"||k==="min"||k==="max"||k==="clamp"||k==="hsl"||k==="hsla"){y.walk(_.nodes,(m=>{if(m.type==="word"){parseWord(m,l,true)}}));return false}if(k==="url"){return false}}})).toString()}const O="postcss-convert-values";function pluginCreator(l={precision:false}){const m=w(null,{stats:l.stats,path:__dirname,env:l.env});return{postcssPlugin:O,OnceExit(v){v.walkDecls((v=>transform(l,m,v)))}}}pluginCreator.postcss=true;l.exports=pluginCreator},6771:l=>{"use strict";const m=new Map([["in",96],["px",1],["pt",4/3],["pc",16]]);const v=new Map([["s",1e3],["ms",1]]);const y=new Map([["turn",360],["deg",1]]);function dropLeadingZero(l){const m=String(l);if(l%1){if(m[0]==="0"){return m.slice(1)}if(m[0]==="-"&&m[1]==="0"){return"-"+m.slice(2)}}return m}function transform(l,m,v){let y=[...v.keys()].filter((l=>m!==l));const w=l*v.get(m);return y.map((l=>dropLeadingZero(w/v.get(l))+l)).reduce(((l,m)=>l.length{"use strict";const y=v(1854);const w=v(6512);function pluginCreator(l={}){const m=new y(l);const v=new Map;const _=new Map;function matchesComments(l){if(v.has(l)){return v.get(l)}const m=w(l).filter((([l])=>l));v.set(l,m);return m}function replaceComments(l,v,y=" "){const k=l+"@|@"+y;if(_.has(k)){return _.get(k)}const S=w(l).reduce(((v,[w,_,k])=>{const S=l.slice(_,k);if(!w){return v+S}if(m.canRemove(S)){return v+y}return`${v}/*${S}*/`}),"");const E=v(S).join(" ");_.set(k,E);return E}return{postcssPlugin:"postcss-discard-comments",OnceExit(l,{list:v}){l.walk((l=>{if(l.type==="comment"&&m.canRemove(l.text)){l.remove();return}if(typeof l.raws.between==="string"){l.raws.between=replaceComments(l.raws.between,v.space)}if(l.type==="decl"){if(l.raws.value&&l.raws.value.raw){if(l.raws.value.value===l.value){l.value=replaceComments(l.raws.value.raw,v.space)}else{l.value=replaceComments(l.value,v.space)}l.raws.value=null}if(l.raws.important){l.raws.important=replaceComments(l.raws.important,v.space);const m=matchesComments(l.raws.important);l.raws.important=m.length?l.raws.important:"!important"}else{l.value=replaceComments(l.value,v.space)}return}if(l.type==="rule"&&l.raws.selector&&l.raws.selector.raw){l.raws.selector.raw=replaceComments(l.raws.selector.raw,v.space,"");return}if(l.type==="atrule"){if(l.raws.afterName){const m=replaceComments(l.raws.afterName,v.space);if(!m.length){l.raws.afterName=m+" "}else{l.raws.afterName=" "+m+" "}}if(l.raws.params&&l.raws.params.raw){l.raws.params.raw=replaceComments(l.raws.params.raw,v.space)}}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},6512:l=>{"use strict";l.exports=function commentParser(l){const m=[];const v=l.length;let y=0;let w;while(y{"use strict";function CommentRemover(l){this.options=l}CommentRemover.prototype.canRemove=function(l){const m=this.options.remove;if(m){return m(l)}else{const m=l.indexOf("!")===0;if(!m){return true}if(this.options.removeAll||this._hasFirst){return true}else if(this.options.removeAllButFirst&&!this._hasFirst){this._hasFirst=true;return false}}};l.exports=CommentRemover},5138:l=>{"use strict";function trimValue(l){return l?l.trim():l}function empty(l){return!l.nodes.filter((l=>l.type!=="comment")).length}function equals(l,m){const v=l;const y=m;if(v.type!==y.type){return false}if(v.important!==y.important){return false}if(v.raws&&!y.raws||!v.raws&&y.raws){return false}switch(v.type){case"rule":if(v.selector!==y.selector){return false}break;case"atrule":if(v.name!==y.name||v.params!==y.params){return false}if(v.raws&&trimValue(v.raws.before)!==trimValue(y.raws.before)){return false}if(v.raws&&trimValue(v.raws.afterName)!==trimValue(y.raws.afterName)){return false}break;case"decl":if(v.prop!==y.prop||v.value!==y.value){return false}if(v.raws&&trimValue(v.raws.before)!==trimValue(y.raws.before)){return false}break}if(v.nodes){if(v.nodes.length!==y.nodes.length){return false}for(let l=0;l=0){const y=m[v--];if(y&&y.type==="rule"&&y.selector===l.selector){l.each((l=>{if(l.type==="decl"){dedupeNode(l,y.nodes)}}));if(empty(y)){y.remove()}}}}function dedupeNode(l,m){let v=m.includes(l)?m.indexOf(l)-1:m.length-1;while(v>=0){const y=m[v--];if(y&&equals(y,l)){y.remove()}}}function dedupe(l){const{nodes:m}=l;if(!m){return}let v=m.length-1;while(v>=0){let l=m[v--];if(!l||!l.parent){continue}dedupe(l);if(l.type==="rule"){dedupeRule(l,m)}else if(l.type==="atrule"||l.type==="decl"){dedupeNode(l,m)}}}function pluginCreator(){return{postcssPlugin:"postcss-discard-duplicates",OnceExit(l){dedupe(l)}}}pluginCreator.postcss=true;l.exports=pluginCreator},6742:l=>{"use strict";const m="postcss-discard-empty";function discardAndReport(l,v){function discardEmpty(l){const{type:y}=l;const w=l.nodes;if(w){l.each(discardEmpty)}if(y==="decl"&&!l.value&&!l.prop.startsWith("--")||y==="rule"&&!l.selector||w&&!w.length||y==="atrule"&&(!w&&!l.params||!l.params&&!w.length)){l.remove();v.messages.push({type:"removal",plugin:m,node:l})}}l.each(discardEmpty)}function pluginCreator(){return{postcssPlugin:m,OnceExit(l,{result:m}){discardAndReport(l,m)}}}pluginCreator.postcss=true;l.exports=pluginCreator},5501:l=>{"use strict";const m=new Set(["keyframes","counter-style"]);const v=new Set(["media","supports"]);function vendorUnprefixed(l){return l.replace(/^-\w+-/,"")}function isOverridable(l){return m.has(vendorUnprefixed(l.toLowerCase()))}function isScope(l){return v.has(vendorUnprefixed(l.toLowerCase()))}function getScope(l){let m=l.parent;const v=[l.name.toLowerCase(),l.params];while(m){if(m.type==="atrule"&&isScope(m.name)){v.unshift(m.name+" "+m.params)}m=m.parent}return v.join("|")}function pluginCreator(){return{postcssPlugin:"postcss-discard-overridden",prepare(){const l=new Map;const m=[];return{OnceExit(v){v.walkAtRules((v=>{if(isOverridable(v.name)){const y=getScope(v);l.set(y,v);m.push({node:v,scope:y})}}));m.forEach((m=>{if(l.get(m.scope)!==m.node){m.node.remove()}}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},5856:(l,m,v)=>{"use strict";const y=v(7296);function pluginCreator(){return{postcssPlugin:"postcss-merge-longhand",OnceExit(l){l.walkRules((l=>{y.forEach((m=>{m.explode(l);m.merge(l)}))}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},614:(l,m,v)=>{"use strict";const y=v(146);const w=new Set(["inherit","initial","unset","revert"]);l.exports=(l,m=true)=>{if(!l.value||m&&y(l)||l.value&&w.has(l.value.toLowerCase())){return false}return true}},2907:(l,m,v)=>{"use strict";const y=v(146);const important=l=>l.important;const unimportant=l=>!l.important;const w=["inherit","initial","unset","revert"];l.exports=(l,m=true)=>{const v=new Set(l.map((l=>l.value.toLowerCase())));if(v.size>1){for(const l of w){if(v.has(l)){return false}}}if(m&&l.some(y)&&!l.every(y)){return false}return l.every(unimportant)||l.every(important)}},9304:l=>{"use strict";l.exports=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"])},8370:(l,m,v)=>{"use strict";const{list:y}=v(977);const w=v(5377);const _=v(8868);const k=v(1465);const S=v(9534);const E=v(728);const C=v(6661);const O=v(4297);const P=v(2462);const L=v(9867);const T=v(6408);const R=v(2907);const D=v(6363);const A=v(146);const q=v(614);const F=v(6682);const $=v(7371);const{isValidWsc:z}=v(4529);const V=["width","style","color"];const U=["medium","none","currentcolor"];const W=/(hsla|rgba|color|hwb|lab|lch|oklab|oklch)\(/i;function borderProperty(...l){return`border-${l.join("-")}`}function mapBorderProperty(l){return borderProperty(l)}const B=D.map(mapBorderProperty);const Q=V.map(mapBorderProperty);const Y=B.reduce(((l,m)=>l.concat(V.map((l=>`${m}-${l}`)))),[]);const G=[["border"],B.concat(Q),Y];const J=G.reduce(((l,m)=>l.concat(m)));function getLevel(l){for(let m=0;ml!==undefined&&l.search(/var\s*\(\s*--/i)!==-1;function canMergeValues(l){return!l.some(isValueCustomProp)}function getColorValue(l){if(l.prop.substr(-5)==="color"){return l.value}return $(l.value)[2]||U[2]}function diffingProps(l,m){return V.reduce(((v,y,w)=>{if(l[w]===m[w]){return v}return[...v,y]}),[])}function mergeRedundant({values:l,nextValues:m,decl:v,nextDecl:y,index:_}){if(!R([v,y])){return}if(w.detect(v)||w.detect(y)){return}const S=diffingProps(l,m);if(S.length!==1){return}const E=S.pop();const C=V.indexOf(E);const O=`${y.prop}-${E}`;const P=`border-${E}`;let D=k(l[C]);D[_]=m[C];const A=l.filter(((l,m)=>m!==C)).join(" ");const q=L(D);const F=(T(v.value)+y.prop+y.value).length;const $=v.value.length+O.length+T(m[C]).length;const z=A.length+P.length+q.length;if(${if(!q(l,false)){return}if(w.detect(l)){return}const m=l.prop.toLowerCase();if(m==="border"){if(z($(l.value))){B.forEach((m=>{_(l.parent,l,{prop:m})}));l.remove()}}if(B.some((l=>m===l))){let v=$(l.value);if(z(v)){V.forEach(((y,w)=>{_(l.parent,l,{prop:`${m}-${y}`,value:v[w]||U[w]})}));l.remove()}}V.some((v=>{if(m!==borderProperty(v)){return false}if(A(l)){l.prop=l.prop.toLowerCase();return false}k(l.value).forEach(((m,y)=>{_(l.parent,l,{prop:borderProperty(D[y],v),value:m})}));return l.remove()}))}))}function merge(l){D.forEach((m=>{const v=borderProperty(m);P(l,V.map((l=>borderProperty(m,l))),((l,m)=>{if(R(l,false)&&!l.some(w.detect)){_(m.parent,m,{prop:v,value:l.map(O).join(" ")});for(const m of l){m.remove()}return true}return false}))}));V.forEach((m=>{const v=borderProperty(m);P(l,D.map((l=>borderProperty(l,m))),((l,m)=>{if(R(l)&&!l.some(w.detect)){_(m.parent,m,{prop:v,value:L(l.map(O).join(" "))});for(const m of l){m.remove()}return true}return false}))}));P(l,B,((l,m)=>{if(l.some(w.detect)){return false}const v=l.map((({value:l})=>l));if(!canMergeValues(v)){return false}const y=v.map((l=>$(l)));if(!y.every(z)){return false}V.forEach(((l,v)=>{const w=y.map((l=>l[v]||U[v]));if(canMergeValues(w)){_(m.parent,m,{prop:borderProperty(l),value:L(w)})}else{_(m.parent,m)}}));for(const m of l){m.remove()}return true}));P(l,Q,((m,v)=>{if(m.some(w.detect)){return false}const y=m.map((l=>k(l.value)));const S=[0,1,2,3].map((l=>[y[0][l],y[1][l],y[2][l]].join(" ")));if(!canMergeValues(S)){return false}const[E,C,P]=m;const L=getDistinctShorthands(S);if(isCloseEnough(S)&&R(m,false)){const y=S.indexOf(L[0])!==S.lastIndexOf(L[0]);const w=_(v.parent,v,{prop:"border",value:y?L[0]:L[1]});if(L[1]){const m=y?L[1]:L[0];const _=borderProperty(D[S.indexOf(m)]);l.insertAfter(w,Object.assign(v.clone(),{prop:_,value:m}))}for(const l of m){l.remove()}return true}else if(L.length===1){l.insertBefore(P,Object.assign(v.clone(),{prop:"border",value:[E,C].map(O).join(" ")}));m.filter((l=>l.prop.toLowerCase()!==Q[2])).forEach((l=>l.remove()));return true}return false}));P(l,Q,((m,v)=>{if(m.some(w.detect)){return false}const y=m.map((l=>k(l.value)));const _=[0,1,2,3].map((l=>[y[0][l],y[1][l],y[2][l]].join(" ")));const S=getDistinctShorthands(_);const E="medium none currentcolor";if(S.length>1&&S.length<4&&S.includes(E)){const y=_.filter((l=>l!==E));const w=S.sort(((l,m)=>_.filter((l=>l===m)).length-_.filter((m=>m===l)).length))[0];const k=S.length===2?y[0]:w;l.insertBefore(v,Object.assign(v.clone(),{prop:"border",value:k}));B.forEach(((m,y)=>{if(_[y]!==k){l.insertBefore(v,Object.assign(v.clone(),{prop:m,value:_[y]}))}}));for(const l of m){l.remove()}return true}return false}));P(l,B,((m,v)=>{if(m.some(w.detect)){return false}const y=m.map((l=>{const m=$(l.value);if(!z(m)){return l.value}return m.map(((l,m)=>l||U[m])).join(" ")}));const _=getDistinctShorthands(y);if(isCloseEnough(y)){const w=y.indexOf(_[0])!==y.lastIndexOf(_[0]);l.insertBefore(v,Object.assign(v.clone(),{prop:"border",value:T(w?y[0]:y[1])}));if(_[1]){const m=w?_[1]:_[0];const k=B[y.indexOf(m)];l.insertBefore(v,Object.assign(v.clone(),{prop:k,value:T(m)}))}for(const l of m){l.remove()}return true}return false}));B.forEach((m=>{V.forEach(((v,y)=>{const k=`${m}-${v}`;P(l,[m,k],((l,v)=>{if(v.prop!==m){return false}const S=$(v.value);if(!z(S)){return false}const E=l.filter((l=>l!==v))[0];if(!isValueCustomProp(S[y])||A(E)){return false}const C=S[y];S[y]=E.value;if(R(l,false)&&!l.some(w.detect)){_(v.parent,v,{prop:k,value:C});v.value=T(S);E.remove();return true}return false}))}))}));V.forEach(((m,v)=>{const y=borderProperty(m);P(l,["border",y],((l,m)=>{if(m.prop!=="border"){return false}const k=$(m.value);if(!z(k)){return false}const S=l.filter((l=>l!==m))[0];if(!isValueCustomProp(k[v])||A(S)){return false}const E=k[v];k[v]=S.value;if(R(l,false)&&!l.some(w.detect)){_(m.parent,m,{prop:y,value:E});m.value=T(k);S.remove();return true}return false}))}));let m=E(l,B);while(m.length){const v=m[m.length-1];V.forEach(((k,E)=>{const O=B.filter((l=>l!==v.prop)).map((l=>`${l}-${k}`));let P=l.nodes.slice(0,l.nodes.indexOf(v));const T=F(P,"border");if(T){P=P.slice(P.indexOf(T))}const R=P.filter((l=>l.type==="decl"&&O.includes(l.prop)&&l.important===v.important));const D=C(R,O);if(S(D,...O)&&!D.some(w.detect)){const l=D.map((l=>l?l.value:null));const w=l.filter(Boolean);const S=y.space(v.value)[E];l[B.indexOf(v.prop)]=S;let C=L(l.join(" "));if(w[0]===w[1]&&w[1]===w[2]){C=w[0]}let O=R[R.length-1];if(C===S){O=v;let l=y.space(v.value);l.splice(E,1);v.value=l.join(" ")}_(O.parent,O,{prop:borderProperty(k),value:C});m=m.filter((l=>!D.includes(l)));for(const l of D){l.remove()}}}));m=m.filter((l=>l!==v))}l.walkDecls("border",(l=>{const m=l.next();if(!m||m.type!=="decl"){return false}const v=B.indexOf(m.prop);if(v===-1){return}const y=$(l.value);const w=$(m.value);if(!z(y)||!z(w)){return}const _={values:y,nextValues:w,decl:l,nextDecl:m,index:v};return mergeRedundant(_)}));l.walkDecls(/^border($|-(top|right|bottom|left)$)/i,(m=>{let v=$(m.value);if(!z(v)){return}const y=B.indexOf(m.prop);let w=[...B];w.splice(y,1);V.forEach(((y,k)=>{const S=w.map((l=>`${l}-${y}`));P(l,[m.prop,...S],(l=>{if(!l.includes(m)){return false}const w=l.filter((l=>l!==m));if(w[0].value.toLowerCase()===w[1].value.toLowerCase()&&w[1].value.toLowerCase()===w[2].value.toLowerCase()&&v[k]!==undefined&&w[0].value.toLowerCase()===v[k].toLowerCase()){for(const l of w){l.remove()}_(m.parent,m,{prop:borderProperty(y),value:v[k]});v[k]=null}return false}));const E=v.join(" ");if(E){m.value=E}else{m.remove()}}))}));l.walkDecls(/^border($|-(top|right|bottom|left)$)/i,(l=>{l.value=T(l.value)}));l.walkDecls(/^border-spacing$/i,(l=>{const m=y.space(l.value);if(m.length>1&&m[0]===m[1]){l.value=m.slice(1).join(" ")}}));m=E(l,J);while(m.length){const l=m[m.length-1];const v=l.prop.split("-").pop();const y=m.filter((m=>!w.detect(l)&&!w.detect(m)&&!A(l)&&m!==l&&m.important===l.important&&getLevel(m.prop)>getLevel(l.prop)&&(m.prop.toLowerCase().includes(l.prop)||m.prop.toLowerCase().endsWith(v))));for(const l of y){l.remove()}m=m.filter((l=>!y.includes(l)));let _=m.filter((m=>!w.detect(l)&&!w.detect(m)&&m!==l&&m.important===l.important&&m.prop===l.prop&&!(!A(m)&&A(l))));if(_.length){if(W.test(getColorValue(l))){const l=_.filter((l=>!W.test(getColorValue(l)))).pop();_=_.filter((m=>m!==l))}for(const l of _){l.remove()}}m=m.filter((m=>m!==l&&!_.includes(m)))}}l.exports={explode:explode,merge:merge}},607:(l,m,v)=>{"use strict";const y=v(5377);const w=v(2907);const _=v(728);const k=v(9867);const S=v(1465);const E=v(8868);const C=v(2462);const O=v(9048);const P=v(6363);const L=v(146);const T=v(614);l.exports=l=>{const m=P.map((m=>`${l}-${m}`));const cleanup=v=>{let w=_(v,[l].concat(m));while(w.length){const m=w[w.length-1];const v=w.filter((v=>!y.detect(m)&&!y.detect(v)&&v!==m&&v.important===m.important&&m.prop===l&&v.prop!==m.prop));for(const l of v){l.remove()}w=w.filter((l=>!v.includes(l)));let _=w.filter((l=>!y.detect(m)&&!y.detect(l)&&l!==m&&l.important===m.important&&l.prop===m.prop&&!(!L(l)&&L(m))));for(const l of _){l.remove()}w=w.filter((l=>l!==m&&!_.includes(l)))}};const v={explode:v=>{v.walkDecls(new RegExp("^"+l+"$","i"),(l=>{if(!T(l)){return}if(y.detect(l)){return}const v=S(l.value);P.forEach(((y,w)=>{E(l.parent,l,{prop:m[w],value:v[w]})}));l.remove()}))},merge:v=>{C(v,m,((m,v)=>{if(w(m)&&!m.some(y.detect)){E(v.parent,v,{prop:l,value:k(O(...m))});for(const l of m){l.remove()}return true}return false}));cleanup(v)}};return v}},7638:(l,m,v)=>{"use strict";const{list:y}=v(977);const{unit:w}=v(2045);const _=v(5377);const k=v(2907);const S=v(728);const E=v(4297);const C=v(2462);const O=v(8868);const P=v(146);const L=v(614);const T=["column-width","column-count"];const R="auto";const D="inherit";function normalize(l){if(l[0].toLowerCase()===R){return l[1]}if(l[1].toLowerCase()===R){return l[0]}if(l[0].toLowerCase()===D&&l[1].toLowerCase()===D){return D}return l.join(" ")}function explode(l){l.walkDecls(/^columns$/i,(l=>{if(!L(l)){return}if(_.detect(l)){return}let m=y.space(l.value);if(m.length===1){m.push(R)}m.forEach(((m,v)=>{let y=T[1];const _=w(m);if(m.toLowerCase()===R){y=T[v]}else if(_&&_.unit!==""){y=T[0]}O(l.parent,l,{prop:y,value:m})}));l.remove()}))}function cleanup(l){let m=S(l,["columns"].concat(T));while(m.length){const l=m[m.length-1];const v=m.filter((m=>!_.detect(l)&&!_.detect(m)&&m!==l&&m.important===l.important&&l.prop==="columns"&&m.prop!==l.prop));for(const l of v){l.remove()}m=m.filter((l=>!v.includes(l)));let y=m.filter((m=>!_.detect(l)&&!_.detect(m)&&m!==l&&m.important===l.important&&m.prop===l.prop&&!(!P(m)&&P(l))));for(const l of y){l.remove()}m=m.filter((m=>m!==l&&!y.includes(m)))}}function merge(l){C(l,T,((l,m)=>{if(k(l)&&!l.some(_.detect)){O(m.parent,m,{prop:"columns",value:normalize(l.map(E))});for(const m of l){m.remove()}return true}return false}));cleanup(l)}l.exports={explode:explode,merge:merge}},7296:(l,m,v)=>{"use strict";const y=v(8370);const w=v(7638);const _=v(9817);const k=v(878);l.exports=[y,w,_,k]},9817:(l,m,v)=>{"use strict";const y=v(607);l.exports=y("margin")},878:(l,m,v)=>{"use strict";const y=v(607);l.exports=y("padding")},728:l=>{"use strict";l.exports=function getDecls(l,m){return l.nodes.filter((l=>l.type==="decl"&&m.includes(l.prop.toLowerCase())))}},6682:l=>{"use strict";l.exports=(l,m)=>l.filter((l=>l.type==="decl"&&l.prop.toLowerCase()===m)).pop()},6661:(l,m,v)=>{"use strict";const y=v(6682);l.exports=function getRules(l,m){return m.map((m=>y(l,m))).filter(Boolean)}},4297:l=>{"use strict";l.exports=function getValue({value:l}){return l}},9534:l=>{"use strict";l.exports=(l,...m)=>m.every((m=>l.some((l=>l.prop&&l.prop.toLowerCase().includes(m)))))},8868:l=>{"use strict";l.exports=function insertCloned(l,m,v){const y=Object.assign(m.clone(),v);l.insertAfter(m,y);return y}},146:l=>{"use strict";l.exports=l=>l.value.search(/var\s*\(\s*--/i)!==-1},2462:(l,m,v)=>{"use strict";const y=v(9534);const w=v(728);const _=v(6661);function isConflictingProp(l,m){if(!m.prop||m.important!==l.important||l.prop===m.prop){return false}const v=l.prop.split("-");const y=m.prop.split("-");if(v[0]!==y[0]){return false}const w=new Set(v);return y.every((l=>w.has(l)))}function hasConflicts(l,m){const v=Math.min(...l.map((l=>m.indexOf(l))));const y=Math.max(...l.map((l=>m.indexOf(l))));const w=m.slice(v+1,y);return l.some((l=>w.some((m=>isConflictingProp(l,m)))))}l.exports=function mergeRules(l,m,v){let k=w(l,m);while(k.length){const w=k[k.length-1];const S=k.filter((l=>l.important===w.important));const E=_(S,m);if(y(E,...m)&&!hasConflicts(E,l.nodes)){if(v(E,w,S)){k=k.filter((l=>!E.includes(l)))}}k=k.filter((l=>l!==w))}}},9048:(l,m,v)=>{"use strict";const y=v(4297);l.exports=(...l)=>l.map(y).join(" ")},9867:(l,m,v)=>{"use strict";const y=v(1465);l.exports=l=>{const m=y(l);if(m[3]===m[1]){m.pop();if(m[2]===m[0]){m.pop();if(m[0]===m[1]){m.pop()}}}return m.join(" ")}},6408:(l,m,v)=>{"use strict";const y=v(7371);const w=v(9867);const{isValidWsc:_}=v(4529);const k=["medium","none","currentcolor"];l.exports=l=>{const m=y(l);if(!_(m)){return w(l)}const v=[...m,""].reduceRight(((l,m,v,y)=>{if(m===undefined||m.toLowerCase()===k[v]&&(!v||(y[v-1]||"").toLowerCase()!==m.toLowerCase())){return l}return m+" "+l})).trim();return w(v||"none")}},1465:(l,m,v)=>{"use strict";const{list:y}=v(977);l.exports=l=>{const m=typeof l==="string"?y.space(l):l;return[m[0],m[1]||m[0],m[2]||m[0],m[3]||m[1]||m[0]]}},7371:(l,m,v)=>{"use strict";const{list:y}=v(977);const{isWidth:w,isStyle:_,isColor:k}=v(4529);const S=/^\s*(none|medium)(\s+none(\s+(none|currentcolor))?)?\s*$/i;const E=/--(\w|-|[^\x00-\x7F])+/g;const toLower=l=>{let m;let v=0;let y="";E.lastIndex=0;while((m=E.exec(l))!==null){if(m.index>v){y+=l.substring(v,m.index).toLowerCase()}y+=m[0];v=m.index+m[0].length}if(v1&&_(C[1])&&C[0].toLowerCase()==="none"){C.unshift();m="0"}const O=[];C.forEach((l=>{if(_(l)){v=toLower(l)}else if(w(l)){m=toLower(l)}else if(k(l)){E=toLower(l)}else{O.push(l)}}));if(O.length){if(!m&&v&&E){m=O.pop()}if(m&&!v&&E){v=O.pop()}if(m&&v&&!E){E=O.pop()}}return[m,v,E]}},6363:l=>{"use strict";l.exports=["top","right","bottom","left"]},4529:(l,m,v)=>{"use strict";const y=v(9304);const w=new Set(["thin","medium","thick"]);const _=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"]);function isStyle(l){return l!==undefined&&_.has(l.toLowerCase())}function isWidth(l){return l&&w.has(l.toLowerCase())||/^(\d+(\.\d+)?|\.\d+)(\w+)?$/.test(l)}function isColor(l){if(!l){return false}l=l.toLowerCase();if(/rgba?\(/.test(l)){return true}if(/hsla?\(/.test(l)){return true}if(/#([0-9a-z]{6}|[0-9a-z]{3})/.test(l)){return true}if(l==="transparent"){return true}if(l==="currentcolor"){return true}return y.has(l)}function isValidWsc(l){const m=isWidth(l[0]);const v=isStyle(l[1]);const y=isColor(l[2]);return m&&v||m&&y||v&&y}l.exports={isStyle:isStyle,isWidth:isWidth,isColor:isColor,isValidWsc:isValidWsc}},3971:(l,m,v)=>{"use strict";const y=v(4907);const{sameParent:w}=v(39);const{ensureCompatibility:_,sameVendor:k,noVendor:S}=v(3539);function declarationIsEqual(l,m){return l.important===m.important&&l.prop===m.prop&&l.value===m.value}function indexOfDeclaration(l,m){return l.findIndex((l=>declarationIsEqual(l,m)))}function intersect(l,m,v){return l.filter((l=>{const y=indexOfDeclaration(m,l)!==-1;return v?!y:y}))}function sameDeclarationsAndOrder(l,m){if(l.length!==m.length){return false}return l.every(((l,v)=>declarationIsEqual(l,m[v])))}function canMerge(l,m,v,y){const E=l.selectors;const C=m.selectors;const O=E.concat(C);if(!_(O,v,y)){return false}const P=w(l,m);if(P&&l.parent&&l.parent.type==="atrule"&&l.parent.name.includes("keyframes")){return false}return P&&(O.every(S)||k(E,C))}function isDeclaration(l){return l.type==="decl"}function getDecls(l){return l.nodes.filter(isDeclaration)}const joinSelectors=(...l)=>l.map((l=>l.selector)).join();function ruleLength(...l){return l.map((l=>l.nodes.length?String(l):"")).join("").length}function splitProp(l){const m=l.split("-");if(l[0]!=="-"){return{prefix:"",base:m[0],rest:m.slice(1)}}if(l[1]==="-"){return{prefix:null,base:null,rest:[l]}}return{prefix:m[1],base:m[2],rest:m.slice(3)}}function isConflictingProp(l,m){if(l===m){return true}const v=splitProp(l);const y=splitProp(m);if(!v.base&&!y.base){return true}if(v.base!==y.base&&v.base!=="place"&&y.base!=="place"){return false}if(v.rest.length!==y.rest.length){return true}if(v.base==="border"){const l=new Set([...v.rest,...y.rest]);if(l.has("image")||l.has("width")||l.has("color")||l.has("style")){return true}}return v.rest.every(((l,m)=>y.rest[m]===l))}function mergeParents(l,m){if(!l.parent||!m.parent){return false}if(l.parent===m.parent){return false}m.remove();l.parent.append(m);return true}function partialMerge(l,m){let v=intersect(getDecls(l),getDecls(m));if(v.length===0){return m}let y=m.next();if(!y){const l=m.parent.next();y=l&&l.nodes&&l.nodes[0]}if(y&&y.type==="rule"&&canMerge(m,y)){let w=intersect(getDecls(m),getDecls(y));if(w.length>v.length){mergeParents(m,y);l=m;m=y;v=w}}const w=getDecls(l);v=v.filter(((l,m)=>{const y=indexOfDeclaration(w,l);const _=w.slice(y+1).filter((m=>isConflictingProp(m.prop,l.prop)));if(_.length===0){return true}const k=v.slice(m+1).filter((m=>isConflictingProp(m.prop,l.prop)));if(_.length!==k.length){return false}return _.every(((l,m)=>declarationIsEqual(l,k[m])))}));const _=getDecls(m);v=v.filter((l=>{const m=_.findIndex((m=>isConflictingProp(m.prop,l.prop)));if(m===-1){return false}if(!declarationIsEqual(_[m],l)){return false}if(l.prop.toLowerCase()!=="direction"&&l.prop.toLowerCase()!=="unicode-bidi"&&_.some((l=>l.prop.toLowerCase()==="all"))){return false}_.splice(m,1);return true}));if(v.length===0){return m}const k=m.clone();k.selector=joinSelectors(l,m);k.nodes=[];m.parent.insertBefore(m,k);const S=l.clone();const E=m.clone();function moveDecl(l){return m=>{if(indexOfDeclaration(v,m)!==-1){l.call(this,m)}}}S.walkDecls(moveDecl((l=>{l.remove();k.append(l)})));E.walkDecls(moveDecl((l=>l.remove())));const C=ruleLength(S,k,E);const O=ruleLength(l,m);if(C{if(l.nodes.length===0){l.remove()}}));if(!E.parent){return k}return E}else{k.remove();return m}}function selectorMerger(l,m){let v=null;return function(y){if(!v||!canMerge(y,v,l,m)){v=y;return}if(v===y){v=y;return}mergeParents(v,y);if(sameDeclarationsAndOrder(getDecls(y),getDecls(v))){y.selector=joinSelectors(v,y);v.remove();v=y;return}if(v.selector===y.selector){const l=getDecls(v);y.walk((m=>{if(m.type==="decl"&&indexOfDeclaration(l,m)!==-1){m.remove();return}v.append(m)}));y.remove();return}v=partialMerge(v,y)}}function pluginCreator(){return{postcssPlugin:"postcss-merge-rules",prepare(l){const m=l.opts||{};const v=y(null,{stats:m.stats,path:__dirname,env:m.env});const w=new Map;return{OnceExit(l){l.walkRules(selectorMerger(v,w))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},3539:(l,m,v)=>{"use strict";const{isSupported:y}=v(6615);const w=v(475);const _=/^#?[-._a-z0-9 ]+$/i;const k="css-sel2";const S="css-sel3";const E="css-gencontent";const C="css-first-letter";const O="css-first-line";const P="css-in-out-of-range";const L="form-validation";const T=/-(ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)-/;const R=new Set(["=","~=","|="]);const D=new Set(["^=","$=","*="]);function filterPrefixes(l){return l.match(T)}const findMsInputPlaceholder=l=>~l.search(/-ms-input-placeholder/i);function sameVendor(l,m){let same=l=>l.map(filterPrefixes).join();let findMsVendor=l=>l.find(findMsInputPlaceholder);return same(l)===same(m)&&!(findMsVendor(l)&&findMsVendor(m))}function noVendor(l){return!T.test(l)}const A={":active":k,":after":E,":any-link":"css-any-link",":before":E,":checked":S,":default":"css-default-pseudo",":dir":"css-dir-pseudo",":disabled":S,":empty":S,":enabled":S,":first-child":k,":first-letter":C,":first-line":O,":first-of-type":S,":focus":k,":focus-within":"css-focus-within",":focus-visible":"css-focus-visible",":has":"css-has",":hover":k,":in-range":P,":indeterminate":"css-indeterminate-pseudo",":invalid":L,":is":"css-matches-pseudo",":lang":k,":last-child":S,":last-of-type":S,":link":k,":matches":"css-matches-pseudo",":not":S,":nth-child":S,":nth-last-child":S,":nth-last-of-type":S,":nth-of-type":S,":only-child":S,":only-of-type":S,":optional":"css-optional-pseudo",":out-of-range":P,":placeholder-shown":"css-placeholder-shown",":required":L,":root":S,":target":S,"::after":E,"::backdrop":"dialog","::before":E,"::first-letter":C,"::first-line":O,"::marker":"css-marker-pseudo","::placeholder":"css-placeholder","::selection":"css-selection",":valid":L,":visited":k};function isCssMixin(l){return l[l.length-1]===":"}function isHostPseudoClass(l){return l.includes(":host")}const q=new Map;function isSupportedCached(l,m){const v=JSON.stringify({feature:l,browsers:m});let w=q.get(v);if(!w){w=y(l,m);q.set(v,w)}return w}function ensureCompatibility(l,m,v){if(l.some(isCssMixin)){return false}if(l.some(isHostPseudoClass)){return false}return l.every((l=>{if(_.test(l)){return true}if(v&&v.has(l)){return v.get(l)}let y=true;w((l=>{l.walk((l=>{const{type:v,value:w}=l;if(v==="pseudo"){const l=A[w];if(!l&&noVendor(w)){y=false}if(l&&y){y=isSupportedCached(l,m)}}if(v==="combinator"){if(w.includes("~")){y=isSupportedCached(S,m)}if(w.includes(">")||w.includes("+")){y=isSupportedCached(k,m)}}if(v==="attribute"&&l.attribute){if(!l.operator){y=isSupportedCached(k,m)}if(w){if(R.has(l.operator)){y=isSupportedCached(k,m)}if(D.has(l.operator)){y=isSupportedCached(S,m)}}if(l.insensitive){y=isSupportedCached("css-case-insensitive",m)}}if(!y){return false}}))})).processSync(l);if(v){v.set(l,y)}return y}))}l.exports={sameVendor:sameVendor,noVendor:noVendor,pseudoElements:A,ensureCompatibility:ensureCompatibility}},1800:(l,m,v)=>{"use strict";const y=v(2045);const w=v(686);const _=v(5235);const k=v(3177);function hasVariableFunction(l){const m=l.toLowerCase();return m.includes("var(")||m.includes("env(")}function transform(l,m,v){let S=l.toLowerCase();if(S==="font-weight"&&!hasVariableFunction(m)){return w(m)}else if(S==="font-family"&&!hasVariableFunction(m)){const l=y(m);l.nodes=_(l.nodes,v);return l.toString()}else if(S==="font"){const l=y(m);l.nodes=k(l.nodes,v);return l.toString()}return m}function pluginCreator(l){l=Object.assign({},{removeAfterKeyword:false,removeDuplicates:true,removeQuotes:true},l);return{postcssPlugin:"postcss-minify-font-values",prepare(){const m=new Map;return{OnceExit(v){v.walkDecls(/font/i,(v=>{const y=v.value;if(!y){return}const w=v.prop;const _=`${w}|${y}`;if(m.has(_)){v.value=m.get(_);return}const k=transform(w,y,l);v.value=k;m.set(_,k)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},2894:l=>{"use strict";l.exports={style:new Set(["italic","oblique"]),variant:new Set(["small-caps"]),weight:new Set(["100","200","300","400","500","600","700","800","900","bold","lighter","bolder"]),stretch:new Set(["ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"]),size:new Set(["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"])}},5235:(l,m,v)=>{"use strict";const{stringify:y}=v(2045);function uniqueFontFamilies(l){return l.filter(((m,v)=>{if(m.toLowerCase()==="monospace"){return true}return v===l.indexOf(m)}))}const w=["inherit","initial","unset"];const _=new Set(["sans-serif","serif","fantasy","cursive","monospace","system-ui"]);function makeArray(l,m){let v=[];while(m--){v[m]=l}return v}const k=/[ !"#$%&'()*+,.\/;<=>?@\[\\\]^`{|}~]/;function escape(l,m){let v=0;let y;let w;let _;let S="";while(v{const y=v.length;const w=Math.floor(y/2);const _=makeArray("\\ ",w);if(y%2){_[w-1]+="\\ "}return(m||"")+" "+_.join(" ")}));if(R.test(y)&&!T.test(y)){y=y.replace(R,"\\ ")}if(C.test(y)){y="\\ "+y.slice(1)}return y}l.exports=function(l,m){const v=[];let w=null;let k,E;l.forEach(((l,m,y)=>{if(l.type==="string"||l.type==="function"){v.push(l)}else if(l.type==="word"){if(!w){w={type:"word",value:""};v.push(w)}w.value+=l.value}else if(l.type==="space"){if(w&&m!==y.length-1){w.value+=" "}}else{w=null}}));let C=v.map((l=>{if(l.type==="string"){const v=S.test(l.value);if(!m.removeQuotes||v||/[0-9]/.test(l.value.slice(0,1))){return y(l)}let w=escapeIdentifierSequence(l.value);if(w.length{"use strict";const{unit:y}=v(2045);const w=v(2894);const _=v(5235);const k=v(686);l.exports=function(l,m){let v,S,E,C;let O=NaN;let P=false;for(v=0,S=l.length;v{"use strict";l.exports=function(l){const m=l.toLowerCase();return m==="normal"?"400":m==="bold"?"700":l}},2506:(l,m,v)=>{"use strict";const y=v(2045);const{getArguments:w}=v(39);const _=v(7288);const k={top:"0deg",right:"90deg",bottom:"180deg",left:"270deg"};function isLessThan(l,m){return l.unit.toLowerCase()===m.unit.toLowerCase()&&parseFloat(l.number)>=parseFloat(m.number)}function optimise(l){const m=l.value;if(!m){return}const v=m.toLowerCase();if(v.includes("var(")||v.includes("env(")){return}if(!v.includes("gradient")){return}l.value=y(m).walk((l=>{if(l.type!=="function"||!l.nodes.length){return false}const m=l.value.toLowerCase();if(m==="linear-gradient"||m==="repeating-linear-gradient"||m==="-webkit-linear-gradient"||m==="-webkit-repeating-linear-gradient"){let m=w(l);if(l.nodes[0].value.toLowerCase()==="to"&&m[0].length===3){l.nodes=l.nodes.slice(2);l.nodes[0].value=k[l.nodes[0].value.toLowerCase()]}let v;m.forEach(((l,w)=>{if(l.length!==3){return}let _=w===m.length-1;let k=y.unit(l[2].value);if(v===undefined){v=k;if(!_&&v&&v.number==="0"&&v.unit.toLowerCase()!=="deg"){l[1].value=l[2].value=""}return}if(v&&k&&isLessThan(v,k)){l[2].value="0"}v=k;if(_&&l[2].value==="100%"){l[1].value=l[2].value=""}}));return false}if(m==="radial-gradient"||m==="repeating-radial-gradient"){let m=w(l);let v;const _=m[0].find((l=>l.value.toLowerCase()==="at"));m.forEach(((l,m)=>{if(!l[2]||!m&&_){return}let w=y.unit(l[2].value);if(!v){v=w;return}if(v&&w&&isLessThan(v,w)){l[2].value="0"}v=w}));return false}if(m==="-webkit-radial-gradient"||m==="-webkit-repeating-radial-gradient"){let m=w(l);let v;m.forEach((l=>{let m;let w;if(l[2]!==undefined){if(l[0].type==="function"){m=`${l[0].value}(${y.stringify(l[0].nodes)})`}else{m=l[0].value}if(l[2].type==="function"){w=`${l[2].value}(${y.stringify(l[2].nodes)})`}else{w=l[2].value}}else{if(l[0].type==="function"){m=`${l[0].value}(${y.stringify(l[0].nodes)})`}m=l[0].value}m=m.toLowerCase();const k=w!==undefined?_(m,w.toLowerCase()):_(m);if(!k||!l[2]){return}let S=y.unit(l[2].value);if(!v){v=S;return}if(v&&S&&isLessThan(v,S)){l[2].value="0"}v=S}));return false}})).toString()}function pluginCreator(){return{postcssPlugin:"postcss-minify-gradients",OnceExit(l){l.walkDecls(optimise)}}}pluginCreator.postcss=true;l.exports=pluginCreator},7288:(l,m,v)=>{"use strict";const{unit:y}=v(2045);const{colord:w,extend:_}=v(3251);const k=v(2338);_([k]);const S=new Set(["PX","IN","CM","MM","EM","REM","POINTS","PC","EX","CH","VW","VH","VMIN","VMAX","%"]);function isCSSLengthUnit(l){return S.has(l.toUpperCase())}function isStop(l){if(l){let m=false;const v=y(l);if(v){const l=Number(v.number);if(l===0||!isNaN(l)&&isCSSLengthUnit(v.unit)){m=true}}else{m=/^calc\(\S+\)$/g.test(l)}return m}return true}l.exports=function isColorStop(l,m){return w(l).isValid()&&isStop(m)}},907:(l,m,v)=>{"use strict";const y=v(4907);const w=v(2045);const{getArguments:_}=v(39);function gcd(l,m){return m?gcd(m,l%m):l}function aspectRatio(l,m){const v=gcd(l,m);return[l/v,m/v]}function split(l){return l.map((l=>w.stringify(l))).join("")}function removeNode(l){l.value="";l.type="word"}function sortAndDedupe(l){const m=[...new Set(l)];m.sort();return m.join()}function transform(l,m){const v=m.name.toLowerCase();if(!m.params||!["media","supports"].includes(v)){return}const y=w(m.params);y.walk(((v,w)=>{if(v.type==="div"){v.before=v.after=""}else if(v.type==="function"){v.before="";if(v.nodes[0]&&v.nodes[0].type==="word"&&v.nodes[0].value.startsWith("--")&&v.nodes[2]===undefined){v.after=" "}else{v.after=""}if(v.nodes[4]&&v.nodes[0].value.toLowerCase().indexOf("-aspect-ratio")===3){const[l,m]=aspectRatio(Number(v.nodes[2].value),Number(v.nodes[4].value));v.nodes[2].value=l.toString();v.nodes[4].value=m.toString()}}else if(v.type==="space"){v.value=" "}else{const _=y.nodes[w-2];if(v.value.toLowerCase()==="all"&&m.name.toLowerCase()==="media"&&!_){const m=y.nodes[w+2];if(!l||m){removeNode(v)}if(m&&m.value.toLowerCase()==="and"){const l=y.nodes[w+1];const v=y.nodes[w+3];removeNode(m);removeNode(l);removeNode(v)}}}}),true);m.params=sortAndDedupe(_(y).map(split));if(!m.params.length){m.raws.afterName=""}}const k=new Set(["ie 10","ie 11"]);function pluginCreator(l={}){const m=y(null,{stats:l.stats,path:__dirname,env:l.env});const v=m.some((l=>k.has(l)));return{postcssPlugin:"postcss-minify-params",OnceExit(l){l.walkAtRules((l=>transform(v,l)))}}}pluginCreator.postcss=true;l.exports=pluginCreator},1625:(l,m,v)=>{"use strict";const y=v(475);const w=v(2295);const _=new Set(["::before","::after","::first-letter","::first-line"]);function attribute(l){if(l.value){if(l.raws.value){l.raws.value=l.raws.value.replace(/\\\n/g,"").trim()}if(w(l.value)){l.quoteMark=null}if(l.operator){l.operator=l.operator.trim()}}l.rawSpaceBefore="";l.rawSpaceAfter="";l.spaces.attribute={before:"",after:""};l.spaces.operator={before:"",after:""};l.spaces.value={before:"",after:l.insensitive?" ":""};if(l.raws.spaces){l.raws.spaces.attribute={before:"",after:""};l.raws.spaces.operator={before:"",after:""};l.raws.spaces.value={before:"",after:l.insensitive?" ":""};if(l.insensitive){l.raws.spaces.insensitive={before:"",after:""}}}l.attribute=l.attribute.trim()}function combinator(l){const m=l.value.trim();l.spaces.before="";l.spaces.after="";l.rawSpaceBefore="";l.rawSpaceAfter="";l.value=m.length?m:" "}const k=new Map([[":nth-child",":first-child"],[":nth-of-type",":first-of-type"],[":nth-last-child",":last-child"],[":nth-last-of-type",":last-of-type"]]);function pseudo(l){const m=l.value.toLowerCase();if(l.nodes.length===1&&k.has(m)){const v=l.at(0);const w=v.at(0);if(v.length===1){if(w.value==="1"){l.replaceWith(y.pseudo({value:k.get(m)}))}if(w.value&&w.value.toLowerCase()==="even"){w.value="2n"}}if(v.length===3){const l=v.at(1);const m=v.at(2);if(w.value&&w.value.toLowerCase()==="2n"&&l.value==="+"&&m.value==="1"){w.value="odd";l.remove();m.remove()}}return}l.walk((l=>{if(l.type==="selector"&&l.parent){const m=new Set;l.parent.each((l=>{const v=String(l);if(!m.has(v)){m.add(v)}else{l.remove()}}))}}));if(_.has(m)){l.value=l.value.slice(1)}}const S=new Map([["from","0%"],["100%","to"]]);function tag(l){const m=l.value.toLowerCase();if(S.has(m)){l.value=S.get(m)}}function universal(l){const m=l.next();if(m&&m.type!=="combinator"){l.remove()}}const E=new Map([["attribute",attribute],["combinator",combinator],["pseudo",pseudo],["tag",tag],["universal",universal]]);function pluginCreator(){return{postcssPlugin:"postcss-minify-selectors",OnceExit(l){const m=new Map;const v=y((l=>{const m=new Set;l.walk((l=>{l.spaces.before=l.spaces.after="";const v=E.get(l.type);if(v!==undefined){v(l);return}const y=String(l);if(l.type==="selector"&&l.parent&&l.parent.type!=="pseudo"){if(!m.has(y)){m.add(y)}else{l.remove()}}}));l.nodes.sort()}));l.walkRules((l=>{const y=l.raws.selector&&l.raws.selector.value===l.selector?l.raws.selector.raw:l.selector;if(y[y.length-1]===":"){return}if(m.has(y)){l.selector=m.get(y);return}const w=v.processSync(y);l.selector=w;m.set(y,w)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},2295:l=>{"use strict";const m=/\\([0-9A-Fa-f]{1,6})[ \t\n\f\r]?/g;const v=/[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;l.exports=function canUnquote(l){if(l==="-"||l===""){return false}l=l.replace(m,"a").replace(/\\./g,"a");return!(v.test(l)||/^(?:-?\d|--)/.test(l))}},9734:l=>{"use strict";const m="charset";const v=/[^\x00-\x7F]/;function pluginCreator(l={}){return{postcssPlugin:"postcss-normalize-"+m,OnceExit(y,{AtRule:w}){let _;let k;y.walk((l=>{if(l.type==="atrule"&&l.name===m){if(!_){_=l}l.remove()}else if(!k&&l.parent===y&&v.test(l.toString())){k=l}}));if(k){if(!_&&l.add!==false){_=new w({name:m,params:'"utf-8"'})}if(_){_.source=k.source;y.prepend(_)}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},631:(l,m,v)=>{"use strict";const y=v(2045);const w=v(6306);function transform(l){const{nodes:m}=y(l);if(m.length===1){return l}const v=m.filter(((l,m)=>m%2===0)).filter((l=>l.type==="word")).map((l=>l.value.toLowerCase()));if(v.length===0){return l}const _=w.get(v.toString());if(!_){return l}return _}function pluginCreator(){return{postcssPlugin:"postcss-normalize-display-values",prepare(){const l=new Map;return{OnceExit(m){m.walkDecls(/^display$/i,(m=>{const v=m.value;if(!v){return}if(l.has(v)){m.value=l.get(v);return}const y=transform(v);m.value=y;l.set(v,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},6306:l=>{"use strict";const m="block";const v="flex";const y="flow";const w="flow-root";const _="grid";const k="inline";const S="inline-block";const E="inline-flex";const C="inline-grid";const O="inline-table";const P="list-item";const L="ruby";const T="ruby-base";const R="ruby-text";const D="run-in";const A="table";const q="table-cell";const F="table-caption";l.exports=new Map([[[m,y].toString(),m],[[m,w].toString(),w],[[k,y].toString(),k],[[k,w].toString(),S],[[D,y].toString(),D],[[P,m,y].toString(),P],[[k,y,P].toString(),k+" "+P],[[m,v].toString(),v],[[k,v].toString(),E],[[m,_].toString(),_],[[k,_].toString(),C],[[k,L].toString(),L],[[m,A].toString(),A],[[k,A].toString(),O],[[q,y].toString(),q],[[F,y].toString(),F],[[T,y].toString(),T],[[R,y].toString(),R]])},171:(l,m,v)=>{"use strict";const y=v(2045);const w=new Set(["top","right","bottom","left","center"]);const _="50%";const k=new Map([["right","100%"],["left","0"]]);const S=new Map([["bottom","100%"],["top","0"]]);const E=new Set(["calc","min","max","clamp"]);const C=new Set(["var","env","constant"]);function isCommaNode(l){return l.type==="div"&&l.value===","}function isVariableFunctionNode(l){if(l.type!=="function"){return false}return C.has(l.value.toLowerCase())}function isMathFunctionNode(l){if(l.type!=="function"){return false}return E.has(l.value.toLowerCase())}function isNumberNode(l){if(l.type!=="word"){return false}const m=parseFloat(l.value);return!isNaN(m)}function isDimensionNode(l){if(l.type!=="word"){return false}const m=y.unit(l.value);if(!m){return false}return m.unit!==""}function transform(l){const m=y(l);const v=[];let E=0;let C=true;m.nodes.forEach(((l,m)=>{if(isCommaNode(l)){E+=1;C=true;return}if(!C){return}if(l.type==="div"&&l.value==="/"){C=false;return}if(!v[E]){v[E]={start:null,end:null}}if(isVariableFunctionNode(l)){C=false;v[E].start=null;v[E].end=null;return}const y=l.type==="word"&&w.has(l.value.toLowerCase())||isDimensionNode(l)||isNumberNode(l)||isMathFunctionNode(l);if(v[E].start===null&&y){v[E].start=m;v[E].end=m;return}if(v[E].start!==null){if(l.type==="space"){return}else if(y){v[E].end=m;return}return}}));v.forEach((l=>{if(l.start===null){return}const v=m.nodes.slice(l.start,l.end+1);if(v.length>3){return}const y=v[0].value.toLowerCase();const E=v[2]&&v[2].value?v[2].value.toLowerCase():null;if(v.length===1||E==="center"){if(E){v[2].value=v[1].value=""}const l=new Map([...k,["center",_]]);if(l.has(y)){v[0].value=l.get(y)}return}if(E!==null){if(y==="center"&&w.has(E)){v[0].value=v[1].value="";if(k.has(E)){v[2].value=k.get(E)}return}if(k.has(y)&&S.has(E)){v[0].value=k.get(y);v[2].value=S.get(E);return}else if(S.has(y)&&k.has(E)){v[0].value=k.get(E);v[2].value=S.get(y);return}}}));return m.toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-positions",OnceExit(l){const m=new Map;l.walkDecls(/^(background(-position)?|(-\w+-)?perspective-origin)$/i,(l=>{const v=l.value;if(!v){return}if(m.has(v)){l.value=m.get(v);return}const y=transform(v);l.value=y;m.set(v,y)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},8842:(l,m,v)=>{"use strict";const y=v(2045);const w=v(6539);function evenValues(l,m){return m%2===0}const _=new Set(w.values());function isCommaNode(l){return l.type==="div"&&l.value===","}const k=new Set(["var","env","constant"]);function isVariableFunctionNode(l){if(l.type!=="function"){return false}return k.has(l.value.toLowerCase())}function transform(l){const m=y(l);if(m.nodes.length===1){return l}const v=[];let k=0;let S=true;m.nodes.forEach(((l,m)=>{if(isCommaNode(l)){k+=1;S=true;return}if(!S){return}if(l.type==="div"&&l.value==="/"){S=false;return}if(!v[k]){v[k]={start:null,end:null}}if(isVariableFunctionNode(l)){S=false;v[k].start=null;v[k].end=null;return}const y=l.type==="word"&&_.has(l.value.toLowerCase());if(v[k].start===null&&y){v[k].start=m;v[k].end=m;return}if(v[k].start!==null){if(l.type==="space"){return}else if(y){v[k].end=m;return}return}}));v.forEach((l=>{if(l.start===null){return}const v=m.nodes.slice(l.start,l.end+1);if(v.length!==3){return}const y=v.filter(evenValues).map((l=>l.value.toLowerCase())).toString();const _=w.get(y);if(_){v[0].value=_;v[1].value=v[2].value=""}}));return m.toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-repeat-style",prepare(){const l=new Map;return{OnceExit(m){m.walkDecls(/^(background(-repeat)?|(-\w+-)?mask-repeat)$/i,(m=>{const v=m.value;if(!v){return}if(l.has(v)){m.value=l.get(v);return}const y=transform(v);m.value=y;l.set(v,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},6539:l=>{"use strict";l.exports=new Map([[["repeat","no-repeat"].toString(),"repeat-x"],[["no-repeat","repeat"].toString(),"repeat-y"],[["repeat","repeat"].toString(),"repeat"],[["space","space"].toString(),"space"],[["round","round"].toString(),"round"],[["no-repeat","no-repeat"].toString(),"no-repeat"]])},908:(l,m,v)=>{"use strict";const y=v(2045);const w="'".charCodeAt(0);const _='"'.charCodeAt(0);const k="\\".charCodeAt(0);const S="\n".charCodeAt(0);const E=" ".charCodeAt(0);const C="\f".charCodeAt(0);const O="\t".charCodeAt(0);const P="\r".charCodeAt(0);const L=/[ \n\t\r\f'"\\]/g;const T="string";const R="escapedSingleQuote";const D="escapedDoubleQuote";const A="singleQuote";const q="doubleQuote";const F="newline";const $="single";const z=`'`;const V=`"`;const U=`\\\n`;const W={type:R,value:`\\'`};const B={type:D,value:`\\"`};const Q={type:A,value:z};const Y={type:q,value:V};const G={type:F,value:U};function stringify(l){return l.nodes.reduce(((l,{value:m})=>{if(m===U){return l}return l+m}),"")}function parse(l){let m,v,y;let F=0;let $=l.length;const z={nodes:[],types:{escapedSingleQuote:0,escapedDoubleQuote:0,singleQuote:0,doubleQuote:0},quotes:false};while(F<$){m=l.charCodeAt(F);switch(m){case E:case O:case P:case C:v=F;do{v+=1;m=l.charCodeAt(v)}while(m===E||m===S||m===O||m===P||m===C);z.nodes.push({type:"space",value:l.slice(F,v)});F=v-1;break;case w:z.nodes.push(Q);z.types[A]++;z.quotes=true;break;case _:z.nodes.push(Y);z.types[q]++;z.quotes=true;break;case k:v=F+1;if(l.charCodeAt(v)===w){z.nodes.push(W);z.types[R]++;z.quotes=true;F=v;break}else if(l.charCodeAt(v)===_){z.nodes.push(B);z.types[D]++;z.quotes=true;F=v;break}else if(l.charCodeAt(v)===S){z.nodes.push(G);F=v;break}default:L.lastIndex=F+1;L.test(l);if(L.lastIndex===0){v=$-1}else{v=L.lastIndex-2}y=l.slice(F,v+1);z.nodes.push({type:T,value:y});F=v}F++}return z}function changeWrappingQuotes(l,m){const{types:v}=m;if(v[A]||v[q]){return}if(l.quote===z&&v[R]>0&&!v[D]){l.quote=V}if(l.quote===V&&v[D]>0&&!v[R]){l.quote=z}m.nodes=changeChildQuotes(m.nodes,l.quote)}function changeChildQuotes(l,m){const v=[];for(const y of l){if(y.type===D&&m===z){v.push(Y)}else if(y.type===R&&m===V){v.push(Q)}else{v.push(y)}}return v}function normalize(l,m){if(!l||!l.length){return l}return y(l).walk((l=>{if(l.type!==T){return}const v=parse(l.value);if(v.quotes){changeWrappingQuotes(l,v)}else if(m===$){l.quote=z}else{l.quote=V}l.value=stringify(v)})).toString()}function minify(l,m,v){const y=l+"|"+v;if(m.has(y)){return m.get(y)}const w=normalize(l,v);m.set(y,w);return w}function pluginCreator(l){const{preferredQuote:m}=Object.assign({},{preferredQuote:"double"},l);return{postcssPlugin:"postcss-normalize-string",OnceExit(l){const v=new Map;l.walk((l=>{switch(l.type){case"rule":l.selector=minify(l.selector,v,m);break;case"decl":l.value=minify(l.value,v,m);break;case"atrule":l.params=minify(l.params,v,m);break}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},9813:(l,m,v)=>{"use strict";const y=v(2045);const getValue=l=>parseFloat(l.value);const w=new Map([[[.25,.1,.25,1].toString(),"ease"],[[0,0,1,1].toString(),"linear"],[[.42,0,1,1].toString(),"ease-in"],[[0,0,.58,1].toString(),"ease-out"],[[.42,0,.58,1].toString(),"ease-in-out"]]);function reduce(l){if(l.type!=="function"){return false}if(!l.value){return}const m=l.value.toLowerCase();if(m==="steps"){if(l.nodes[0].type==="word"&&getValue(l.nodes[0])===1&&l.nodes[2]&&l.nodes[2].type==="word"&&(l.nodes[2].value.toLowerCase()==="start"||l.nodes[2].value.toLowerCase()==="jump-start")){l.type="word";l.value="step-start";delete l.nodes;return}if(l.nodes[0].type==="word"&&getValue(l.nodes[0])===1&&l.nodes[2]&&l.nodes[2].type==="word"&&(l.nodes[2].value.toLowerCase()==="end"||l.nodes[2].value.toLowerCase()==="jump-end")){l.type="word";l.value="step-end";delete l.nodes;return}if(l.nodes[2]&&l.nodes[2].type==="word"&&(l.nodes[2].value.toLowerCase()==="end"||l.nodes[2].value.toLowerCase()==="jump-end")){l.nodes=[l.nodes[0]];return}return false}if(m==="cubic-bezier"){const m=l.nodes.filter(((l,m)=>m%2===0)).map(getValue);if(m.length!==4){return}const v=w.get(m.toString());if(v){l.type="word";l.value=v;delete l.nodes;return}}}function transform(l){return y(l).walk(reduce).toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-timing-functions",OnceExit(l){const m=new Map;l.walkDecls(/^(-\w+-)?(animation|transition)(-timing-function)?$/i,(l=>{const v=l.value;if(m.has(v)){l.value=m.get(v);return}const y=transform(v);l.value=y;m.set(v,y)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},6119:(l,m,v)=>{"use strict";const y=v(4907);const w=v(2045);const _=/^u(?=\+)/;function unicode(l){const m=l.slice(2).split("-");if(m.length<2){return l}const v=m[0].split("");const y=m[1].split("");if(v.length!==y.length){return l}const w=mergeRangeBounds(v,y);if(w){return w}return l}function mergeRangeBounds(l,m){let v=0;let y="u+";for(const[w,_]of l.entries()){if(_===m[w]&&v===0){y=y+_}else if(_==="0"&&m[w]==="f"){v++;y=y+"?"}else{return false}}if(v<6){return y}else{return false}}function hasLowerCaseUPrefixBug(l){return y("ie <=11, edge <= 15").includes(l)}function transform(l,m=false){return w(l).walk((l=>{if(l.type==="unicode-range"){const v=unicode(l.value.toLowerCase());l.value=m?v.replace(_,"U"):v}return false})).toString()}function pluginCreator(){return{postcssPlugin:"postcss-normalize-unicode",prepare(l){const m=new Map;const v=l.opts||{};const w=y(null,{stats:v.stats,path:__dirname,env:v.env});const _=w.some(hasLowerCaseUPrefixBug);return{OnceExit(l){l.walkDecls(/^unicode-range$/i,(l=>{const v=l.value;if(m.has(v)){l.value=m.get(v);return}const y=transform(v,_);l.value=y;m.set(v,y)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},1912:(l,m,v)=>{"use strict";const y=v(1017);const w=v(2045);const _=v(5299);const k=/\\[\r\n]/;const S=/([\s\(\)"'])/g;const E=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/;const C=/^[a-zA-Z]:\\/;function isAbsolute(l){if(C.test(l)){return false}return E.test(l)}function convert(l,m){if(isAbsolute(l)||l.startsWith("//")){let v;try{v=_(l,m)}catch(m){v=l}return v}return y.normalize(l).replace(new RegExp("\\"+y.sep,"g"),"/")}function transformNamespace(l){l.params=w(l.params).walk((l=>{if(l.type==="function"&&l.value.toLowerCase()==="url"&&l.nodes.length){l.type="string";l.quote=l.nodes[0].type==="string"?l.nodes[0].quote:'"';l.value=l.nodes[0].value}if(l.type==="string"){l.value=l.value.trim()}return false})).toString()}function transformDecl(l,m){l.value=w(l.value).walk((l=>{if(l.type!=="function"||l.value.toLowerCase()!=="url"){return false}l.before=l.after="";if(!l.nodes.length){return false}let v=l.nodes[0];let y;v.value=v.value.trim().replace(k,"");if(v.value.length===0){v.quote="";return false}if(/^data:(.*)?,/i.test(v.value)){return false}if(!/^.+-extension:\//i.test(v.value)){v.value=convert(v.value,m)}if(S.test(v.value)&&v.type==="string"){y=v.value.replace(S,"\\$1");if(y.length{if(m.type==="decl"){return transformDecl(m,l)}else if(m.type==="atrule"&&m.name.toLowerCase()==="namespace"){return transformNamespace(m)}}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},7151:(l,m,v)=>{"use strict";const y=v(2045);const w="atrule";const _="decl";const k="rule";const S=new Set(["var","env","constant"]);function reduceCalcWhitespaces(l){if(l.type==="space"){l.value=" "}else if(l.type==="function"){if(!S.has(l.value.toLowerCase())){l.before=l.after=""}}}function reduceWhitespaces(l){if(l.type==="space"){l.value=" "}else if(l.type==="div"){l.before=l.after=""}else if(l.type==="function"){if(!S.has(l.value.toLowerCase())){l.before=l.after=""}if(l.value.toLowerCase()==="calc"){y.walk(l.nodes,reduceCalcWhitespaces);return false}}}function pluginCreator(){return{postcssPlugin:"postcss-normalize-whitespace",OnceExit(l){const m=new Map;l.walk((l=>{const{type:v}=l;if([_,k,w].includes(v)&&l.raws.before){l.raws.before=l.raws.before.replace(/\s/g,"")}if(v===_){if(l.important){l.raws.important="!important"}l.value=l.value.replace(/\s*(\\9)\s*/,"$1");const v=l.value;if(m.has(v)){l.value=m.get(v)}else{const w=y(l.value);const _=w.walk(reduceWhitespaces).toString();l.value=_;m.set(v,_)}if(l.prop.startsWith("--")&&l.value===""){l.value=" "}if(l.raws.before){const m=l.prev();if(m&&m.type!==k){l.raws.before=l.raws.before.replace(/;/g,"")}}l.raws.between=":";l.raws.semicolon=false}else if(v===k||v===w){l.raws.between=l.raws.after="";l.raws.semicolon=false}}));l.raws.after=""}}}pluginCreator.postcss=true;l.exports=pluginCreator},5535:(l,m,v)=>{"use strict";const y=v(2045);const{normalizeGridAutoFlow:w,normalizeGridColumnRowGap:_,normalizeGridColumnRow:k}=v(5451);const S=v(8856);const E=v(8955);const C=v(8456);const O=v(5067);const P=v(4674);const L=v(7474);const T=v(3162);const R=v(2101);const D=[["border",E],["border-block",E],["border-inline",E],["border-block-end",E],["border-block-start",E],["border-inline-end",E],["border-inline-start",E],["border-top",E],["border-right",E],["border-bottom",E],["border-left",E]];const A=[["grid-auto-flow",w],["grid-column-gap",_],["grid-row-gap",_],["grid-column",k],["grid-row",k],["grid-row-start",k],["grid-row-end",k],["grid-column-start",k],["grid-column-end",k]];const q=[["column-rule",E],["columns",T]];const F=new Map([["animation",S],["outline",E],["box-shadow",C],["flex-flow",O],["list-style",L],["transition",P],...D,...A,...q]);const $=new Set(["var","env","constant"]);function isVariableFunctionNode(l){if(l.type!=="function"){return false}return $.has(l.value.toLowerCase())}function shouldAbort(l){let m=false;l.walk((l=>{if(l.type==="comment"||isVariableFunctionNode(l)||l.type==="word"&&l.value.includes(`___CSS_LOADER_IMPORT___`)){m=true;return false}}));return m}function getValue(l){let{value:m,raws:v}=l;if(v&&v.value&&v.value.raw){m=v.value.raw}return m}function pluginCreator(){return{postcssPlugin:"postcss-ordered-values",prepare(){const l=new Map;return{OnceExit(m){m.walkDecls((m=>{const v=m.prop.toLowerCase();const w=R(v);const _=F.get(w);if(!_){return}const k=getValue(m);if(l.has(k)){m.value=l.get(k);return}const S=y(k);if(S.nodes.length<2||shouldAbort(S)){l.set(k,k);return}const E=_(S);m.value=E.toString();l.set(k,E.toString())}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},2963:l=>{"use strict";l.exports=function addSpace(){return{type:"space",value:" "}}},6592:(l,m,v)=>{"use strict";const{stringify:y}=v(2045);l.exports=function getValue(l){return y(flatten(l))};function flatten(l){const m=[];for(const[v,y]of l.entries()){y.forEach(((w,_)=>{if(_===y.length-1&&v===l.length-1&&w.type==="space"){return}m.push(w)}));if(v!==l.length-1){m[m.length-1].type="div";m[m.length-1].value=","}}return m}},9314:l=>{"use strict";l.exports=function joinGridVal(l){return l.join(" / ").trim()}},1460:l=>{"use strict";l.exports=new Set(["calc","clamp","max","min"])},2101:l=>{"use strict";function vendorUnprefixed(l){return l.replace(/^-\w+-/,"")}l.exports=vendorUnprefixed},8856:(l,m,v)=>{"use strict";const{unit:y}=v(2045);const{getArguments:w}=v(39);const _=v(2963);const k=v(6592);const S=new Set(["steps","cubic-bezier","frames"]);const E=new Set(["ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start"]);const C=new Set(["normal","reverse","alternate","alternate-reverse"]);const O=new Set(["none","forwards","backwards","both"]);const P=new Set(["running","paused"]);const L=new Set(["ms","s"]);const isTimingFunction=(l,m)=>m==="function"&&S.has(l)||E.has(l);const isDirection=l=>C.has(l);const isFillMode=l=>O.has(l);const isPlayState=l=>P.has(l);const isTime=l=>{const m=y(l);return m&&L.has(m.unit)};const isIterationCount=l=>{const m=y(l);return l==="infinite"||m&&!m.unit};const T=[{property:"duration",delegate:isTime},{property:"timingFunction",delegate:isTimingFunction},{property:"delay",delegate:isTime},{property:"iterationCount",delegate:isIterationCount},{property:"direction",delegate:isDirection},{property:"fillMode",delegate:isFillMode},{property:"playState",delegate:isPlayState}];function normalize(l){const m=[];for(const v of l){const l={name:[],duration:[],timingFunction:[],delay:[],iterationCount:[],direction:[],fillMode:[],playState:[]};v.forEach((m=>{let{type:v,value:y}=m;if(v==="space"){return}y=y.toLowerCase();const w=T.some((({property:w,delegate:k})=>{if(k(y,v)&&!l[w].length){l[w]=[m,_()];return true}}));if(!w){l.name=[...l.name,m,_()]}}));m.push([...l.name,...l.duration,...l.timingFunction,...l.delay,...l.iterationCount,...l.direction,...l.fillMode,...l.playState])}return m}l.exports=function normalizeAnimation(l){const m=normalize(w(l));return k(m)}},8955:(l,m,v)=>{"use strict";const{unit:y,stringify:w}=v(2045);const _=v(1460);const k=new Set(["thin","medium","thick"]);const S=new Set(["none","auto","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"]);l.exports=function normalizeBorder(l){const m={width:"",style:"",color:""};l.walk((l=>{const{type:v,value:E}=l;if(v==="word"){if(S.has(E.toLowerCase())){m.style=E;return false}if(k.has(E.toLowerCase())||y(E.toLowerCase())){if(m.width!==""){m.width=`${m.width} ${E}`;return false}m.width=E;return false}m.color=E;return false}if(v==="function"){if(_.has(E.toLowerCase())){m.width=w(l)}else{m.color=w(l)}return false}}));return`${m.width} ${m.style} ${m.color}`.trim()}},8456:(l,m,v)=>{"use strict";const{unit:y}=v(2045);const{getArguments:w}=v(39);const _=v(2963);const k=v(6592);const S=v(1460);const E=v(2101);l.exports=function normalizeBoxShadow(l){let m=w(l);const v=normalize(m);if(v===false){return l.toString()}return k(v)};function normalize(l){const m=[];let v=false;for(const w of l){let l=[];let k={inset:[],color:[]};w.forEach((m=>{const{type:w,value:C}=m;if(w==="function"&&S.has(E(C.toLowerCase()))){v=true;return}if(w==="space"){return}if(y(C)){l=[...l,m,_()]}else if(C.toLowerCase()==="inset"){k.inset=[...k.inset,m,_()]}else{k.color=[...k.color,m,_()]}}));if(v){return false}m.push([...k.inset,...l,...k.color])}return m}},3162:(l,m,v)=>{"use strict";const{unit:y}=v(2045);function hasUnit(l){const m=y(l);return m&&m.unit!==""}l.exports=l=>{const m=[];const v=[];l.walk((l=>{const{type:y,value:w}=l;if(y==="word"){if(hasUnit(w)){m.push(w)}else{v.push(w)}}}));if(v.length===1&&m.length===1){return`${m[0].trimStart()} ${v[0].trimStart()}`}return l}},5067:l=>{"use strict";const m=new Set(["row","row-reverse","column","column-reverse"]);const v=new Set(["nowrap","wrap","wrap-reverse"]);l.exports=function normalizeFlexFlow(l){let y={direction:"",wrap:""};l.walk((({value:l})=>{if(m.has(l.toLowerCase())){y.direction=l;return}if(v.has(l.toLowerCase())){y.wrap=l;return}}));return`${y.direction} ${y.wrap}`.trim()}},5451:(l,m,v)=>{"use strict";const y=v(9314);const normalizeGridAutoFlow=l=>{let m={front:"",back:""};let v=false;l.walk((l=>{if(l.value==="dense"){v=true;m.back=l.value}else if(["row","column"].includes(l.value.trim().toLowerCase())){v=true;m.front=l.value}else{v=false}}));if(v){return`${m.front.trim()} ${m.back.trim()}`}return l};const normalizeGridColumnRowGap=l=>{let m={front:"",back:""};let v=false;l.walk((l=>{if(l.value==="normal"){v=true;m.front=l.value}else{m.back=`${m.back} ${l.value}`}}));if(v){return`${m.front.trim()} ${m.back.trim()}`}return l};const normalizeGridColumnRow=l=>{let m=l.toString().split("/");if(m.length>1){return y(m.map((l=>{let m={front:"",back:""};l=l.trim();l.split(" ").forEach((l=>{if(l==="span"){m.front=l}else{m.back=`${m.back} ${l}`}}));return`${m.front.trim()} ${m.back.trim()}`})))}return m.map((l=>{let m={front:"",back:""};l=l.trim();l.split(" ").forEach((l=>{if(l==="span"){m.front=l}else{m.back=`${m.back} ${l}`}}));return`${m.front.trim()} ${m.back.trim()}`}))};l.exports={normalizeGridAutoFlow:normalizeGridAutoFlow,normalizeGridColumnRowGap:normalizeGridColumnRowGap,normalizeGridColumnRow:normalizeGridColumnRow}},7474:(l,m,v)=>{"use strict";const y=v(2045);const w=v(3439);const _=new Set(w["list-style-type"]);const k=new Set(["inside","outside"]);l.exports=function listStyleNormalizer(l){const m={type:"",position:"",image:""};l.walk((l=>{if(l.type==="word"){if(_.has(l.value)){m.type=`${m.type} ${l.value}`}else if(k.has(l.value)){m.position=`${m.position} ${l.value}`}else if(l.value==="none"){if(m.type.split(" ").filter((l=>l!==""&&l!==" ")).includes("none")){m.image=`${m.image} ${l.value}`}else{m.type=`${m.type} ${l.value}`}}else{m.type=`${m.type} ${l.value}`}}if(l.type==="function"){m.image=`${m.image} ${y.stringify(l)}`}}));return`${m.type.trim()} ${m.position.trim()} ${m.image.trim()}`.trim()}},4674:(l,m,v)=>{"use strict";const{unit:y}=v(2045);const{getArguments:w}=v(39);const _=v(2963);const k=v(6592);const S=new Set(["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"]);function normalize(l){const m=[];for(const v of l){let l={timingFunction:[],property:[],time1:[],time2:[]};v.forEach((m=>{const{type:v,value:w}=m;if(v==="space"){return}if(v==="function"&&new Set(["steps","cubic-bezier"]).has(w.toLowerCase())){l.timingFunction=[...l.timingFunction,m,_()]}else if(y(w)){if(!l.time1.length){l.time1=[...l.time1,m,_()]}else{l.time2=[...l.time2,m,_()]}}else if(S.has(w.toLowerCase())){l.timingFunction=[...l.timingFunction,m,_()]}else{l.property=[...l.property,m,_()]}}));m.push([...l.property,...l.time1,...l.timingFunction,...l.time2])}return m}l.exports=function normalizeTransition(l){const m=normalize(w(l));return k(m)}},3653:(l,m,v)=>{"use strict";const y=v(4907);const{isSupported:w}=v(6615);const _=v(1030);const k=v(3195);const S="initial";const E=["writing-mode","transform-box"];function pluginCreator(){return{postcssPlugin:"postcss-reduce-initial",prepare(l){const m=l.opts||{};const v=y(null,{stats:m.stats,path:__dirname,env:m.env});const C=w("css-initial-value",v);return{OnceExit(l){l.walkDecls((l=>{const v=l.prop.toLowerCase();const y=new Set(E.concat(m.ignore||[]));if(y.has(v)){return}if(C&&Object.prototype.hasOwnProperty.call(k,v)&&l.value.toLowerCase()===k[v]){l.value=S;return}if(l.value.toLowerCase()!==S||!_[v]){return}l.value=_[v]}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},5373:(l,m,v)=>{"use strict";const y=v(2045);function getValues(l,m,v){if(v%2===0){let v=NaN;if(m.type==="function"&&(m.value==="var"||m.value==="env")&&m.nodes.length===1){v=y.stringify(m.nodes)}else if(m.type==="word"){v=parseFloat(m.value)}return[...l,v]}return l}function matrix3d(l,m){if(m.length!==16){return}if(m[15]&&m[2]===0&&m[3]===0&&m[6]===0&&m[7]===0&&m[8]===0&&m[9]===0&&m[10]===1&&m[11]===0&&m[14]===0&&m[15]===1){const{nodes:m}=l;l.value="matrix";l.nodes=[m[0],m[1],m[2],m[3],m[8],m[9],m[10],m[11],m[24],m[25],m[26]]}}const w=new Map([[[1,0,0].toString(),"rotateX"],[[0,1,0].toString(),"rotateY"],[[0,0,1].toString(),"rotate"]]);function rotate3d(l,m){if(m.length!==4){return}const{nodes:v}=l;const y=w.get(m.slice(0,3).toString());if(y){l.value=y;l.nodes=[v[6]]}}function rotateZ(l,m){if(m.length!==1){return}l.value="rotate"}function scale(l,m){if(m.length!==2){return}const{nodes:v}=l;const[y,w]=m;if(y===w){l.nodes=[v[0]];return}if(w===1){l.value="scaleX";l.nodes=[v[0]];return}if(y===1){l.value="scaleY";l.nodes=[v[2]];return}}function scale3d(l,m){if(m.length!==3){return}const{nodes:v}=l;const[y,w,_]=m;if(w===1&&_===1){l.value="scaleX";l.nodes=[v[0]];return}if(y===1&&_===1){l.value="scaleY";l.nodes=[v[2]];return}if(y===1&&w===1){l.value="scaleZ";l.nodes=[v[4]];return}}function translate(l,m){if(m.length!==2){return}const{nodes:v}=l;if(m[1]===0){l.nodes=[v[0]];return}if(m[0]===0){l.value="translateY";l.nodes=[v[2]];return}}function translate3d(l,m){if(m.length!==3){return}const{nodes:v}=l;if(m[0]===0&&m[1]===0){l.value="translateZ";l.nodes=[v[4]]}}const _=new Map([["matrix3d",matrix3d],["rotate3d",rotate3d],["rotateZ",rotateZ],["scale",scale],["scale3d",scale3d],["translate",translate],["translate3d",translate3d]]);function normalizeReducerName(l){const m=l.toLowerCase();if(m==="rotatez"){return"rotateZ"}return m}function reduce(l){if(l.type==="function"){const m=normalizeReducerName(l.value);const v=_.get(m);if(v!==undefined){v(l,l.nodes.reduce(getValues,[]))}}return false}function pluginCreator(){return{postcssPlugin:"postcss-reduce-transforms",prepare(){const l=new Map;return{OnceExit(m){m.walkDecls(/transform$/i,(m=>{const v=m.value;if(!v){return}if(l.has(v)){m.value=l.get(v);return}const w=y(v).walk(reduce).toString();m.value=w;l.set(v,w)}))}}}}}pluginCreator.postcss=true;l.exports=pluginCreator},475:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(9605));var w=_interopRequireWildcard(v(1534));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var m=_getRequireWildcardCache();if(m&&m.has(l)){return m.get(l)}var v={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in l){if(Object.prototype.hasOwnProperty.call(l,w)){var _=y?Object.getOwnPropertyDescriptor(l,w):null;if(_&&(_.get||_.set)){Object.defineProperty(v,w,_)}else{v[w]=l[w]}}}v["default"]=l;if(m){m.set(l,v)}return v}function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var _=function parser(l){return new y["default"](l)};Object.assign(_,w);delete _.__esModule;var k=_;m["default"]=k;l.exports=m.default},4969:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(173));var w=_interopRequireDefault(v(8589));var _=_interopRequireDefault(v(9616));var k=_interopRequireDefault(v(1042));var S=_interopRequireDefault(v(5046));var E=_interopRequireDefault(v(2308));var C=_interopRequireDefault(v(2429));var O=_interopRequireDefault(v(3794));var P=_interopRequireWildcard(v(6382));var L=_interopRequireDefault(v(4893));var T=_interopRequireDefault(v(6884));var R=_interopRequireDefault(v(9743));var D=_interopRequireDefault(v(3393));var A=_interopRequireWildcard(v(452));var q=_interopRequireWildcard(v(9210));var F=_interopRequireWildcard(v(3342));var $=v(7984);var z,V;function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var m=_getRequireWildcardCache();if(m&&m.has(l)){return m.get(l)}var v={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in l){if(Object.prototype.hasOwnProperty.call(l,w)){var _=y?Object.getOwnPropertyDescriptor(l,w):null;if(_&&(_.get||_.set)){Object.defineProperty(v,w,_)}else{v[w]=l[w]}}}v["default"]=l;if(m){m.set(l,v)}return v}function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,m){for(var v=0;v0){var y=this.current.last;if(y){var w=this.convertWhitespaceNodesToSpace(v),_=w.space,k=w.rawSpace;if(k!==undefined){y.rawSpaceAfter+=k}y.spaces.after+=_}else{v.forEach((function(m){return l.newNode(m)}))}}return}var S=this.currToken;var E=undefined;if(m>this.position){E=this.parseWhitespaceEquivalentTokens(m)}var C;if(this.isNamedCombinator()){C=this.namedCombinator()}else if(this.currToken[A.FIELDS.TYPE]===q.combinator){C=new T["default"]({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[A.FIELDS.START_POS]});this.position++}else if(U[this.currToken[A.FIELDS.TYPE]]){}else if(!E){this.unexpected()}if(C){if(E){var O=this.convertWhitespaceNodesToSpace(E),P=O.space,L=O.rawSpace;C.spaces.before=P;C.rawSpaceBefore=L}}else{var R=this.convertWhitespaceNodesToSpace(E,true),D=R.space,F=R.rawSpace;if(!F){F=D}var $={};var z={spaces:{}};if(D.endsWith(" ")&&F.endsWith(" ")){$.before=D.slice(0,D.length-1);z.spaces.before=F.slice(0,F.length-1)}else if(D.startsWith(" ")&&F.startsWith(" ")){$.after=D.slice(1);z.spaces.after=F.slice(1)}else{z.value=F}C=new T["default"]({value:" ",source:getTokenSourceSpan(S,this.tokens[this.position-1]),sourceIndex:S[A.FIELDS.START_POS],spaces:$,raws:z})}if(this.currToken&&this.currToken[A.FIELDS.TYPE]===q.space){C.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(C)};l.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var l=new w["default"]({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(l);this.current=l;this.position++};l.comment=function comment(){var l=this.currToken;this.newNode(new k["default"]({value:this.content(),source:getTokenSource(l),sourceIndex:l[A.FIELDS.START_POS]}));this.position++};l.error=function error(l,m){throw this.root.error(l,m)};l.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[A.FIELDS.START_POS]})};l.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[A.FIELDS.START_POS])};l.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[A.FIELDS.START_POS])};l.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[A.FIELDS.START_POS])};l.namespace=function namespace(){var l=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[A.FIELDS.TYPE]===q.word){this.position++;return this.word(l)}else if(this.nextToken[A.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(l)}};l.nesting=function nesting(){if(this.nextToken){var l=this.content(this.nextToken);if(l==="|"){this.position++;return}}var m=this.currToken;this.newNode(new R["default"]({value:this.content(),source:getTokenSource(m),sourceIndex:m[A.FIELDS.START_POS]}));this.position++};l.parentheses=function parentheses(){var l=this.current.last;var m=1;this.position++;if(l&&l.type===F.PSEUDO){var v=new w["default"]({source:{start:tokenStart(this.tokens[this.position-1])}});var y=this.current;l.append(v);this.current=v;while(this.position1&&l.nextToken&&l.nextToken[A.FIELDS.TYPE]===q.openParenthesis){l.error("Misplaced parenthesis.",{index:l.nextToken[A.FIELDS.START_POS]})}}))}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[A.FIELDS.START_POS])}};l.space=function space(){var l=this.content();if(this.position===0||this.prevToken[A.FIELDS.TYPE]===q.comma||this.prevToken[A.FIELDS.TYPE]===q.openParenthesis||this.current.nodes.every((function(l){return l.type==="comment"}))){this.spaces=this.optionalSpace(l);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[A.FIELDS.TYPE]===q.comma||this.nextToken[A.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(l);this.position++}else{this.combinator()}};l.string=function string(){var l=this.currToken;this.newNode(new C["default"]({value:this.content(),source:getTokenSource(l),sourceIndex:l[A.FIELDS.START_POS]}));this.position++};l.universal=function universal(l){var m=this.nextToken;if(m&&this.content(m)==="|"){this.position++;return this.namespace()}var v=this.currToken;this.newNode(new L["default"]({value:this.content(),source:getTokenSource(v),sourceIndex:v[A.FIELDS.START_POS]}),l);this.position++};l.splitWord=function splitWord(l,m){var v=this;var y=this.nextToken;var w=this.content();while(y&&~[q.dollar,q.caret,q.equals,q.word].indexOf(y[A.FIELDS.TYPE])){this.position++;var k=this.content();w+=k;if(k.lastIndexOf("\\")===k.length-1){var C=this.nextToken;if(C&&C[A.FIELDS.TYPE]===q.space){w+=this.requiredSpace(this.content(C));this.position++}}y=this.nextToken}var O=indexesOf(w,".").filter((function(l){var m=w[l-1]==="\\";var v=/^\d+\.\d+%$/.test(w);return!m&&!v}));var P=indexesOf(w,"#").filter((function(l){return w[l-1]!=="\\"}));var L=indexesOf(w,"#{");if(L.length){P=P.filter((function(l){return!~L.indexOf(l)}))}var T=(0,D["default"])(uniqs([0].concat(O,P)));T.forEach((function(y,k){var C=T[k+1]||w.length;var L=w.slice(y,C);if(k===0&&m){return m.call(v,L,T.length)}var R;var D=v.currToken;var q=D[A.FIELDS.START_POS]+T[k];var F=getSource(D[1],D[2]+y,D[3],D[2]+(C-1));if(~O.indexOf(y)){var $={value:L.slice(1),source:F,sourceIndex:q};R=new _["default"](unescapeProp($,"value"))}else if(~P.indexOf(y)){var z={value:L.slice(1),source:F,sourceIndex:q};R=new S["default"](unescapeProp(z,"value"))}else{var V={value:L,source:F,sourceIndex:q};unescapeProp(V,"value");R=new E["default"](V)}v.newNode(R,l);l=null}));this.position++};l.word=function word(l){var m=this.nextToken;if(m&&this.content(m)==="|"){this.position++;return this.namespace()}return this.splitWord(l)};l.loop=function loop(){while(this.position{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(4969));function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var w=function(){function Processor(l,m){this.func=l||function noop(){};this.funcRes=null;this.options=m}var l=Processor.prototype;l._shouldUpdateSelector=function _shouldUpdateSelector(l,m){if(m===void 0){m={}}var v=Object.assign({},this.options,m);if(v.updateSelector===false){return false}else{return typeof l!=="string"}};l._isLossy=function _isLossy(l){if(l===void 0){l={}}var m=Object.assign({},this.options,l);if(m.lossless===false){return true}else{return false}};l._root=function _root(l,m){if(m===void 0){m={}}var v=new y["default"](l,this._parseOptions(m));return v.root};l._parseOptions=function _parseOptions(l){return{lossy:this._isLossy(l)}};l._run=function _run(l,m){var v=this;if(m===void 0){m={}}return new Promise((function(y,w){try{var _=v._root(l,m);Promise.resolve(v.func(_)).then((function(y){var w=undefined;if(v._shouldUpdateSelector(l,m)){w=_.toString();l.selector=w}return{transform:y,root:_,string:w}})).then(y,w)}catch(l){w(l);return}}))};l._runSync=function _runSync(l,m){if(m===void 0){m={}}var v=this._root(l,m);var y=this.func(v);if(y&&typeof y.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var w=undefined;if(m.updateSelector&&typeof l!=="string"){w=v.toString();l.selector=w}return{transform:y,root:v,string:w}};l.ast=function ast(l,m){return this._run(l,m).then((function(l){return l.root}))};l.astSync=function astSync(l,m){return this._runSync(l,m).root};l.transform=function transform(l,m){return this._run(l,m).then((function(l){return l.transform}))};l.transformSync=function transformSync(l,m){return this._runSync(l,m).transform};l.process=function process(l,m){return this._run(l,m).then((function(l){return l.string||l.root.toString()}))};l.processSync=function processSync(l,m){var v=this._runSync(l,m);return v.string||v.root.toString()};return Processor}();m["default"]=w;l.exports=m.default},6382:(l,m,v)=>{"use strict";m.__esModule=true;m.unescapeValue=unescapeValue;m["default"]=void 0;var y=_interopRequireDefault(v(441));var w=_interopRequireDefault(v(4030));var _=_interopRequireDefault(v(59));var k=v(3342);var S;function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,m){for(var v=0;v0&&!l.quoted&&v.before.length===0&&!(l.spaces.value&&l.spaces.value.after)){v.before=" "}return defaultAttrConcat(m,v)})))}m.push("]");m.push(this.rawSpaceAfter);return m.join("")};_createClass(Attribute,[{key:"quoted",get:function get(){var l=this.quoteMark;return l==="'"||l==='"'},set:function set(l){P()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(l){if(!this._constructed){this._quoteMark=l;return}if(this._quoteMark!==l){this._quoteMark=l;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(l){if(this._constructed){var m=unescapeValue(l),v=m.deprecatedUsage,y=m.unescaped,w=m.quoteMark;if(v){O()}if(y===this._value&&w===this._quoteMark){return}this._value=y;this._quoteMark=w;this._syncRawValue()}else{this._value=l}}},{key:"attribute",get:function get(){return this._attribute},set:function set(l){this._handleEscapes("attribute",l);this._attribute=l}}]);return Attribute}(_["default"]);m["default"]=T;T.NO_QUOTE=null;T.SINGLE_QUOTE="'";T.DOUBLE_QUOTE='"';var R=(S={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},S[null]={isIdentifier:true},S);function defaultAttrConcat(l,m){return""+m.before+l+m.after}},9616:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(441));var w=v(7984);var _=_interopRequireDefault(v(2503));var k=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,m){for(var v=0;v{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(2503));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Combinator,l);function Combinator(m){var v;v=l.call(this,m)||this;v.type=w.COMBINATOR;return v}return Combinator}(y["default"]);m["default"]=_;l.exports=m.default},1042:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(2503));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Comment,l);function Comment(m){var v;v=l.call(this,m)||this;v.type=w.COMMENT;return v}return Comment}(y["default"]);m["default"]=_;l.exports=m.default},8280:(l,m,v)=>{"use strict";m.__esModule=true;m.universal=m.tag=m.string=m.selector=m.root=m.pseudo=m.nesting=m.id=m.comment=m.combinator=m.className=m.attribute=void 0;var y=_interopRequireDefault(v(6382));var w=_interopRequireDefault(v(9616));var _=_interopRequireDefault(v(6884));var k=_interopRequireDefault(v(1042));var S=_interopRequireDefault(v(5046));var E=_interopRequireDefault(v(9743));var C=_interopRequireDefault(v(3794));var O=_interopRequireDefault(v(173));var P=_interopRequireDefault(v(8589));var L=_interopRequireDefault(v(2429));var T=_interopRequireDefault(v(2308));var R=_interopRequireDefault(v(4893));function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}var D=function attribute(l){return new y["default"](l)};m.attribute=D;var A=function className(l){return new w["default"](l)};m.className=A;var q=function combinator(l){return new _["default"](l)};m.combinator=q;var F=function comment(l){return new k["default"](l)};m.comment=F;var $=function id(l){return new S["default"](l)};m.id=$;var z=function nesting(l){return new E["default"](l)};m.nesting=z;var V=function pseudo(l){return new C["default"](l)};m.pseudo=V;var U=function root(l){return new O["default"](l)};m.root=U;var W=function selector(l){return new P["default"](l)};m.selector=W;var B=function string(l){return new L["default"](l)};m.string=B;var Q=function tag(l){return new T["default"](l)};m.tag=Q;var Y=function universal(l){return new R["default"](l)};m.universal=Y},4248:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(2503));var w=_interopRequireWildcard(v(3342));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var m=_getRequireWildcardCache();if(m&&m.has(l)){return m.get(l)}var v={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in l){if(Object.prototype.hasOwnProperty.call(l,w)){var _=y?Object.getOwnPropertyDescriptor(l,w):null;if(_&&(_.get||_.set)){Object.defineProperty(v,w,_)}else{v[w]=l[w]}}}v["default"]=l;if(m){m.set(l,v)}return v}function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _createForOfIteratorHelperLoose(l,m){var v;if(typeof Symbol==="undefined"||l[Symbol.iterator]==null){if(Array.isArray(l)||(v=_unsupportedIterableToArray(l))||m&&l&&typeof l.length==="number"){if(v)l=v;var y=0;return function(){if(y>=l.length)return{done:true};return{done:false,value:l[y++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}v=l[Symbol.iterator]();return v.next.bind(v)}function _unsupportedIterableToArray(l,m){if(!l)return;if(typeof l==="string")return _arrayLikeToArray(l,m);var v=Object.prototype.toString.call(l).slice(8,-1);if(v==="Object"&&l.constructor)v=l.constructor.name;if(v==="Map"||v==="Set")return Array.from(l);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return _arrayLikeToArray(l,m)}function _arrayLikeToArray(l,m){if(m==null||m>l.length)m=l.length;for(var v=0,y=new Array(m);v=l){this.indexes[v]=m-1}}return this};m.removeAll=function removeAll(){for(var l=_createForOfIteratorHelperLoose(this.nodes),m;!(m=l()).done;){var v=m.value;v.parent=undefined}this.nodes=[];return this};m.empty=function empty(){return this.removeAll()};m.insertAfter=function insertAfter(l,m){m.parent=this;var v=this.index(l);this.nodes.splice(v+1,0,m);m.parent=this;var y;for(var w in this.indexes){y=this.indexes[w];if(v<=y){this.indexes[w]=y+1}}return this};m.insertBefore=function insertBefore(l,m){m.parent=this;var v=this.index(l);this.nodes.splice(v,0,m);m.parent=this;var y;for(var w in this.indexes){y=this.indexes[w];if(y<=v){this.indexes[w]=y+1}}return this};m._findChildAtPosition=function _findChildAtPosition(l,m){var v=undefined;this.each((function(y){if(y.atPosition){var w=y.atPosition(l,m);if(w){v=w;return false}}else if(y.isAtPosition(l,m)){v=y;return false}}));return v};m.atPosition=function atPosition(l,m){if(this.isAtPosition(l,m)){return this._findChildAtPosition(l,m)||this}else{return undefined}};m._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};m.each=function each(l){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var m=this.lastEach;this.indexes[m]=0;if(!this.length){return undefined}var v,y;while(this.indexes[m]{"use strict";m.__esModule=true;m.isNode=isNode;m.isPseudoElement=isPseudoElement;m.isPseudoClass=isPseudoClass;m.isContainer=isContainer;m.isNamespace=isNamespace;m.isUniversal=m.isTag=m.isString=m.isSelector=m.isRoot=m.isPseudo=m.isNesting=m.isIdentifier=m.isComment=m.isCombinator=m.isClassName=m.isAttribute=void 0;var y=v(3342);var w;var _=(w={},w[y.ATTRIBUTE]=true,w[y.CLASS]=true,w[y.COMBINATOR]=true,w[y.COMMENT]=true,w[y.ID]=true,w[y.NESTING]=true,w[y.PSEUDO]=true,w[y.ROOT]=true,w[y.SELECTOR]=true,w[y.STRING]=true,w[y.TAG]=true,w[y.UNIVERSAL]=true,w);function isNode(l){return typeof l==="object"&&_[l.type]}function isNodeType(l,m){return isNode(m)&&m.type===l}var k=isNodeType.bind(null,y.ATTRIBUTE);m.isAttribute=k;var S=isNodeType.bind(null,y.CLASS);m.isClassName=S;var E=isNodeType.bind(null,y.COMBINATOR);m.isCombinator=E;var C=isNodeType.bind(null,y.COMMENT);m.isComment=C;var O=isNodeType.bind(null,y.ID);m.isIdentifier=O;var P=isNodeType.bind(null,y.NESTING);m.isNesting=P;var L=isNodeType.bind(null,y.PSEUDO);m.isPseudo=L;var T=isNodeType.bind(null,y.ROOT);m.isRoot=T;var R=isNodeType.bind(null,y.SELECTOR);m.isSelector=R;var D=isNodeType.bind(null,y.STRING);m.isString=D;var A=isNodeType.bind(null,y.TAG);m.isTag=A;var q=isNodeType.bind(null,y.UNIVERSAL);m.isUniversal=q;function isPseudoElement(l){return L(l)&&l.value&&(l.value.startsWith("::")||l.value.toLowerCase()===":before"||l.value.toLowerCase()===":after"||l.value.toLowerCase()===":first-letter"||l.value.toLowerCase()===":first-line")}function isPseudoClass(l){return L(l)&&!isPseudoElement(l)}function isContainer(l){return!!(isNode(l)&&l.walk)}function isNamespace(l){return k(l)||A(l)}},5046:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(2503));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(ID,l);function ID(m){var v;v=l.call(this,m)||this;v.type=w.ID;return v}var m=ID.prototype;m.valueToString=function valueToString(){return"#"+l.prototype.valueToString.call(this)};return ID}(y["default"]);m["default"]=_;l.exports=m.default},1534:(l,m,v)=>{"use strict";m.__esModule=true;var y=v(3342);Object.keys(y).forEach((function(l){if(l==="default"||l==="__esModule")return;if(l in m&&m[l]===y[l])return;m[l]=y[l]}));var w=v(8280);Object.keys(w).forEach((function(l){if(l==="default"||l==="__esModule")return;if(l in m&&m[l]===w[l])return;m[l]=w[l]}));var _=v(1836);Object.keys(_).forEach((function(l){if(l==="default"||l==="__esModule")return;if(l in m&&m[l]===_[l])return;m[l]=_[l]}))},59:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(441));var w=v(7984);var _=_interopRequireDefault(v(2503));function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,m){for(var v=0;v{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(2503));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Nesting,l);function Nesting(m){var v;v=l.call(this,m)||this;v.type=w.NESTING;v.value="&";return v}return Nesting}(y["default"]);m["default"]=_;l.exports=m.default},2503:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=v(7984);function _defineProperties(l,m){for(var v=0;vl){return false}if(this.source.end.linem){return false}if(this.source.end.line===l&&this.source.end.column{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(4248));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Pseudo,l);function Pseudo(m){var v;v=l.call(this,m)||this;v.type=w.PSEUDO;return v}var m=Pseudo.prototype;m.toString=function toString(){var l=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),l,this.rawSpaceAfter].join("")};return Pseudo}(y["default"]);m["default"]=_;l.exports=m.default},173:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(4248));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _defineProperties(l,m){for(var v=0;v{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(4248));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Selector,l);function Selector(m){var v;v=l.call(this,m)||this;v.type=w.SELECTOR;return v}return Selector}(y["default"]);m["default"]=_;l.exports=m.default},2429:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(2503));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(String,l);function String(m){var v;v=l.call(this,m)||this;v.type=w.STRING;return v}return String}(y["default"]);m["default"]=_;l.exports=m.default},2308:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(59));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Tag,l);function Tag(m){var v;v=l.call(this,m)||this;v.type=w.TAG;return v}return Tag}(y["default"]);m["default"]=_;l.exports=m.default},3342:(l,m)=>{"use strict";m.__esModule=true;m.UNIVERSAL=m.ATTRIBUTE=m.CLASS=m.COMBINATOR=m.COMMENT=m.ID=m.NESTING=m.PSEUDO=m.ROOT=m.SELECTOR=m.STRING=m.TAG=void 0;var v="tag";m.TAG=v;var y="string";m.STRING=y;var w="selector";m.SELECTOR=w;var _="root";m.ROOT=_;var k="pseudo";m.PSEUDO=k;var S="nesting";m.NESTING=S;var E="id";m.ID=E;var C="comment";m.COMMENT=C;var O="combinator";m.COMBINATOR=O;var P="class";m.CLASS=P;var L="attribute";m.ATTRIBUTE=L;var T="universal";m.UNIVERSAL=T},4893:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=void 0;var y=_interopRequireDefault(v(59));var w=v(3342);function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}function _inheritsLoose(l,m){l.prototype=Object.create(m.prototype);l.prototype.constructor=l;_setPrototypeOf(l,m)}function _setPrototypeOf(l,m){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(l,m){l.__proto__=m;return l};return _setPrototypeOf(l,m)}var _=function(l){_inheritsLoose(Universal,l);function Universal(m){var v;v=l.call(this,m)||this;v.type=w.UNIVERSAL;v.value="*";return v}return Universal}(y["default"]);m["default"]=_;l.exports=m.default},3393:(l,m)=>{"use strict";m.__esModule=true;m["default"]=sortAscending;function sortAscending(l){return l.sort((function(l,m){return l-m}))}l.exports=m.default},9210:(l,m)=>{"use strict";m.__esModule=true;m.combinator=m.word=m.comment=m.str=m.tab=m.newline=m.feed=m.cr=m.backslash=m.bang=m.slash=m.doubleQuote=m.singleQuote=m.space=m.greaterThan=m.pipe=m.equals=m.plus=m.caret=m.tilde=m.dollar=m.closeSquare=m.openSquare=m.closeParenthesis=m.openParenthesis=m.semicolon=m.colon=m.comma=m.at=m.asterisk=m.ampersand=void 0;var v=38;m.ampersand=v;var y=42;m.asterisk=y;var w=64;m.at=w;var _=44;m.comma=_;var k=58;m.colon=k;var S=59;m.semicolon=S;var E=40;m.openParenthesis=E;var C=41;m.closeParenthesis=C;var O=91;m.openSquare=O;var P=93;m.closeSquare=P;var L=36;m.dollar=L;var T=126;m.tilde=T;var R=94;m.caret=R;var D=43;m.plus=D;var A=61;m.equals=A;var q=124;m.pipe=q;var F=62;m.greaterThan=F;var $=32;m.space=$;var z=39;m.singleQuote=z;var V=34;m.doubleQuote=V;var U=47;m.slash=U;var W=33;m.bang=W;var B=92;m.backslash=B;var Q=13;m.cr=Q;var Y=12;m.feed=Y;var G=10;m.newline=G;var J=9;m.tab=J;var Z=z;m.str=Z;var K=-1;m.comment=K;var X=-2;m.word=X;var ee=-3;m.combinator=ee},452:(l,m,v)=>{"use strict";m.__esModule=true;m["default"]=tokenize;m.FIELDS=void 0;var y=_interopRequireWildcard(v(9210));var w,_;function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var l=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return l};return l}function _interopRequireWildcard(l){if(l&&l.__esModule){return l}if(l===null||typeof l!=="object"&&typeof l!=="function"){return{default:l}}var m=_getRequireWildcardCache();if(m&&m.has(l)){return m.get(l)}var v={};var y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in l){if(Object.prototype.hasOwnProperty.call(l,w)){var _=y?Object.getOwnPropertyDescriptor(l,w):null;if(_&&(_.get||_.set)){Object.defineProperty(v,w,_)}else{v[w]=l[w]}}}v["default"]=l;if(m){m.set(l,v)}return v}var k=(w={},w[y.tab]=true,w[y.newline]=true,w[y.cr]=true,w[y.feed]=true,w);var S=(_={},_[y.space]=true,_[y.tab]=true,_[y.newline]=true,_[y.cr]=true,_[y.feed]=true,_[y.ampersand]=true,_[y.asterisk]=true,_[y.bang]=true,_[y.comma]=true,_[y.colon]=true,_[y.semicolon]=true,_[y.openParenthesis]=true,_[y.closeParenthesis]=true,_[y.openSquare]=true,_[y.closeSquare]=true,_[y.singleQuote]=true,_[y.doubleQuote]=true,_[y.plus]=true,_[y.pipe]=true,_[y.tilde]=true,_[y.greaterThan]=true,_[y.equals]=true,_[y.dollar]=true,_[y.caret]=true,_[y.slash]=true,_);var E={};var C="0123456789abcdefABCDEF";for(var O=0;O0){$=S+A;z=F-q[A].length}else{$=S;z=k}U=y.comment;S=$;T=$;L=F-z}else if(O===y.slash){F=E;U=O;T=S;L=E-k;C=F+1}else{F=consumeWord(v,E);U=y.word;T=S;L=F-k}C=F+1;break}m.push([U,S,E-k,T,L,E,C]);if(z){k=z;z=null}E=C}return m}},6093:(l,m)=>{"use strict";m.__esModule=true;m["default"]=ensureObject;function ensureObject(l){for(var m=arguments.length,v=new Array(m>1?m-1:0),y=1;y0){var w=v.shift();if(!l[w]){l[w]={}}l=l[w]}}l.exports=m.default},9533:(l,m)=>{"use strict";m.__esModule=true;m["default"]=getProp;function getProp(l){for(var m=arguments.length,v=new Array(m>1?m-1:0),y=1;y0){var w=v.shift();if(!l[w]){return undefined}l=l[w]}return l}l.exports=m.default},7984:(l,m,v)=>{"use strict";m.__esModule=true;m.stripComments=m.ensureObject=m.getProp=m.unesc=void 0;var y=_interopRequireDefault(v(4030));m.unesc=y["default"];var w=_interopRequireDefault(v(9533));m.getProp=w["default"];var _=_interopRequireDefault(v(6093));m.ensureObject=_["default"];var k=_interopRequireDefault(v(6386));m.stripComments=k["default"];function _interopRequireDefault(l){return l&&l.__esModule?l:{default:l}}},6386:(l,m)=>{"use strict";m.__esModule=true;m["default"]=stripComments;function stripComments(l){var m="";var v=l.indexOf("/*");var y=0;while(v>=0){m=m+l.slice(y,v);var w=l.indexOf("*/",v+2);if(w<0){return m}y=w+2;v=l.indexOf("/*",y)}m=m+l.slice(y);return m}l.exports=m.default},4030:(l,m)=>{"use strict";m.__esModule=true;m["default"]=unesc;function gobbleHex(l){var m=l.toLowerCase();var v="";var y=false;for(var w=0;w<6&&m[w]!==undefined;w++){var _=m.charCodeAt(w);var k=_>=97&&_<=102||_>=48&&_<=57;y=_===32;if(!k){break}v+=m[w]}if(v.length===0){return undefined}var S=parseInt(v,16);var E=S>=55296&&S<=57343;if(E||S===0||S>1114111){return["�",v.length+(y?1:0)]}return[String.fromCodePoint(S),v.length+(y?1:0)]}var v=/\\/;function unesc(l){var m=v.test(l);if(!m){return l}var y="";for(var w=0;w{"use strict";const y=v(475);function parseSelectors(l,m){return y(m).processSync(l)}function unique(l){const m=[...new Set(l.selectors)];m.sort();return m.join()}function pluginCreator(){return{postcssPlugin:"postcss-unique-selectors",OnceExit(l){l.walkRules((l=>{let m=[];const removeAndSaveComments=l=>{l.walk((l=>{if(l.type==="comment"){m.push(l.value);l.remove();return}else{return}}))};if(l.raws.selector&&l.raws.selector.raw){parseSelectors(l.raws.selector.raw,removeAndSaveComments);l.raws.selector.raw=unique(l)}l.selector=parseSelectors(l.selector,removeAndSaveComments);l.selector=unique(l);l.selectors=l.selectors.concat(m)}))}}}pluginCreator.postcss=true;l.exports=pluginCreator},2334:l=>{"use strict";const m="firefox 2";const v="ie 5.5";const y="ie 6";const w="ie 7";const _="ie 8";const k="opera 9";l.exports={FF_2:m,IE_5_5:v,IE_6:y,IE_7:w,IE_8:_,OP_9:k}},3447:l=>{"use strict";const m="media query";const v="property";const y="selector";const w="value";l.exports={MEDIA_QUERY:m,PROPERTY:v,SELECTOR:y,VALUE:w}},7122:l=>{"use strict";const m="atrule";const v="decl";const y="rule";l.exports={ATRULE:m,DECL:v,RULE:y}},4345:l=>{"use strict";const m="body";const v="html";l.exports={BODY:m,HTML:v}},9303:l=>{"use strict";l.exports=function exists(l,m,v){const y=l.at(m);return y&&y.value&&y.value.toLowerCase()===v}},5377:(l,m,v)=>{"use strict";const y=v(4907);const w=v(7203);function pluginCreator(l={}){return{postcssPlugin:"stylehacks",OnceExit(m,{result:v}){const _=v.opts||{};const k=y(null,{stats:_.stats,path:__dirname,env:_.env});const S=[];for(const l of w){const m=new l(v);if(!k.some((l=>m.targets.has(l)))){S.push(m)}}m.walk((m=>{S.forEach((v=>{if(!v.nodeTypes.has(m.type)){return}if(l.lint){return v.detectAndWarn(m)}return v.detectAndResolve(m)}))}))}}}pluginCreator.detect=l=>w.some((m=>{const v=new m;return v.any(l)}));pluginCreator.postcss=true;l.exports=pluginCreator},9192:l=>{"use strict";l.exports=function isMixin(l){const{selector:m}=l;if(!m||m[m.length-1]===":"){return true}return false}},7849:l=>{"use strict";l.exports=class BasePlugin{constructor(l,m,v){this.nodes=[];this.targets=new Set(l);this.nodeTypes=new Set(m);this.result=v}push(l,m){l._stylehacks=Object.assign({},m,{message:`Bad ${m.identifier}: ${m.hack}`,browsers:this.targets});this.nodes.push(l)}any(l){if(this.nodeTypes.has(l.type)){this.detect(l);return l._stylehacks!==undefined}return false}detectAndResolve(l){this.nodes=[];this.detect(l);return this.resolve()}detectAndWarn(l){this.nodes=[];this.detect(l);return this.warn()}detect(l){throw new Error("You need to implement this method in a subclass.")}resolve(){return this.nodes.forEach((l=>l.remove()))}warn(){return this.nodes.forEach((l=>{const{message:m,browsers:v,identifier:y,hack:w}=l._stylehacks;return l.warn(this.result,m+JSON.stringify({browsers:v,identifier:y,hack:w}))}))}}},7727:(l,m,v)=>{"use strict";const y=v(475);const w=v(9303);const _=v(9192);const k=v(7849);const{FF_2:S}=v(2334);const{SELECTOR:E}=v(3447);const{RULE:C}=v(7122);const{BODY:O}=v(4345);l.exports=class BodyEmpty extends k{constructor(l){super([S],[C],l)}detect(l){if(_(l)){return}y(this.analyse(l)).processSync(l.selector)}analyse(l){return m=>{m.each((m=>{if(w(m,0,O)&&w(m,1,":empty")&&w(m,2," ")&&m.at(3)){this.push(l,{identifier:E,hack:m.toString()})}}))}}}},8775:(l,m,v)=>{"use strict";const y=v(475);const w=v(9303);const _=v(9192);const k=v(7849);const{IE_5_5:S,IE_6:E,IE_7:C}=v(2334);const{SELECTOR:O}=v(3447);const{RULE:P}=v(7122);const{BODY:L,HTML:T}=v(4345);l.exports=class HtmlCombinatorCommentBody extends k{constructor(l){super([S,E,C],[P],l)}detect(l){if(_(l)){return}if(l.raws.selector&&l.raws.selector.raw){y(this.analyse(l)).processSync(l.raws.selector.raw)}}analyse(l){return m=>{m.each((m=>{if(w(m,0,T)&&(w(m,1,">")||w(m,1,"~"))&&m.at(2)&&m.at(2).type==="comment"&&w(m,3," ")&&w(m,4,L)&&w(m,5," ")&&m.at(6)){this.push(l,{identifier:O,hack:m.toString()})}}))}}}},3816:(l,m,v)=>{"use strict";const y=v(475);const w=v(9303);const _=v(9192);const k=v(7849);const{OP_9:S}=v(2334);const{SELECTOR:E}=v(3447);const{RULE:C}=v(7122);const{HTML:O}=v(4345);l.exports=class HtmlFirstChild extends k{constructor(l){super([S],[C],l)}detect(l){if(_(l)){return}y(this.analyse(l)).processSync(l.selector)}analyse(l){return m=>{m.each((m=>{if(w(m,0,O)&&w(m,1,":first-child")&&w(m,2," ")&&m.at(3)){this.push(l,{identifier:E,hack:m.toString()})}}))}}}},8543:(l,m,v)=>{"use strict";const y=v(7849);const{IE_5_5:w,IE_6:_,IE_7:k}=v(2334);const{DECL:S}=v(7122);l.exports=class Important extends y{constructor(l){super([w,_,k],[S],l)}detect(l){const m=l.value.match(/!\w/);if(m&&m.index){const v=l.value.substr(m.index,l.value.length-1);this.push(l,{identifier:"!important",hack:v})}}}},7203:(l,m,v)=>{"use strict";const y=v(7727);const w=v(8775);const _=v(3816);const k=v(8543);const S=v(5959);const E=v(5192);const C=v(7246);const O=v(1521);const P=v(9170);const L=v(6911);const T=v(1909);const R=v(4765);l.exports=[y,w,_,k,S,E,C,O,P,L,T,R]},5959:(l,m,v)=>{"use strict";const y=v(7849);const{IE_5_5:w,IE_6:_,IE_7:k}=v(2334);const{PROPERTY:S}=v(3447);const{ATRULE:E,DECL:C}=v(7122);const O="!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|".split("_");l.exports=class LeadingStar extends y{constructor(l){super([w,_,k],[E,C],l)}detect(l){if(l.type===C){O.forEach((m=>{if(!l.prop.indexOf(m)){this.push(l,{identifier:S,hack:l.prop})}}));const{before:m}=l.raws;if(!m){return}O.forEach((v=>{if(m.includes(v)){this.push(l,{identifier:S,hack:`${m.trim()}${l.prop}`})}}))}else{const{name:m}=l;const v=m.length-1;if(m.lastIndexOf(":")===v){this.push(l,{identifier:S,hack:`@${m.substr(0,v)}`})}}}}},5192:(l,m,v)=>{"use strict";const y=v(7849);const{IE_6:w}=v(2334);const{PROPERTY:_}=v(3447);const{DECL:k}=v(7122);function vendorPrefix(l){let m=l.match(/^(-\w+-)/);if(m){return m[0]}return""}l.exports=class LeadingUnderscore extends y{constructor(l){super([w],[k],l)}detect(l){const{before:m}=l.raws;if(m&&m.includes("_")){this.push(l,{identifier:_,hack:`${m.trim()}${l.prop}`})}if(l.prop[0]==="-"&&l.prop[1]!=="-"&&vendorPrefix(l.prop)===""){this.push(l,{identifier:_,hack:l.prop})}}}},7246:(l,m,v)=>{"use strict";const y=v(7849);const{IE_8:w}=v(2334);const{MEDIA_QUERY:_}=v(3447);const{ATRULE:k}=v(7122);l.exports=class MediaSlash0 extends y{constructor(l){super([w],[k],l)}detect(l){const m=l.params.trim();if(m.toLowerCase()==="\\0screen"){this.push(l,{identifier:_,hack:m})}}}},1521:(l,m,v)=>{"use strict";const y=v(7849);const{IE_5_5:w,IE_6:_,IE_7:k,IE_8:S}=v(2334);const{MEDIA_QUERY:E}=v(3447);const{ATRULE:C}=v(7122);l.exports=class MediaSlash0Slash9 extends y{constructor(l){super([w,_,k,S],[C],l)}detect(l){const m=l.params.trim();if(m.toLowerCase()==="\\0screen\\,screen\\9"){this.push(l,{identifier:E,hack:m})}}}},9170:(l,m,v)=>{"use strict";const y=v(7849);const{IE_5_5:w,IE_6:_,IE_7:k}=v(2334);const{MEDIA_QUERY:S}=v(3447);const{ATRULE:E}=v(7122);l.exports=class MediaSlash9 extends y{constructor(l){super([w,_,k],[E],l)}detect(l){const m=l.params.trim();if(m.toLowerCase()==="screen\\9"){this.push(l,{identifier:S,hack:m})}}}},6911:(l,m,v)=>{"use strict";const y=v(7849);const{IE_6:w,IE_7:_,IE_8:k}=v(2334);const{VALUE:S}=v(3447);const{DECL:E}=v(7122);l.exports=class Slash9 extends y{constructor(l){super([w,_,k],[E],l)}detect(l){let m=l.value;if(m&&m.length>2&&m.indexOf("\\9")===m.length-2){this.push(l,{identifier:S,hack:m})}}}},1909:(l,m,v)=>{"use strict";const y=v(475);const w=v(9303);const _=v(9192);const k=v(7849);const{IE_5_5:S,IE_6:E}=v(2334);const{SELECTOR:C}=v(3447);const{RULE:O}=v(7122);const{HTML:P}=v(4345);l.exports=class StarHtml extends k{constructor(l){super([S,E],[O],l)}detect(l){if(_(l)){return}y(this.analyse(l)).processSync(l.selector)}analyse(l){return m=>{m.each((m=>{if(w(m,0,"*")&&w(m,1," ")&&w(m,2,P)&&w(m,3," ")&&m.at(4)){this.push(l,{identifier:C,hack:m.toString()})}}))}}}},4765:(l,m,v)=>{"use strict";const y=v(7849);const w=v(9192);const{IE_5_5:_,IE_6:k,IE_7:S}=v(2334);const{SELECTOR:E}=v(3447);const{RULE:C}=v(7122);l.exports=class TrailingSlashComma extends y{constructor(l){super([_,k,S],[C],l)}detect(l){if(w(l)){return}const{selector:m}=l;const v=m.trim();if(v.lastIndexOf(",")===m.length-1||v.lastIndexOf("\\")===m.length-1){this.push(l,{identifier:E,hack:m})}}}},6124:(l,m,v)=>{l.exports=v(3837).deprecate},740:(l,m,v)=>{l.exports=function(l={}){const m=Object.assign({},{cssDeclarationSorter:{exclude:true},calc:{exclude:true}},l);return v(6501)(m)}},9536:(l,m,v)=>{const y=v(740);l.exports=(l={},m=v(977))=>{const w=Boolean(l&&l.excludeAll);const _=Object.assign({},l);if(w){for(const l in _){if(!_.hasOwnProperty(l))continue;const m=_[l];if(!Boolean(m)){continue}if(Object.prototype.toString.call(m)==="[object Object]"){_[l]=Object.assign({},{exclude:false},m)}}}const k=Object.assign({},w?{rawCache:true}:undefined,_);const S=[];y(k).plugins.forEach((l=>{if(Array.isArray(l)){let[m,v]=l;m=m.default||m;const y=!w&&typeof v==="undefined"||typeof v==="boolean"&&v||!w&&v&&typeof v==="object"&&!v.exclude||w&&v&&typeof v==="object"&&v.exclude===false;if(y){S.push(m(v))}}else{S.push(l)}}));return m(S)};l.exports.postcss=true},9613:l=>{"use strict";l.exports=require("caniuse-lite")},4907:l=>{"use strict";l.exports=require("next/dist/compiled/browserslist")},8248:l=>{"use strict";l.exports=require("next/dist/compiled/postcss-plugin-stub-for-cssnano-simple")},2045:l=>{"use strict";l.exports=require("next/dist/compiled/postcss-value-parser")},1017:l=>{"use strict";l.exports=require("path")},977:l=>{"use strict";l.exports=require("postcss")},3837:l=>{"use strict";l.exports=require("util")},2818:(l,m,v)=>{"use strict";const y=v(2642);Object.defineProperty(m,"__esModule",{value:true});const w={animation:["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state"],background:["background-image","background-size","background-position","background-repeat","background-origin","background-clip","background-attachment","background-color"],columns:["column-width","column-count"],"column-rule":["column-rule-width","column-rule-style","column-rule-color"],flex:["flex-grow","flex-shrink","flex-basis"],"flex-flow":["flex-direction","flex-wrap"],font:["font-style","font-variant","font-weight","font-stretch","font-size","font-family","line-height"],grid:["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow","column-gap","row-gap"],"grid-area":["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],"grid-column":["grid-column-start","grid-column-end"],"grid-row":["grid-row-start","grid-row-end"],"grid-template":["grid-template-columns","grid-template-rows","grid-template-areas"],"list-style":["list-style-type","list-style-position","list-style-image"],padding:["padding-block","padding-block-start","padding-block-end","padding-inline","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left"],"padding-block":["padding-block-start","padding-block-end","padding-top","padding-right","padding-bottom","padding-left"],"padding-block-start":["padding-top","padding-right","padding-left"],"padding-block-end":["padding-right","padding-bottom","padding-left"],"padding-inline":["padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left"],"padding-inline-start":["padding-top","padding-right","padding-left"],"padding-inline-end":["padding-right","padding-bottom","padding-left"],margin:["margin-block","margin-block-start","margin-block-end","margin-inline","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left"],"margin-block":["margin-block-start","margin-block-end","margin-top","margin-right","margin-bottom","margin-left"],"margin-inline":["margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left"],"margin-inline-start":["margin-top","margin-right","margin-bottom","margin-left"],"margin-inline-end":["margin-top","margin-right","margin-bottom","margin-left"],border:["border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-inline-start-width","border-inline-end-width","border-block-start-width","border-block-end-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-inline-start-style","border-inline-end-style","border-block-start-style","border-block-end-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-inline-start-color","border-inline-end-color","border-block-start-color","border-block-end-color","border-block","border-block-start","border-block-end","border-block-width","border-block-style","border-block-color","border-inline","border-inline-start","border-inline-end","border-inline-width","border-inline-style","border-inline-color"],"border-top":["border-width","border-style","border-color","border-top-width","border-top-style","border-top-color"],"border-right":["border-width","border-style","border-color","border-right-width","border-right-style","border-right-color"],"border-bottom":["border-width","border-style","border-color","border-bottom-width","border-bottom-style","border-bottom-color"],"border-left":["border-width","border-style","border-color","border-left-width","border-left-style","border-left-color"],"border-color":["border-top-color","border-bottom-color","border-left-color","border-right-color","border-inline-start-color","border-inline-end-color","border-block-start-color","border-block-end-color"],"border-width":["border-top-width","border-bottom-width","border-left-width","border-right-width","border-inline-start-width","border-inline-end-width","border-block-start-width","border-block-end-width"],"border-style":["border-top-style","border-bottom-style","border-left-style","border-right-style","border-inline-start-style","border-inline-end-style","border-block-start-style","border-block-end-style"],"border-radius":["border-top-right-radius","border-top-left-radius","border-bottom-right-radius","border-bottom-left-radius"],"border-block":["border-block-start","border-block-end","border-block-width","border-width","border-block-style","border-style","border-block-color","border-color"],"border-block-start":["border-block-start-width","border-width","border-block-start-style","border-style","border-block-start-color","border-color"],"border-block-end":["border-block-end-width","border-width","border-block-end-style","border-style","border-block-end-color","border-color"],"border-inline":["border-inline-start","border-inline-end","border-inline-width","border-width","border-inline-style","border-style","border-inline-color","border-color"],"border-inline-start":["border-inline-start-width","border-width","border-inline-start-style","border-style","border-inline-start-color","border-color"],"border-inline-end":["border-inline-end-width","border-width","border-inline-end-style","border-style","border-inline-end-color","border-color"],"border-image":["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],mask:["mask-image","mask-mode","mask-position","mask-size","mask-repeat","mask-origin","mask-clip","mask-composite"],"inline-size":["width","height"],"block-size":["width","height"],"max-inline-size":["max-width","max-height"],"max-block-size":["max-width","max-height"],inset:["inset-block","inset-block-start","inset-block-end","inset-inline","inset-inline-start","inset-inline-end","top","right","bottom","left"],"inset-block":["inset-block-start","inset-block-end","top","right","bottom","left"],"inset-inline":["inset-inline-start","inset-inline-end","top","right","bottom","left"],outline:["outline-color","outline-style","outline-width"],overflow:["overflow-x","overflow-y"],"place-content":["align-content","justify-content"],"place-items":["align-items","justify-items"],"place-self":["align-self","justify-self"],"text-decoration":["text-decoration-color","text-decoration-style","text-decoration-line"],transition:["transition-delay","transition-duration","transition-property","transition-timing-function"],"text-emphasis":["text-emphasis-style","text-emphasis-color"]};function __variableDynamicImportRuntime0__(l){switch(l){case"../orders/alphabetical.mjs":return Promise.resolve().then((function(){return S}));case"../orders/concentric-css.mjs":return Promise.resolve().then((function(){return C}));case"../orders/smacss.mjs":return Promise.resolve().then((function(){return P}));default:return new Promise((function(m,v){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(v.bind(null,new Error("Unknown variable dynamic import: "+l)))}))}}const _=["alphabetical","concentric-css","smacss"];const cssDeclarationSorter=({order:l="alphabetical",keepOverrides:m=false}={})=>({postcssPlugin:"css-declaration-sorter",OnceExit(v){let withKeepOverrides=l=>l;if(m){withKeepOverrides=withOverridesComparator(w)}if(typeof l==="function"){return processCss({css:v,comparator:withKeepOverrides(l)})}if(!_.includes(l))return Promise.reject(Error([`Invalid built-in order '${l}' provided.`,`Available built-in orders are: ${_}`].join("\n")));return __variableDynamicImportRuntime0__(`../orders/${l}.mjs`).then((({properties:l})=>processCss({css:v,comparator:withKeepOverrides(orderComparator(l))})))}});cssDeclarationSorter.postcss=true;function processCss({css:l,comparator:m}){const v=[];const y=[];l.walk((l=>{const m=l.nodes;const w=l.type;if(w==="comment"){const m=l.raws.before&&l.raws.before.includes("\n");const y=m&&!l.next();const w=!l.prev()&&!l.next()||!l.parent;if(y||w||l.parent.type==="root"){return}if(m){const m=l.next()||l.prev();if(m){v.unshift({comment:l,pairedNode:m,insertPosition:l.next()?"Before":"After"});l.remove()}}else{const m=l.prev()||l.next();if(m){v.push({comment:l,pairedNode:m,insertPosition:"After"});l.remove()}}return}const _=w==="rule"||w==="atrule";if(_&&m&&m.length>1){y.push(m)}}));y.forEach((l=>{sortCssDeclarations({nodes:l,comparator:m})}));v.forEach((l=>{const m=l.pairedNode;l.comment.remove();m.parent&&m.parent["insert"+l.insertPosition](m,l.comment)}))}function sortCssDeclarations({nodes:l,comparator:m}){y(l,((l,v)=>{if(l.type==="decl"&&v.type==="decl"){return m(l.prop,v.prop)}else{return compareDifferentType(l,v)}}))}function withOverridesComparator(l){return function(m){return function(v,y){v=removeVendorPrefix(v);y=removeVendorPrefix(y);if(l[v]&&l[v].includes(y))return 0;if(l[y]&&l[y].includes(v))return 0;return m(v,y)}}}function orderComparator(l){return function(m,v){return l.indexOf(m)-l.indexOf(v)}}function compareDifferentType(l,m){if(m.type==="atrule"){return 0}return l.type==="decl"?-1:m.type==="decl"?1:0}function removeVendorPrefix(l){return l.replace(/^-\w+-/,"")}const k=["all","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","accent-color","align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","ascent-override","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip-path","color","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","counter-set","cursor","descent-override","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphens","image-orientation","image-rendering","inline-size","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-gap-override","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","mask","mask-border","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-inline","overflow-wrap","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","print-color-adjust","quotes","resize","right","rotate","row-gap","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","size-adjust","src","tab-size","table-layout","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-offset","text-underline-position","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-select","vertical-align","visibility","white-space","widows","width","will-change","word-break","word-spacing","writing-mode","z-index"];var S=Object.freeze({__proto__:null,properties:k});const E=["all","display","position","top","right","bottom","left","offset","offset-anchor","offset-distance","offset-path","offset-rotate","grid","grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow","column-gap","row-gap","grid-area","grid-row","grid-row-start","grid-row-end","grid-column","grid-column-start","grid-column-end","grid-template","flex","flex-grow","flex-shrink","flex-basis","flex-direction","flex-flow","flex-wrap","box-decoration-break","place-content","align-content","justify-content","place-items","align-items","justify-items","place-self","align-self","justify-self","vertical-align","order","float","clear","shape-margin","shape-outside","shape-image-threshold","orphans","gap","columns","column-fill","column-rule","column-rule-width","column-rule-style","column-rule-color","column-width","column-span","column-count","break-before","break-after","break-inside","page","page-break-before","page-break-after","page-break-inside","transform","transform-box","transform-origin","transform-style","translate","rotate","scale","perspective","perspective-origin","appearance","visibility","content-visibility","opacity","z-index","paint-order","mix-blend-mode","backface-visibility","backdrop-filter","clip-path","mask","mask-border","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-image","mask-mode","mask-position","mask-size","mask-repeat","mask-origin","mask-clip","mask-composite","mask-type","filter","animation","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name","transition","transition-delay","transition-duration","transition-property","transition-timing-function","will-change","counter-increment","counter-reset","counter-set","cursor","box-sizing","contain","margin","margin-top","margin-right","margin-bottom","margin-left","margin-inline","margin-inline-start","margin-inline-end","margin-block","margin-block-start","margin-block-end","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","outline","outline-color","outline-style","outline-width","outline-offset","box-shadow","border","border-top","border-right","border-bottom","border-left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","border-radius","border-top-right-radius","border-top-left-radius","border-bottom-right-radius","border-bottom-left-radius","border-inline","border-inline-width","border-inline-style","border-inline-color","border-inline-start","border-inline-start-width","border-inline-start-style","border-inline-start-color","border-inline-end","border-inline-end-width","border-inline-end-style","border-inline-end-color","border-block","border-block-width","border-block-style","border-block-color","border-block-start","border-block-start-width","border-block-start-style","border-block-start-color","border-block-end","border-block-end-width","border-block-end-style","border-block-end-color","border-image","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat","border-collapse","border-spacing","border-start-start-radius","border-start-end-radius","border-end-start-radius","border-end-end-radius","background","background-image","background-position","background-size","background-repeat","background-origin","background-clip","background-attachment","background-color","background-blend-mode","background-position-x","background-position-y","isolation","padding","padding-top","padding-right","padding-bottom","padding-left","padding-inline","padding-inline-start","padding-inline-end","padding-block","padding-block-start","padding-block-end","image-orientation","image-rendering","aspect-ratio","width","min-width","max-width","height","min-height","max-height","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","table-layout","caption-side","empty-cells","overflow","overflow-anchor","overflow-block","overflow-inline","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","resize","object-fit","object-position","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","touch-action","pointer-events","content","quotes","hanging-punctuation","color","accent-color","print-color-adjust","forced-color-adjust","color-scheme","caret-color","font","font-style","font-variant","font-weight","font-stretch","font-size","size-adjust","line-height","src","font-family","font-display","font-kerning","font-language-override","font-optical-sizing","font-size-adjust","font-synthesis","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","ascent-override","descent-override","line-gap-override","hyphens","hyphenate-character","letter-spacing","line-break","list-style","list-style-type","list-style-image","list-style-position","writing-mode","direction","unicode-bidi","unicode-range","user-select","ruby-position","text-combine-upright","text-align","text-align-last","text-decoration","text-decoration-line","text-decoration-style","text-decoration-color","text-decoration-thickness","text-decoration-skip-ink","text-emphasis","text-emphasis-style","text-emphasis-color","text-emphasis-position","text-indent","text-justify","text-underline-position","text-underline-offset","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","white-space","word-break","word-spacing","overflow-wrap","tab-size","widows"];var C=Object.freeze({__proto__:null,properties:E});const O=["all","box-sizing","contain","display","appearance","visibility","content-visibility","z-index","paint-order","position","top","right","bottom","left","offset","offset-anchor","offset-distance","offset-path","offset-rotate","grid","grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow","column-gap","row-gap","grid-area","grid-row","grid-row-start","grid-row-end","grid-column","grid-column-start","grid-column-end","grid-template","flex","flex-grow","flex-shrink","flex-basis","flex-direction","flex-flow","flex-wrap","box-decoration-break","place-content","place-items","place-self","align-content","align-items","align-self","justify-content","justify-items","justify-self","order","aspect-ratio","width","min-width","max-width","height","min-height","max-height","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","margin","margin-top","margin-right","margin-bottom","margin-left","margin-inline","margin-inline-start","margin-inline-end","margin-block","margin-block-start","margin-block-end","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","padding","padding-top","padding-right","padding-bottom","padding-left","padding-inline","padding-inline-start","padding-inline-end","padding-block","padding-block-start","padding-block-end","float","clear","overflow","overflow-anchor","overflow-block","overflow-inline","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","orphans","gap","columns","column-fill","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-count","column-width","object-fit","object-position","transform","transform-box","transform-origin","transform-style","translate","rotate","scale","border","border-top","border-right","border-bottom","border-left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-radius","border-top-right-radius","border-top-left-radius","border-bottom-right-radius","border-bottom-left-radius","border-inline","border-inline-color","border-inline-style","border-inline-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-block","border-block-color","border-block-style","border-block-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-collapse","border-spacing","border-start-start-radius","border-start-end-radius","border-end-start-radius","border-end-end-radius","outline","outline-color","outline-style","outline-width","outline-offset","backdrop-filter","backface-visibility","background","background-image","background-position","background-size","background-repeat","background-origin","background-clip","background-attachment","background-color","background-blend-mode","background-position-x","background-position-y","box-shadow","isolation","content","quotes","hanging-punctuation","color","accent-color","print-color-adjust","forced-color-adjust","color-scheme","caret-color","font","font-style","font-variant","font-weight","src","font-stretch","font-size","size-adjust","line-height","font-family","font-display","font-kerning","font-language-override","font-optical-sizing","font-size-adjust","font-synthesis","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","ascent-override","descent-override","line-gap-override","hyphens","hyphenate-character","letter-spacing","line-break","list-style","list-style-image","list-style-position","list-style-type","direction","text-align","text-align-last","text-decoration","text-decoration-line","text-decoration-style","text-decoration-color","text-decoration-thickness","text-decoration-skip-ink","text-emphasis","text-emphasis-style","text-emphasis-color","text-emphasis-position","text-indent","text-justify","text-underline-position","text-underline-offset","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","vertical-align","white-space","word-break","word-spacing","overflow-wrap","animation","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name","mix-blend-mode","break-before","break-after","break-inside","page","page-break-before","page-break-after","page-break-inside","caption-side","clip-path","counter-increment","counter-reset","counter-set","cursor","empty-cells","filter","image-orientation","image-rendering","mask","mask-border","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","opacity","perspective","perspective-origin","pointer-events","resize","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","tab-size","table-layout","ruby-position","text-combine-upright","touch-action","transition","transition-delay","transition-duration","transition-property","transition-timing-function","will-change","unicode-bidi","unicode-range","user-select","widows","writing-mode"];var P=Object.freeze({__proto__:null,properties:O});m.cssDeclarationSorter=cssDeclarationSorter;m["default"]=cssDeclarationSorter;l.exports=cssDeclarationSorter},2642:l=>{"use strict";l.exports=function(l,m){m=m?m:(l,m)=>{if(lm)return 1;return 0};let v=l.map(((l,m)=>[l,m]));const stableComparator=(l,v)=>{let y=m(l[0],v[0]);if(y!=0)return y;return l[1]-v[1]};v.sort(stableComparator);for(let m=0;m{"use strict";l.exports=JSON.parse('{"list-style-type":["afar","amharic","amharic-abegede","arabic-indic","armenian","asterisks","bengali","binary","cambodian","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","decimal","decimal-leading-zero","devanagari","disc","disclosure-closed","disclosure-open","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","footnotes","georgian","gujarati","gurmukhi","hangul","hangul-consonant","hebrew","hiragana","hiragana-iroha","japanese-formal","japanese-informal","kannada","katakana","katakana-iroha","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","lao","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","malayalam","mongolian","myanmar","octal","oriya","oromo","persian","sidama","simp-chinese-formal","simp-chinese-informal","somali","square","string","symbols","tamil","telugu","thai","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","trad-chinese-formal","trad-chinese-informal","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","urdu"]}')},1030:l=>{"use strict";l.exports=JSON.parse('{"-webkit-line-clamp":"none","accent-color":"auto","align-content":"normal","align-items":"normal","align-self":"auto","align-tracks":"normal","animation-delay":"0s","animation-direction":"normal","animation-duration":"0s","animation-fill-mode":"none","animation-iteration-count":"1","animation-name":"none","animation-timing-function":"ease","animation-timeline":"auto","appearance":"none","aspect-ratio":"auto","azimuth":"center","backdrop-filter":"none","background-attachment":"scroll","background-blend-mode":"normal","background-image":"none","background-position":"0% 0%","background-position-x":"0%","background-position-y":"0%","background-repeat":"repeat","block-overflow":"clip","block-size":"auto","border-block-style":"none","border-block-width":"medium","border-block-end-style":"none","border-block-end-width":"medium","border-block-start-style":"none","border-block-start-width":"medium","border-bottom-left-radius":"0","border-bottom-right-radius":"0","border-bottom-style":"none","border-bottom-width":"medium","border-end-end-radius":"0","border-end-start-radius":"0","border-image-outset":"0","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-inline-style":"none","border-inline-width":"medium","border-inline-end-style":"none","border-inline-end-width":"medium","border-inline-start-style":"none","border-inline-start-width":"medium","border-left-style":"none","border-left-width":"medium","border-right-style":"none","border-right-width":"medium","border-spacing":"0","border-start-end-radius":"0","border-start-start-radius":"0","border-top-left-radius":"0","border-top-right-radius":"0","border-top-style":"none","border-top-width":"medium","bottom":"auto","box-decoration-break":"slice","box-shadow":"none","break-after":"auto","break-before":"auto","break-inside":"auto","caption-side":"top","caret-color":"auto","caret-shape":"auto","clear":"none","clip":"auto","clip-path":"none","color-scheme":"normal","column-count":"auto","column-gap":"normal","column-rule-style":"none","column-rule-width":"medium","column-span":"none","column-width":"auto","contain":"none","contain-intrinsic-block-size":"none","contain-intrinsic-height":"none","contain-intrinsic-inline-size":"none","contain-intrinsic-width":"none","content":"normal","counter-increment":"none","counter-reset":"none","counter-set":"none","cursor":"auto","direction":"ltr","empty-cells":"show","filter":"none","flex-basis":"auto","flex-direction":"row","flex-grow":"0","flex-shrink":"1","flex-wrap":"nowrap","float":"none","font-feature-settings":"normal","font-kerning":"auto","font-language-override":"normal","font-optical-sizing":"auto","font-variation-settings":"normal","font-size":"medium","font-size-adjust":"none","font-stretch":"normal","font-style":"normal","font-variant":"normal","font-variant-alternates":"normal","font-variant-caps":"normal","font-variant-east-asian":"normal","font-variant-ligatures":"normal","font-variant-numeric":"normal","font-variant-position":"normal","font-weight":"normal","forced-color-adjust":"auto","grid-auto-columns":"auto","grid-auto-flow":"row","grid-auto-rows":"auto","grid-column-end":"auto","grid-column-gap":"0","grid-column-start":"auto","grid-row-end":"auto","grid-row-gap":"0","grid-row-start":"auto","grid-template-areas":"none","grid-template-columns":"none","grid-template-rows":"none","hanging-punctuation":"none","height":"auto","hyphenate-character":"auto","hyphens":"manual","image-rendering":"auto","image-resolution":"1dppx","ime-mode":"auto","initial-letter":"normal","initial-letter-align":"auto","inline-size":"auto","input-security":"auto","inset":"auto","inset-block":"auto","inset-block-end":"auto","inset-block-start":"auto","inset-inline":"auto","inset-inline-end":"auto","inset-inline-start":"auto","isolation":"auto","justify-content":"normal","justify-items":"legacy","justify-self":"auto","justify-tracks":"normal","left":"auto","letter-spacing":"normal","line-break":"auto","line-clamp":"none","line-height":"normal","line-height-step":"0","list-style-image":"none","list-style-type":"disc","margin-block":"0","margin-block-end":"0","margin-block-start":"0","margin-bottom":"0","margin-inline":"0","margin-inline-end":"0","margin-inline-start":"0","margin-left":"0","margin-right":"0","margin-top":"0","margin-trim":"none","mask-border-mode":"alpha","mask-border-outset":"0","mask-border-slice":"0","mask-border-source":"none","mask-border-width":"auto","mask-composite":"add","mask-image":"none","mask-position":"center","mask-repeat":"repeat","mask-size":"auto","masonry-auto-flow":"pack","math-depth":"0","math-shift":"normal","math-style":"normal","max-block-size":"none","max-height":"none","max-inline-size":"none","max-lines":"none","max-width":"none","min-block-size":"0","min-height":"auto","min-inline-size":"0","min-width":"auto","mix-blend-mode":"normal","object-fit":"fill","offset-anchor":"auto","offset-distance":"0","offset-path":"none","offset-position":"auto","offset-rotate":"auto","opacity":"1","order":"0","orphans":"2","outline-offset":"0","outline-style":"none","outline-width":"medium","overflow-anchor":"auto","overflow-block":"auto","overflow-clip-margin":"0px","overflow-inline":"auto","overflow-wrap":"normal","overscroll-behavior":"auto","overscroll-behavior-block":"auto","overscroll-behavior-inline":"auto","overscroll-behavior-x":"auto","overscroll-behavior-y":"auto","padding-block":"0","padding-block-end":"0","padding-block-start":"0","padding-bottom":"0","padding-inline":"0","padding-inline-end":"0","padding-inline-start":"0","padding-left":"0","padding-right":"0","padding-top":"0","page-break-after":"auto","page-break-before":"auto","page-break-inside":"auto","paint-order":"normal","perspective":"none","place-content":"normal","pointer-events":"auto","position":"static","resize":"none","right":"auto","rotate":"none","row-gap":"normal","scale":"none","scrollbar-color":"auto","scrollbar-gutter":"auto","scrollbar-width":"auto","scroll-behavior":"auto","scroll-margin":"0","scroll-margin-block":"0","scroll-margin-block-start":"0","scroll-margin-block-end":"0","scroll-margin-bottom":"0","scroll-margin-inline":"0","scroll-margin-inline-start":"0","scroll-margin-inline-end":"0","scroll-margin-left":"0","scroll-margin-right":"0","scroll-margin-top":"0","scroll-padding":"auto","scroll-padding-block":"auto","scroll-padding-block-start":"auto","scroll-padding-block-end":"auto","scroll-padding-bottom":"auto","scroll-padding-inline":"auto","scroll-padding-inline-start":"auto","scroll-padding-inline-end":"auto","scroll-padding-left":"auto","scroll-padding-right":"auto","scroll-padding-top":"auto","scroll-snap-align":"none","scroll-snap-coordinate":"none","scroll-snap-points-x":"none","scroll-snap-points-y":"none","scroll-snap-stop":"normal","scroll-snap-type":"none","scroll-snap-type-x":"none","scroll-snap-type-y":"none","scroll-timeline-axis":"block","scroll-timeline-name":"none","shape-image-threshold":"0.0","shape-margin":"0","shape-outside":"none","tab-size":"8","table-layout":"auto","text-align-last":"auto","text-combine-upright":"none","text-decoration-line":"none","text-decoration-skip-ink":"auto","text-decoration-style":"solid","text-decoration-thickness":"auto","text-emphasis-style":"none","text-indent":"0","text-justify":"auto","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-transform":"none","text-underline-offset":"auto","text-underline-position":"auto","top":"auto","touch-action":"auto","transform":"none","transform-style":"flat","transition-delay":"0s","transition-duration":"0s","transition-property":"all","transition-timing-function":"ease","translate":"none","unicode-bidi":"normal","user-select":"auto","white-space":"normal","widows":"2","width":"auto","will-change":"auto","word-break":"normal","word-spacing":"normal","word-wrap":"normal","z-index":"auto"}')},3195:l=>{"use strict";l.exports=JSON.parse('{"background-clip":"border-box","background-color":"transparent","background-origin":"padding-box","background-size":"auto auto","border-block-color":"currentcolor","border-block-end-color":"currentcolor","border-block-start-color":"currentcolor","border-bottom-color":"currentcolor","border-collapse":"separate","border-inline-color":"currentcolor","border-inline-end-color":"currentcolor","border-inline-start-color":"currentcolor","border-left-color":"currentcolor","border-right-color":"currentcolor","border-top-color":"currentcolor","box-sizing":"content-box","color":"canvastext","column-rule-color":"currentcolor","font-synthesis":"weight style","image-orientation":"from-image","mask-clip":"border-box","mask-mode":"match-source","mask-origin":"border-box","mask-type":"luminance","ruby-align":"space-around","ruby-merge":"separate","ruby-position":"alternate","text-decoration-color":"currentcolor","text-emphasis-color":"currentcolor","text-emphasis-position":"over right","transform-box":"view-box","transform-origin":"50% 50% 0","vertical-align":"baseline","writing-mode":"horizontal-tb"}')}};var m={};function __nccwpck_require__(v){var y=m[v];if(y!==undefined){return y.exports}var w=m[v]={exports:{}};var _=true;try{l[v](w,w.exports,__nccwpck_require__);_=false}finally{if(_)delete m[v]}return w.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var v=__nccwpck_require__(9536);module.exports=v})(); \ No newline at end of file diff --git a/packages/next/src/compiled/cssnano-simple/package.json b/packages/next/src/compiled/cssnano-simple/package.json deleted file mode 100644 index 34bad179e1cd3..0000000000000 --- a/packages/next/src/compiled/cssnano-simple/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"cssnano-simple","main":"index.js","author":"Joe Haddad ","license":"MIT"} diff --git a/packages/next/src/compiled/loader-runner/LICENSE b/packages/next/src/compiled/loader-runner/LICENSE new file mode 100644 index 0000000000000..084338a562324 --- /dev/null +++ b/packages/next/src/compiled/loader-runner/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) Tobias Koppers @sokra + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/next/src/compiled/loader-runner/LoaderRunner.js b/packages/next/src/compiled/loader-runner/LoaderRunner.js new file mode 100644 index 0000000000000..50ff0c03ab7b1 --- /dev/null +++ b/packages/next/src/compiled/loader-runner/LoaderRunner.js @@ -0,0 +1 @@ +(()=>{var __webpack_modules__={395:e=>{"use strict";class LoadingLoaderError extends Error{constructor(e){super(e);this.name="LoaderRunnerError";Error.captureStackTrace(this,this.constructor)}}e.exports=LoadingLoaderError},754:(module,__unused_webpack_exports,__nccwpck_require__)=>{var LoaderLoadingError=__nccwpck_require__(395);var url;module.exports=function loadLoader(loader,callback){if(loader.type==="module"){try{if(url===undefined)url=__nccwpck_require__(310);var loaderUrl=url.pathToFileURL(loader.path);var modulePromise=eval("import("+JSON.stringify(loaderUrl.toString())+")");modulePromise.then((function(e){handleResult(loader,e,callback)}),callback);return}catch(e){callback(e)}}else{try{var module=require(loader.path)}catch(e){if(e instanceof Error&&e.code==="EMFILE"){var retry=loadLoader.bind(null,loader,callback);if(typeof setImmediate==="function"){return setImmediate(retry)}else{return process.nextTick(retry)}}return callback(e)}return handleResult(loader,module,callback)}};function handleResult(e,r,n){if(typeof r!=="function"&&typeof r!=="object"){return n(new LoaderLoadingError("Module '"+e.path+"' is not a loader (export function or es6 module)"))}e.normal=typeof r==="function"?r:r.default;e.pitch=r.pitch;e.raw=r.raw;if(typeof e.normal!=="function"&&typeof e.pitch!=="function"){return n(new LoaderLoadingError("Module '"+e.path+"' is not a loader (must have normal or pitch function)"))}n()}},147:e=>{"use strict";e.exports=require("fs")},310:e=>{"use strict";e.exports=require("url")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var r=__webpack_module_cache__[e];if(r!==undefined){return r.exports}var n=__webpack_module_cache__[e]={exports:{}};var t=true;try{__webpack_modules__[e](n,n.exports,__nccwpck_require__);t=false}finally{if(t)delete __webpack_module_cache__[e]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{var e=__webpack_exports__;var r=__nccwpck_require__(147);var n=r.readFile.bind(r);var t=__nccwpck_require__(754);function utf8BufferToString(e){var r=e.toString("utf-8");if(r.charCodeAt(0)===65279){return r.substr(1)}else{return r}}const a=/^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;function parsePathQueryFragment(e){var r=a.exec(e);return{path:r[1].replace(/\0(.)/g,"$1"),query:r[2]?r[2].replace(/\0(.)/g,"$1"):"",fragment:r[3]||""}}function dirname(e){if(e==="/")return"/";var r=e.lastIndexOf("/");var n=e.lastIndexOf("\\");var t=e.indexOf("/");var a=e.indexOf("\\");var o=r>n?r:n;var u=r>n?t:a;if(o<0)return e;if(o===u)return e.substr(0,o+1);return e.substr(0,o)}function createLoaderObject(e){var r={path:null,query:null,fragment:null,options:null,ident:null,normal:null,pitch:null,raw:null,data:null,pitchExecuted:false,normalExecuted:false};Object.defineProperty(r,"request",{enumerable:true,get:function(){return r.path.replace(/#/g,"\0#")+r.query.replace(/#/g,"\0#")+r.fragment},set:function(e){if(typeof e==="string"){var n=parsePathQueryFragment(e);r.path=n.path;r.query=n.query;r.fragment=n.fragment;r.options=undefined;r.ident=undefined}else{if(!e.loader)throw new Error("request should be a string or object with loader and options ("+JSON.stringify(e)+")");r.path=e.loader;r.fragment=e.fragment||"";r.type=e.type;r.options=e.options;r.ident=e.ident;if(r.options===null)r.query="";else if(r.options===undefined)r.query="";else if(typeof r.options==="string")r.query="?"+r.options;else if(r.ident)r.query="??"+r.ident;else if(typeof r.options==="object"&&r.options.ident)r.query="??"+r.options.ident;else r.query="?"+JSON.stringify(r.options)}}});r.request=e;if(Object.preventExtensions){Object.preventExtensions(r)}return r}function runSyncOrAsync(e,r,n,t){var a=true;var o=false;var u=false;var i=false;r.async=function async(){if(o){if(i)return;throw new Error("async(): The callback was already called.")}a=false;return c};var c=r.callback=function(){if(o){if(i)return;throw new Error("callback(): The callback was already called.")}o=true;a=false;try{t.apply(null,arguments)}catch(e){u=true;throw e}};try{var s=function LOADER_EXECUTION(){return e.apply(r,n)}();if(a){o=true;if(s===undefined)return t();if(s&&typeof s==="object"&&typeof s.then==="function"){return s.then((function(e){t(null,e)}),t)}return t(null,s)}}catch(e){if(u)throw e;if(o){if(typeof e==="object"&&e.stack)console.error(e.stack);else console.error(e);return}o=true;i=true;t(e)}}function convertArgs(e,r){if(!r&&Buffer.isBuffer(e[0]))e[0]=utf8BufferToString(e[0]);else if(r&&typeof e[0]==="string")e[0]=Buffer.from(e[0],"utf-8")}function iteratePitchingLoaders(e,r,n){if(r.loaderIndex>=r.loaders.length)return processResource(e,r,n);var a=r.loaders[r.loaderIndex];if(a.pitchExecuted){r.loaderIndex++;return iteratePitchingLoaders(e,r,n)}t(a,(function(t){if(t){r.cacheable(false);return n(t)}var o=a.pitch;a.pitchExecuted=true;if(!o)return iteratePitchingLoaders(e,r,n);runSyncOrAsync(o,r,[r.remainingRequest,r.previousRequest,a.data={}],(function(t){if(t)return n(t);var a=Array.prototype.slice.call(arguments,1);var o=a.some((function(e){return e!==undefined}));if(o){r.loaderIndex--;iterateNormalLoaders(e,r,a,n)}else{iteratePitchingLoaders(e,r,n)}}))}))}function processResource(e,r,n){r.loaderIndex=r.loaders.length-1;var t=r.resourcePath;if(t){e.processResource(r,t,(function(t){if(t)return n(t);var a=Array.prototype.slice.call(arguments,1);e.resourceBuffer=a[0];iterateNormalLoaders(e,r,a,n)}))}else{iterateNormalLoaders(e,r,[null],n)}}function iterateNormalLoaders(e,r,n,t){if(r.loaderIndex<0)return t(null,n);var a=r.loaders[r.loaderIndex];if(a.normalExecuted){r.loaderIndex--;return iterateNormalLoaders(e,r,n,t)}var o=a.normal;a.normalExecuted=true;if(!o){return iterateNormalLoaders(e,r,n,t)}convertArgs(n,a.raw);runSyncOrAsync(o,r,n,(function(n){if(n)return t(n);var a=Array.prototype.slice.call(arguments,1);iterateNormalLoaders(e,r,a,t)}))}e.getContext=function getContext(e){var r=parsePathQueryFragment(e).path;return dirname(r)};e.runLoaders=function runLoaders(e,r){var t=e.resource||"";var a=e.loaders||[];var o=e.context||{};var u=e.processResource||((e,r,n,t)=>{r.addDependency(n);e(n,t)}).bind(null,e.readResource||n);var i=t&&parsePathQueryFragment(t);var c=i?i.path:undefined;var s=i?i.query:undefined;var l=i?i.fragment:undefined;var d=c?dirname(c):null;var f=true;var p=[];var _=[];var y=[];a=a.map(createLoaderObject);o.context=d;o.loaderIndex=0;o.loaders=a;o.resourcePath=c;o.resourceQuery=s;o.resourceFragment=l;o.async=null;o.callback=null;o.cacheable=function cacheable(e){if(e===false){f=false}};o.dependency=o.addDependency=function addDependency(e){p.push(e)};o.addContextDependency=function addContextDependency(e){_.push(e)};o.addMissingDependency=function addMissingDependency(e){y.push(e)};o.getDependencies=function getDependencies(){return p.slice()};o.getContextDependencies=function getContextDependencies(){return _.slice()};o.getMissingDependencies=function getMissingDependencies(){return y.slice()};o.clearDependencies=function clearDependencies(){p.length=0;_.length=0;y.length=0;f=true};Object.defineProperty(o,"resource",{enumerable:true,get:function(){if(o.resourcePath===undefined)return undefined;return o.resourcePath.replace(/#/g,"\0#")+o.resourceQuery.replace(/#/g,"\0#")+o.resourceFragment},set:function(e){var r=e&&parsePathQueryFragment(e);o.resourcePath=r?r.path:undefined;o.resourceQuery=r?r.query:undefined;o.resourceFragment=r?r.fragment:undefined}});Object.defineProperty(o,"request",{enumerable:true,get:function(){return o.loaders.map((function(e){return e.request})).concat(o.resource||"").join("!")}});Object.defineProperty(o,"remainingRequest",{enumerable:true,get:function(){if(o.loaderIndex>=o.loaders.length-1&&!o.resource)return"";return o.loaders.slice(o.loaderIndex+1).map((function(e){return e.request})).concat(o.resource||"").join("!")}});Object.defineProperty(o,"currentRequest",{enumerable:true,get:function(){return o.loaders.slice(o.loaderIndex).map((function(e){return e.request})).concat(o.resource||"").join("!")}});Object.defineProperty(o,"previousRequest",{enumerable:true,get:function(){return o.loaders.slice(0,o.loaderIndex).map((function(e){return e.request})).join("!")}});Object.defineProperty(o,"query",{enumerable:true,get:function(){var e=o.loaders[o.loaderIndex];return e.options&&typeof e.options==="object"?e.options:e.query}});Object.defineProperty(o,"data",{enumerable:true,get:function(){return o.loaders[o.loaderIndex].data}});if(Object.preventExtensions){Object.preventExtensions(o)}var h={resourceBuffer:null,processResource:u};iteratePitchingLoaders(h,o,(function(e,n){if(e){return r(e,{cacheable:f,fileDependencies:p,contextDependencies:_,missingDependencies:y})}r(null,{result:n,resourceBuffer:h.resourceBuffer,cacheable:f,fileDependencies:p,contextDependencies:_,missingDependencies:y})}))}})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/packages/next/src/compiled/loader-runner/package.json b/packages/next/src/compiled/loader-runner/package.json new file mode 100644 index 0000000000000..7b0ea7d8e50f1 --- /dev/null +++ b/packages/next/src/compiled/loader-runner/package.json @@ -0,0 +1 @@ +{"name":"loader-runner","main":"LoaderRunner.js","author":"Tobias Koppers @sokra","license":"MIT"} diff --git a/packages/next/src/compiled/postcss-plugin-stub-for-cssnano-simple/index.js b/packages/next/src/compiled/postcss-plugin-stub-for-cssnano-simple/index.js new file mode 100644 index 0000000000000..11fdbd6291dec --- /dev/null +++ b/packages/next/src/compiled/postcss-plugin-stub-for-cssnano-simple/index.js @@ -0,0 +1 @@ +(()=>{var e={233:(e,r)=>{function pluginCreator(){return{postcssPlugin:"postcss-plugin-stub",prepare(){return{}}}}pluginCreator.postcss=true;Object.defineProperty(r,"__esModule",{value:true});e.exports=pluginCreator;e.exports["default"]=pluginCreator}};var r={};function __nccwpck_require__(t){var _=r[t];if(_!==undefined){return _.exports}var u=r[t]={exports:{}};var p=true;try{e[t](u,u.exports,__nccwpck_require__);p=false}finally{if(p)delete r[t]}return u.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(233);module.exports=t})(); \ No newline at end of file diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index 99d41648a12f7..23b8c44f9c06a 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require('react'); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-next-4bf2113a1-20230206'; +var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -102,6 +102,23 @@ function closeWithError(destination, error) { destination.destroy(error); } +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +var assign = Object.assign; + /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. @@ -421,7 +438,7 @@ var capitalize = function (token) { // scraping the MDN documentation. -['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, +['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'transform-origin', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { @@ -516,6 +533,7 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, + scale: true, tabSize: true, widows: true, zIndex: true, @@ -661,17 +679,17 @@ var ariaProperties = { 'aria-setsize': 0 }; -var warnedProperties = {}; -var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); -var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); +var warnedProperties$1 = {}; +var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); +var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); -function validateProperty(tagName, name) { +function validateProperty$1(tagName, name) { { - if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { + if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { return true; } - if (rARIACamel.test(name)) { + if (rARIACamel$1.test(name)) { var ariaName = 'aria-' + name.slice(4).toLowerCase(); var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM // DOM properties, then it is an invalid aria-* attribute. @@ -679,7 +697,7 @@ function validateProperty(tagName, name) { if (correctName == null) { error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name); - warnedProperties[name] = true; + warnedProperties$1[name] = true; return true; } // aria-* attributes should be lowercase; suggest the lowercase version. @@ -687,18 +705,18 @@ function validateProperty(tagName, name) { if (name !== correctName) { error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); - warnedProperties[name] = true; + warnedProperties$1[name] = true; return true; } } - if (rARIA.test(name)) { + if (rARIA$1.test(name)) { var lowerCasedName = name.toLowerCase(); var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM // DOM properties, then it is an invalid aria-* attribute. if (standardName == null) { - warnedProperties[name] = true; + warnedProperties$1[name] = true; return false; } // aria-* attributes should be lowercase; suggest the lowercase version. @@ -706,7 +724,7 @@ function validateProperty(tagName, name) { if (name !== standardName) { error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); - warnedProperties[name] = true; + warnedProperties$1[name] = true; return true; } } @@ -720,7 +738,7 @@ function warnInvalidARIAProps(type, props) { var invalidProps = []; for (var key in props) { - var isValid = validateProperty(type, key); + var isValid = validateProperty$1(type, key); if (!isValid) { invalidProps.push(key); @@ -739,7 +757,7 @@ function warnInvalidARIAProps(type, props) { } } -function validateProperties(type, props) { +function validateProperties$2(type, props) { if (isCustomComponent(type, props)) { return; } @@ -1181,6 +1199,8 @@ var possibleStandardNames = { 'text-rendering': 'textRendering', to: 'to', transform: 'transform', + transformorigin: 'transformOrigin', + 'transform-origin': 'transformOrigin', typeof: 'typeof', u1: 'u1', u2: 'u2', @@ -1260,17 +1280,17 @@ var possibleStandardNames = { zoomandpan: 'zoomAndPan' }; -var validateProperty$1 = function () {}; +var validateProperty = function () {}; { - var warnedProperties$1 = {}; + var warnedProperties = {}; var EVENT_NAME_REGEX = /^on./; var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; - var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); - var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); - validateProperty$1 = function (tagName, name, value, eventRegistry) { - if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + validateProperty = function (tagName, name, value, eventRegistry) { + if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { return true; } @@ -1279,7 +1299,7 @@ var validateProperty$1 = function () {}; if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } // We can't rely on the event system being injected on the server. @@ -1297,14 +1317,14 @@ var validateProperty$1 = function () {}; if (registrationName != null) { error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } if (EVENT_NAME_REGEX.test(name)) { error('Unknown event handler property `%s`. It will be ignored.', name); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } } else if (EVENT_NAME_REGEX.test(name)) { @@ -1315,40 +1335,40 @@ var validateProperty$1 = function () {}; error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name); } - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } // Let the ARIA attribute hook validate ARIA attributes - if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + if (rARIA.test(name) || rARIACamel.test(name)) { return true; } if (lowerCasedName === 'innerhtml') { error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } if (lowerCasedName === 'aria') { error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } if (typeof value === 'number' && isNaN(value)) { error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } @@ -1361,7 +1381,7 @@ var validateProperty$1 = function () {}; if (standardName !== name) { error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } } else if (!isReserved && name !== lowerCasedName) { @@ -1369,7 +1389,7 @@ var validateProperty$1 = function () {}; // will be cased anyway with server rendering. error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } @@ -1380,7 +1400,7 @@ var validateProperty$1 = function () {}; error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name); } - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } // Now that we've validated casing, do not validate // data types for reserved props @@ -1392,7 +1412,7 @@ var validateProperty$1 = function () {}; if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { - warnedProperties$1[name] = true; + warnedProperties[name] = true; return false; } // Warn when passing the strings 'false' or 'true' into a boolean prop @@ -1400,7 +1420,7 @@ var validateProperty$1 = function () {}; if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) { error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value); - warnedProperties$1[name] = true; + warnedProperties[name] = true; return true; } @@ -1413,7 +1433,7 @@ var warnUnknownProperties = function (type, props, eventRegistry) { var unknownProps = []; for (var key in props) { - var isValid = validateProperty$1(type, key, props[key], eventRegistry); + var isValid = validateProperty(type, key, props[key], eventRegistry); if (!isValid) { unknownProps.push(key); @@ -1432,7 +1452,7 @@ var warnUnknownProperties = function (type, props, eventRegistry) { } }; -function validateProperties$2(type, props, eventRegistry) { +function validateProperties(type, props, eventRegistry) { if (isCustomComponent(type, props)) { return; } @@ -1445,7 +1465,7 @@ var warnValidStyle = function () {}; { // 'msTransform' is correct, but the other prefixes should be capitalized var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; - var msPattern = /^-ms-/; + var msPattern$1 = /^-ms-/; var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon var badStyleValueWithSemicolonPattern = /;\s*$/; @@ -1470,7 +1490,7 @@ var warnValidStyle = function () {}; error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix // is converted to lowercase `ms`. - camelize(name.replace(msPattern, 'ms-'))); + camelize(name.replace(msPattern$1, 'ms-'))); }; var warnBadVendoredStyleName = function (name) { @@ -1624,7 +1644,7 @@ function escapeTextForBrowser(text) { } var uppercasePattern = /([A-Z])/g; -var msPattern$1 = /^ms-/; +var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * @@ -1640,7 +1660,7 @@ var msPattern$1 = /^ms-/; */ function hyphenateStyleName(name) { - return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-'); + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); } // and any newline or tab are filtered out as if they're not part of the URL. @@ -1672,1664 +1692,1397 @@ function isArray(a) { return isArrayImpl(a); } -var assign = Object.assign; - -function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { - { - var href = originalProps.href; - var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); - var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); - - if (latestProps.as !== originalProps.as) { - error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); - } else { - var missingProps = null; - var extraProps = null; - var differentProps = null; - - if (originalProps.media != null && latestProps.media == null) { - missingProps = missingProps || {}; - missingProps.media = originalProps.media; - } +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - for (var propName in latestProps) { - var propValue = latestProps[propName]; - var originalValue = originalProps[propName]; +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; +} +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} - if (propValue != null && propValue !== originalValue) { - if (originalValue == null) { - extraProps = extraProps || {}; - extraProps[propName] = propValue; - } else { - differentProps = differentProps || {}; - differentProps[propName] = { - original: originalValue, - latest: propValue +function compareResourcePropsForWarning(newProps, currentProps) { + { + var propDiffs = null; + var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); + + for (var i = 0; i < allProps.length; i++) { + var propName = allProps[i]; + var newValue = newProps[propName]; + var currentValue = currentProps[propName]; + + if (newValue !== currentValue && !(newValue == null && currentValue == null)) { + if (newValue == null) { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} }; } - } - } - - if (missingProps || extraProps || differentProps) { - warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); - } - } - } -} -function validateStyleResourceDifference(originalProps, latestProps) { - { - var href = originalProps.href; // eslint-disable-next-line no-labels - - var originalWarningName = getResourceNameForWarning('style', originalProps, false); - var latestWarningName = getResourceNameForWarning('style', latestProps, false); - var missingProps = null; - var extraProps = null; - var differentProps = null; - - if (originalProps.media != null && latestProps.media == null) { - missingProps = missingProps || {}; - missingProps.media = originalProps.media; - } - - for (var propName in latestProps) { - var propValue = latestProps[propName]; - var originalValue = originalProps[propName]; - if (propValue != null && propValue !== originalValue) { - propName = propName === 'data-precedence' ? 'precedence' : propName; + propDiffs.missing[propName] = currentValue; + } else if (currentValue == null) { + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } - if (originalValue == null) { - extraProps = extraProps || {}; - extraProps[propName] = propValue; + propDiffs.extra[propName] = newValue; } else { - differentProps = differentProps || {}; - differentProps[propName] = { - original: originalValue, - latest: propValue + if (propDiffs === null) { + propDiffs = { + missing: {}, + extra: {}, + different: {} + }; + } + + propDiffs.different[propName] = { + original: currentValue, + latest: newValue }; } } } - if (missingProps || extraProps || differentProps) { - warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); - } + return propDiffs; } } -function validateScriptResourceDifference(originalProps, latestProps) { - { - var src = originalProps.src; // eslint-disable-next-line no-labels - var originalWarningName = getResourceNameForWarning('script', originalProps, false); - var latestWarningName = getResourceNameForWarning('script', latestProps, false); - var extraProps = null; - var differentProps = null; +function describeDifferencesForStylesheets(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; - for (var propName in latestProps) { - var propValue = latestProps[propName]; - var originalValue = originalProps[propName]; + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; - if (propValue != null && propValue !== originalValue) { - if (originalValue == null) { - extraProps = extraProps || {}; - extraProps[propName] = propValue; - } else { - differentProps = differentProps || {}; - differentProps[propName] = { - original: originalValue, - latest: propValue - }; - } - } + if (propName === 'media') { + description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); } + } - if (extraProps || differentProps) { - warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); - } + for (var _propName in diff.extra) { + var _propValue = diff.extra[_propName]; + description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; } -} -function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { - { - var href = preloadProps.href; - var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); - var latestWarningName = getResourceNameForWarning('style', styleProps, false); - if (preloadProps.as !== 'style') { - error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); - } + for (var _propName2 in diff.different) { + var latestValue = diff.different[_propName2].latest; + var originalValue = diff.different[_propName2].original; + description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } - var missingProps = null; - var extraProps = null; - var differentProps = null; + return description; +} +function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; - for (var propName in styleProps) { - var styleValue = styleProps[propName]; - var preloadValue = preloadProps[propName]; + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; - switch (propName) { - // Check for difference on specific props that cross over or influence - // the relationship between the preload and stylesheet - case 'crossOrigin': - case 'referrerPolicy': - case 'media': - case 'title': - { - if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { - if (styleValue == null) { - missingProps = missingProps || {}; - missingProps[propName] = preloadValue; - } else if (preloadValue == null) { - extraProps = extraProps || {}; - extraProps[propName] = styleValue; - } else { - differentProps = differentProps || {}; - differentProps[propName] = { - original: preloadValue, - latest: styleValue - }; - } - } - } - } + if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; + } else { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; } + } + + for (var _propName3 in diff.different) { + var latestValue = diff.different[_propName3].latest; + var originalValue = diff.different[_propName3].original; - if (missingProps || extraProps || differentProps) { - warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + if (_propName3 === 'precedence' && originalValue === 'default') { + description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; + } else { + description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); } } + + return description; } -function validateScriptAndHintProps(preloadProps, scriptProps, implicitPreload) { - { - var href = preloadProps.href; - var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); - var latestWarningName = getResourceNameForWarning('script', scriptProps, false); +function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; - if (preloadProps.as !== 'script') { - error('While creating a %s for href "%s" a %s for this same url was found. When preloading a script the' + ' "as" prop must be of type "script". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); - } + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; - var missingProps = null; - var extraProps = null; - var differentProps = null; + if (propName === 'precedence' && propValue !== 'default') { + description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } - for (var propName in scriptProps) { - var scriptValue = scriptProps[propName]; - var preloadValue = preloadProps[propName]; + for (var _propName4 in diff.extra) { + var _propValue2 = diff.extra[_propName4]; - switch (propName) { - // Check for difference on specific props that cross over or influence - // the relationship between the preload and stylesheet - case 'crossOrigin': - case 'referrerPolicy': - case 'integrity': - { - if (preloadValue !== scriptValue && !(preloadValue == null && scriptValue == null)) { - if (scriptValue == null) { - missingProps = missingProps || {}; - missingProps[propName] = preloadValue; - } else if (preloadValue == null) { - extraProps = extraProps || {}; - extraProps[propName] = scriptValue; - } else { - differentProps = differentProps || {}; - differentProps[propName] = { - original: preloadValue, - latest: scriptValue - }; - } - } - } - } + if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { + description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; } + } - if (missingProps || extraProps || differentProps) { - warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); - } + for (var _propName5 in diff.different) { + var latestValue = diff.different[_propName5].latest; + var originalValue = diff.different[_propName5].original; + description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); } + + return description; } +function describeDifferencesForPreinits(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; -function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { - { - var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; - var comparisonStatement = ''; + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; - if (missingProps !== null && typeof missingProps === 'object') { - for (var propName in missingProps) { - comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; - } + if (propName === 'precedence' && propValue !== 'default') { + description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); } + } - if (extraProps !== null && typeof extraProps === 'object') { - for (var _propName in extraProps) { - comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; - } - } + for (var _propName6 in diff.extra) { + var _propValue3 = diff.extra[_propName6]; - if (differentProps !== null && typeof differentProps === 'object') { - for (var _propName2 in differentProps) { - comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; - } + if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { + description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; } + } - error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); + for (var _propName7 in diff.different) { + var latestValue = diff.different[_propName7].latest; + var originalValue = diff.different[_propName7].original; + description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); } + + return description; } +var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; +function describeDifferencesForPreloads(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; -function getResourceNameForWarning(type, props, implicit) { - { - switch (type) { - case 'style': - { - return 'style Resource'; - } + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; - case 'script': - { - return 'script Resource'; - } + if (preloadOptionsForComparison.includes(propName)) { + description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } - case 'preload': - { - if (implicit) { - return "preload for a " + props.as + " Resource"; - } + for (var _propName8 in diff.extra) { + var _propValue4 = diff.extra[_propName8]; - return "preload Resource (as \"" + props.as + "\")"; - } + if (preloadOptionsForComparison.includes(_propName8)) { + description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; } } - return 'Resource'; -} -function validateLinkPropsForStyleResource(props) { - { - // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) - var href = props.href, - onLoad = props.onLoad, - onError = props.onError, - disabled = props.disabled; - var allProps = ['onLoad', 'onError', 'disabled']; - var includedProps = []; - if (onLoad) includedProps.push('onLoad'); - if (onError) includedProps.push('onError'); - if (disabled != null) includedProps.push('disabled'); - var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); - var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); - includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; - - if (includedProps.length) { - error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); + for (var _propName9 in diff.different) { + var latestValue = diff.different[_propName9].latest; + var originalValue = diff.different[_propName9].original; - return true; + if (preloadOptionsForComparison.includes(_propName9)) { + description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); } } - return false; + return description; } +function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; -function propNamesListJoin(list, combinator) { - switch (list.length) { - case 0: - return ''; + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; - case 1: - return list[0]; + if (preloadOptionsForComparison.includes(propName)) { + description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } + } - case 2: - return list[0] + ' ' + combinator + ' ' + list[1]; + for (var _propName10 in diff.extra) { + var _propValue5 = diff.extra[_propName10]; - default: - return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; + if (preloadOptionsForComparison.includes(_propName10)) { + description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; + } } -} - -function validateLinkPropsForPreloadResource(linkProps) { - { - var href = linkProps.href, - as = linkProps.as; - if (as === 'font') { - var name = getResourceNameForWarning('preload', linkProps, false); + for (var _propName11 in diff.different) { + var latestValue = diff.different[_propName11].latest; + var originalValue = diff.different[_propName11].original; - if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { - error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); - } else if (linkProps.crossOrigin === 'use-credentials') { - error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); - } + if (preloadOptionsForComparison.includes(_propName11)) { + description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); } } -} -function validatePreloadArguments(href, options) { - { - if (!href || typeof href !== 'string') { - var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); - } else if (typeof options !== 'object' || options === null) { - var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); + return description; +} +function describeDifferencesForScripts(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; - error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); - } else { - var as = options.as; + for (var propName in diff.missing) { + var propValue = diff.missing[propName]; + description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + } - switch (as) { - // Font specific validation of options - case 'font': - { - if (options.crossOrigin === 'use-credentials') { - error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); - } + for (var _propName12 in diff.extra) { + var _propValue6 = diff.extra[_propName12]; + description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; + } - break; - } + for (var _propName13 in diff.different) { + var latestValue = diff.different[_propName13].latest; + var originalValue = diff.different[_propName13].original; + description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } - case 'script': - case 'style': - { - break; - } - // We have an invalid as type and need to warn + return description; +} +function describeDifferencesForScriptOverPreinit(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; - default: - { - var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; - error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); - } - } + if (propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; + } else { + description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; } } -} -function validatePreinitArguments(href, options) { - { - if (!href || typeof href !== 'string') { - var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); - } else if (typeof options !== 'object' || options === null) { - var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); - - error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); - } else { - var as = options.as; + for (var _propName14 in diff.different) { + var latestValue = diff.different[_propName14].latest; + var originalValue = diff.different[_propName14].original; + description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } - switch (as) { - case 'style': - case 'script': - { - break; - } - // We have an invalid as type and need to warn + return description; +} +function describeDifferencesForPreinitOverScript(newProps, currentProps) { + var diff = compareResourcePropsForWarning(newProps, currentProps); + if (!diff) return ''; + var description = ''; - default: - { - var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + for (var propName in diff.extra) { + var propValue = diff.extra[propName]; - error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are "style"' + ' and "script". The href for the preinit call where this warning originated is "%s".', typeOfAs, href); - } - } + if (propName === 'crossOrigin' || propName === 'integrity') { + description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; } } -} -function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; -} + for (var _propName15 in diff.different) { + var latestValue = diff.different[_propName15].latest; + var originalValue = diff.different[_propName15].original; + description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + } -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; + return description; } -function createResources() { - return { - // persistent - preloadsMap: new Map(), - stylesMap: new Map(), - scriptsMap: new Map(), - headsMap: new Map(), - // cleared on flush - charset: null, - bases: new Set(), - preconnects: new Set(), - fontPreloads: new Set(), - // usedImagePreloads: new Set(), - precedences: new Map(), - usedStylePreloads: new Set(), - scripts: new Set(), - usedScriptPreloads: new Set(), - explicitStylePreloads: new Set(), - // explicitImagePreloads: new Set(), - explicitScriptPreloads: new Set(), - headResources: new Set(), - // cache for tracking structured meta tags - structuredMetaKeys: new Map(), - // like a module global for currently rendering boundary - boundaryResources: null - }; -} -function createBoundaryResources() { - return new Set(); -} +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = { + preload: preload, + preinit: preinit +} ; var currentResources = null; var currentResourcesStack = []; -function prepareToRenderResources(resources) { +function prepareToRender(resources) { currentResourcesStack.push(currentResources); currentResources = resources; + var previousHostDispatcher = ReactDOMCurrentDispatcher.current; + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; + return previousHostDispatcher; } -function finishRenderingResources() { +function cleanupAfterRender(previousDispatcher) { currentResources = currentResourcesStack.pop(); -} -function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { - resources.boundaryResources = boundaryResources; -} -var ReactDOMServerFloatDispatcher = { - preload: preload, - preinit: preinit -}; + ReactDOMCurrentDispatcher.current = previousDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; +var NothingSent +/* */ += 0; +var SentCompleteSegmentFunction +/* */ += 1; +var SentCompleteBoundaryFunction +/* */ += 2; +var SentClientRenderFunction +/* */ += 4; +var SentStyleInsertionFunction +/* */ += 8; // Per response, global state that is not contextual to the rendering subtree. +var startInlineScript = stringToPrecomputedChunk(''); +var startScriptSrc = stringToPrecomputedChunk(''); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent '); -var startScriptSrc = stringToPrecomputedChunk(''); -/** - * This escaping function is designed to work with bootstrapScriptContent only. - * because we know we are escaping the entire script. We can avoid for instance - * escaping html comment string sequences that are valid javascript as well because - * if there are no sebsequent '); -function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { - var hasStyleDependencies; +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript3a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3b = stringToPrecomputedChunk('"'); +var completeBoundaryScriptEnd = stringToPrecomputedChunk(')'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; + + { + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); + } + + { + writeChunk(destination, responseState.startInlineScript); + + if (hasStyleDependencies) { + if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { + responseState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction; + writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); + } else if ((responseState.instructions & SentStyleInsertionFunction) === NothingSent) { + responseState.instructions |= SentStyleInsertionFunction; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); + } + } else { + if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { + responseState.instructions |= SentCompleteBoundaryFunction; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); + } + } + } + + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } // Write function arguments, which are string and array literals + + + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); + + { + writeChunk(destination, completeBoundaryScript2); + } + + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); + + if (hasStyleDependencies) { + // Script and data writers must format this differently: + // - script writer emits an array literal, whose string elements are + // escaped for javascript e.g. ["A", "B"] + // - data writer emits a string literal, which is escaped as html + // e.g. ["A", "B"] + { + writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal + + writeStyleResourceDependenciesInJS(destination, boundaryResources); + } + } else { + { + writeChunk(destination, completeBoundaryScript3b); + } + } + + { + return writeChunkAndReturn(destination, completeBoundaryScriptEnd); + } +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +var clientRenderScriptEnd = stringToPrecomputedChunk(')'); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { + + { + writeChunk(destination, responseState.startInlineScript); + + if ((responseState.instructions & SentClientRenderFunction) === NothingSent) { + // The first time we write this, we'll need to include the full implementation. + responseState.instructions |= SentClientRenderFunction; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); + } + } + + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } + + writeChunk(destination, boundaryID); + + { + // " needs to be inserted for scripts, since ArgInterstitual does not contain + // leading or trailing quotes + writeChunk(destination, clientRenderScript1A); + } + + if (errorDigest || errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + } + } + + if (errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } + } + + if (errorComponentStack) { + // ,"JSONString" + { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + } + + { + // > + return writeChunkAndReturn(destination, clientRenderScriptEnd); + } +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; + +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; + + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} + +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; + +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; + + case '>': + return "\\u003e"; + + case '<': + return "\\u003c"; + + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} + +var styleTagTemplateOpen = stringToPrecomputedChunk(''); // Tracks whether we wrote any late style tags. We use this to determine +// whether we need to emit a closing template tag after flushing late style tags + +var didWrite = false; + +function flushStyleTagsLateForBoundary(resource) { + if (resource.type === 'style' && (resource.state & Flushed) === NoState) { + if (didWrite === false) { + // we are going to write so we need to emit the open tag + didWrite = true; + writeChunk(this, styleTagTemplateOpen); + } // This '); + +function flushResourceInPreamble(resource) { + if ((resource.state & (Flushed | Blocked)) === NoState) { + var chunks = resource.chunks; + + for (var i = 0; i < chunks.length; i++) { + writeChunk(this, chunks[i]); + } + + resource.state |= FlushedInPreamble; + } +} + +function flushResourceLate(resource) { + if ((resource.state & Flushed) === NoState) { + var chunks = resource.chunks; + + for (var i = 0; i < chunks.length; i++) { + writeChunk(this, chunks[i]); + } + + resource.state |= FlushedLate; + } +} + +var didFlush = false; + +function flushUnblockedStyle(resource, key, set) { + var chunks = resource.chunks; + + if (resource.state & Flushed) { + // In theory this should never happen because we clear from the + // Set on flush but to ensure correct semantics we don't emit + // anything if we are in this state. + set.delete(resource); + } else if (resource.state & Blocked) ; else { + didFlush = true; // We can emit this style or stylesheet as is. + + if (resource.type === 'stylesheet') { + // We still need to encode stylesheet chunks + // because unlike most Hoistables and Resources we do not eagerly encode + // them during render. This is because if we flush late we have to send a + // different encoding and we don't want to encode multiple times + pushLinkImpl(chunks, resource.props); + } + + for (var i = 0; i < chunks.length; i++) { + writeChunk(this, chunks[i]); + } + + resource.state |= FlushedInPreamble; + set.delete(resource); + } +} + +function flushUnblockedStyles(set, precedence) { + didFlush = false; + set.forEach(flushUnblockedStyle, this); + + if (!didFlush) { + // if we did not flush anything for this precedence slot we emit + // an empty '); -function writeInitialResources(destination, resources, responseState, willFlushAllSegments) { + if (!_resource3) { + _resource3 = { + type: 'script', + chunks: [], + state: NoState, + props: null + }; + resources.scriptsMap.set(_key, _resource3); + var _resourceProps = scriptPropsFromPreinitOptions(src, options); - function flushLinkResource(resource) { - if (!resource.flushed) { - pushLinkImpl(target, resource.props, responseState); - resource.flushed = true; - } - } + { + markAsImperativeResourceDEV(_resource3, 'preinit', href, options, _resourceProps); + } - var target = []; - var charset = resources.charset, - bases = resources.bases, - preconnects = resources.preconnects, - fontPreloads = resources.fontPreloads, - precedences = resources.precedences, - usedStylePreloads = resources.usedStylePreloads, - scripts = resources.scripts, - usedScriptPreloads = resources.usedScriptPreloads, - explicitStylePreloads = resources.explicitStylePreloads, - explicitScriptPreloads = resources.explicitScriptPreloads, - headResources = resources.headResources; + resources.scripts.add(_resource3); + pushScriptImpl(_resource3.chunks, _resourceProps); + } - if (charset) { - pushSelfClosing(target, charset.props, 'meta', responseState); - charset.flushed = true; - resources.charset = null; + return; + } + } } +} - bases.forEach(function (r) { - pushSelfClosing(target, r.props, 'base', responseState); - r.flushed = true; - }); - bases.clear(); - preconnects.forEach(function (r) { - // font preload Resources should not already be flushed so we elide this check - pushLinkImpl(target, r.props, responseState); - r.flushed = true; - }); - preconnects.clear(); - fontPreloads.forEach(function (r) { - // font preload Resources should not already be flushed so we elide this check - pushLinkImpl(target, r.props, responseState); - r.flushed = true; - }); - fontPreloads.clear(); // Flush stylesheets first by earliest precedence - - precedences.forEach(function (p, precedence) { - if (p.size) { - p.forEach(function (r) { - // resources should not already be flushed so we elide this check - pushLinkImpl(target, r.props, responseState); - r.flushed = true; - r.inShell = true; - r.hint.flushed = true; - }); - p.clear(); - } else { - target.push(precedencePlaceholderStart, stringToChunk(escapeTextForBrowser(precedence)), precedencePlaceholderEnd); - } - }); - usedStylePreloads.forEach(flushLinkResource); - usedStylePreloads.clear(); - scripts.forEach(function (r) { - // should never be flushed already - pushScriptImpl(target, r.props, responseState); - r.flushed = true; - r.hint.flushed = true; - }); - scripts.clear(); - usedScriptPreloads.forEach(flushLinkResource); - usedScriptPreloads.clear(); - explicitStylePreloads.forEach(flushLinkResource); - explicitStylePreloads.clear(); - explicitScriptPreloads.forEach(flushLinkResource); - explicitScriptPreloads.clear(); - headResources.forEach(function (r) { - switch (r.type) { - case 'title': - { - pushTitleImpl(target, r.props, responseState); - break; - } +function preloadPropsFromPreloadOptions(href, as, options) { + return { + rel: 'preload', + as: as, + href: href, + crossOrigin: as === 'font' ? '' : options.crossOrigin, + integrity: options.integrity + }; +} - case 'meta': - { - pushSelfClosing(target, r.props, 'meta', responseState); - break; - } +function preloadAsStylePropsFromProps(href, props) { + return { + rel: 'preload', + as: 'style', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + media: props.media, + hrefLang: props.hrefLang, + referrerPolicy: props.referrerPolicy + }; +} - case 'link': - { - pushLinkImpl(target, r.props, responseState); - break; - } - } +function preloadAsScriptPropsFromProps(href, props) { + return { + rel: 'preload', + as: 'script', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + referrerPolicy: props.referrerPolicy + }; +} + +function stylesheetPropsFromPreinitOptions(href, precedence, options) { + return { + rel: 'stylesheet', + href: href, + 'data-precedence': precedence, + crossOrigin: options.crossOrigin, + integrity: options.integrity + }; +} - r.flushed = true; +function stylesheetPropsFromRawProps(rawProps) { + return assign({}, rawProps, { + 'data-precedence': rawProps.precedence, + precedence: null }); - headResources.clear(); - var i; - var r = true; - - for (i = 0; i < target.length - 1; i++) { - writeChunk(destination, target[i]); - } - - if (i < target.length) { - r = writeChunkAndReturn(destination, target[i]); - } - - return r; } -function writeImmediateResources(destination, resources, responseState) { - // $FlowFixMe[missing-local-annot] - function flushLinkResource(resource) { - if (!resource.flushed) { - pushLinkImpl(target, resource.props, responseState); - resource.flushed = true; - } - } - - var target = []; - var charset = resources.charset, - preconnects = resources.preconnects, - fontPreloads = resources.fontPreloads, - usedStylePreloads = resources.usedStylePreloads, - scripts = resources.scripts, - usedScriptPreloads = resources.usedScriptPreloads, - explicitStylePreloads = resources.explicitStylePreloads, - explicitScriptPreloads = resources.explicitScriptPreloads, - headResources = resources.headResources; - - if (charset) { - pushSelfClosing(target, charset.props, 'meta', responseState); - charset.flushed = true; - resources.charset = null; - } - - preconnects.forEach(function (r) { - // font preload Resources should not already be flushed so we elide this check - pushLinkImpl(target, r.props, responseState); - r.flushed = true; - }); - preconnects.clear(); - fontPreloads.forEach(function (r) { - // font preload Resources should not already be flushed so we elide this check - pushLinkImpl(target, r.props, responseState); - r.flushed = true; - }); - fontPreloads.clear(); - usedStylePreloads.forEach(flushLinkResource); - usedStylePreloads.clear(); - scripts.forEach(function (r) { - // should never be flushed already - pushStartGenericElement(target, r.props, 'script', responseState); - pushEndInstance(target, target, 'script', r.props); - r.flushed = true; - r.hint.flushed = true; - }); - scripts.clear(); - usedScriptPreloads.forEach(flushLinkResource); - usedScriptPreloads.clear(); - explicitStylePreloads.forEach(flushLinkResource); - explicitStylePreloads.clear(); - explicitScriptPreloads.forEach(flushLinkResource); - explicitScriptPreloads.clear(); - headResources.forEach(function (r) { - switch (r.type) { - case 'title': - { - pushTitleImpl(target, r.props, responseState); - break; - } - - case 'meta': - { - pushSelfClosing(target, r.props, 'meta', responseState); - break; - } - case 'link': - { - pushLinkImpl(target, r.props, responseState); - break; - } - } +function adoptPreloadPropsForStylesheetProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; +} - r.flushed = true; +function styleTagPropsFromRawProps(rawProps) { + return assign({}, rawProps, { + 'data-precedence': rawProps.precedence, + precedence: null, + 'data-href': rawProps.href, + href: null }); - headResources.clear(); - var i; - var r = true; - - for (i = 0; i < target.length - 1; i++) { - writeChunk(destination, target[i]); - } - - if (i < target.length) { - r = writeChunkAndReturn(destination, target[i]); - } +} - return r; +function scriptPropsFromPreinitOptions(src, options) { + return { + src: src, + async: true, + crossOrigin: options.crossOrigin, + integrity: options.integrity + }; } -function hasStyleResourceDependencies(boundaryResources) { - var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources - // so we assume the type is correct and don't check it +function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; +} - while (true) { - var _iter$next = iter.next(), - resource = _iter$next.value; +function hoistStylesheetResource(resource) { + this.add(resource); +} - if (!resource) break; // If every style Resource flushed in the shell we do not need to send - // any dependencies +function hoistResources(resources, source) { + var currentBoundaryResources = resources.boundaryResources; - if (!resource.inShell) { - return true; - } + if (currentBoundaryResources) { + source.forEach(hoistStylesheetResource, currentBoundaryResources); + source.clear(); } - - return false; } -var arrayFirstOpenBracket = stringToPrecomputedChunk('['); -var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); -var arrayInterstitial = stringToPrecomputedChunk(','); -var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. -// E.g. -// [["JS_escaped_string1", "JS_escaped_string2"]] - -function writeStyleResourceDependenciesInJS(destination, boundaryResources) { - writeChunk(destination, arrayFirstOpenBracket); - var nextArrayOpenBrackChunk = arrayFirstOpenBracket; - boundaryResources.forEach(function (resource) { - if (resource.inShell) ; else if (resource.flushed) { - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - } else { - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyInJS(destination, resource.href, resource.precedence, resource.props); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - resource.flushed = true; - resource.hint.flushed = true; - } - }); - writeChunk(destination, arrayCloseBracket); +function unblockStylesheet(resource) { + resource.state &= ~Blocked; } -/* Helper functions */ - -function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { - // We should actually enforce this earlier when the resource is created but for - // now we make sure we are actually dealing with a string here. - { - checkAttributeStringCoercion(href, 'href'); - } - - var coercedHref = '' + href; - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); +function hoistResourcesToRoot(resources, boundaryResources) { + boundaryResources.forEach(unblockStylesheet); + boundaryResources.clear(); } -function writeStyleResourceDependencyInJS(destination, href, precedence, props) { +function markAsRenderedResourceDEV(resource, originalProps) { { - checkAttributeStringCoercion(href, 'href'); - } + var devResource = resource; - var coercedHref = '' + href; - sanitizeURL(coercedHref); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); + if (typeof devResource.__provenance === 'string') { + error('Resource already marked for DEV type. This is a bug in React.'); + } - { - checkAttributeStringCoercion(precedence, 'precedence'); + devResource.__provenance = 'rendered'; + devResource.__originalProps = originalProps; } +} - var coercedPrecedence = '' + precedence; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; - - if (propValue == null) { - continue; - } - - switch (propKey) { - case 'href': - case 'rel': - case 'precedence': - case 'data-precedence': - { - break; - } - - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough +function markAsImperativeResourceDEV(resource, provenance, originalHref, originalOptions, propsEquivalent) { + { + var devResource = resource; - default: - writeStyleResourceAttributeInJS(destination, propKey, propValue); - break; - } + if (typeof devResource.__provenance === 'string') { + error('Resource already marked for DEV type. This is a bug in React.'); } - } - - return null; -} -function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined -{ - var attributeName = name.toLowerCase(); - var attributeValue; - - switch (typeof value) { - case 'function': - case 'symbol': - return; + devResource.__provenance = provenance; + devResource.__originalHref = originalHref; + devResource.__originalOptions = originalOptions; + devResource.__propsEquivalent = propsEquivalent; } +} - switch (name) { - // Reserved names - case 'innerHTML': - case 'dangerouslySetInnerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // Ignored - return; - // Attribute renames - - case 'className': - attributeName = 'class'; - break; - // Booleans - - case 'hidden': - if (value === false) { - return; - } - - attributeValue = ''; - break; - // Santized URLs +function markAsImplicitResourceDEV(resource, underlyingProps, impliedProps) { + { + var devResource = resource; - case 'src': - case 'href': - { - { - checkAttributeStringCoercion(value, attributeName); - } + if (typeof devResource.__provenance === 'string') { + error('Resource already marked for DEV type. This is a bug in React.'); + } - attributeValue = '' + value; - sanitizeURL(attributeValue); - break; - } + devResource.__provenance = 'implicit'; + devResource.__underlyingProps = underlyingProps; + devResource.__impliedProps = impliedProps; + } +} - default: - { - if (!isAttributeNameSafe(name)) { - return; - } +function getAsResourceDEV(resource) { + { + if (resource) { + if (typeof resource.__provenance === 'string') { + return resource; } - } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; - } + error('Resource was not marked for DEV type. This is a bug in React.'); + } - { - checkAttributeStringCoercion(value, attributeName); + return null; } +} - attributeValue = '' + value; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); -} // This function writes a 2D array of strings to be embedded in an attribute - -function createResponseState$1(generateStaticMarkup, identifierPrefix, externalRuntimeConfig) { - var responseState = createResponseState(identifierPrefix, undefined, undefined, undefined, undefined); +function createResponseState(generateStaticMarkup, identifierPrefix, externalRuntimeConfig) { + var responseState = createResponseState$1(identifierPrefix, undefined, undefined, undefined, undefined); return { // Keep this in sync with ReactDOMServerFormatConfig bootstrapChunks: responseState.bootstrapChunks, @@ -5172,11 +5382,15 @@ function createResponseState$1(generateStaticMarkup, identifierPrefix, externalR nextSuspenseID: responseState.nextSuspenseID, streamingFormat: responseState.streamingFormat, startInlineScript: responseState.startInlineScript, - sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction, - sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction, - sentClientRenderFunction: responseState.sentClientRenderFunction, - sentStyleInsertionFunction: responseState.sentStyleInsertionFunction, + instructions: responseState.instructions, externalRuntimeConfig: responseState.externalRuntimeConfig, + htmlChunks: responseState.htmlChunks, + headChunks: responseState.headChunks, + hasBody: responseState.hasBody, + charsetChunks: responseState.charsetChunks, + preconnectChunks: responseState.preconnectChunks, + preloadChunks: responseState.preloadChunks, + hoistableChunks: responseState.hoistableChunks, // This is an extra field for the legacy renderer generateStaticMarkup: generateStaticMarkup }; @@ -5189,31 +5403,31 @@ function createRootFormatContext() { noscriptTagInScope: false }; } -function pushTextInstance$1(target, text, responseState, textEmbedded) { +function pushTextInstance(target, text, responseState, textEmbedded) { if (responseState.generateStaticMarkup) { target.push(stringToChunk(escapeTextForBrowser(text))); return false; } else { - return pushTextInstance(target, text, responseState, textEmbedded); + return pushTextInstance$1(target, text, responseState, textEmbedded); } } -function pushSegmentFinale$1(target, responseState, lastPushedText, textEmbedded) { +function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { if (responseState.generateStaticMarkup) { return; } else { - return pushSegmentFinale(target, responseState, lastPushedText, textEmbedded); + return pushSegmentFinale$1(target, responseState, lastPushedText, textEmbedded); } } -function writeStartCompletedSuspenseBoundary$1(destination, responseState) { +function writeStartCompletedSuspenseBoundary(destination, responseState) { if (responseState.generateStaticMarkup) { // A completed boundary is done and doesn't need a representation in the HTML // if we're not going to be hydrating it. return true; } - return writeStartCompletedSuspenseBoundary(destination); + return writeStartCompletedSuspenseBoundary$1(destination); } -function writeStartClientRenderedSuspenseBoundary$1(destination, responseState, // flushing these error arguments are not currently supported in this legacy streaming format. +function writeStartClientRenderedSuspenseBoundary(destination, responseState, // flushing these error arguments are not currently supported in this legacy streaming format. errorDigest, errorMessage, errorComponentStack) { if (responseState.generateStaticMarkup) { // A client rendered boundary is done and doesn't need a representation in the HTML @@ -5221,21 +5435,21 @@ errorDigest, errorMessage, errorComponentStack) { return true; } - return writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMessage, errorComponentStack); + return writeStartClientRenderedSuspenseBoundary$1(destination, responseState, errorDigest, errorMessage, errorComponentStack); } -function writeEndCompletedSuspenseBoundary$1(destination, responseState) { +function writeEndCompletedSuspenseBoundary(destination, responseState) { if (responseState.generateStaticMarkup) { return true; } - return writeEndCompletedSuspenseBoundary(destination); + return writeEndCompletedSuspenseBoundary$1(destination); } -function writeEndClientRenderedSuspenseBoundary$1(destination, responseState) { +function writeEndClientRenderedSuspenseBoundary(destination, responseState) { if (responseState.generateStaticMarkup) { return true; } - return writeEndClientRenderedSuspenseBoundary(destination); + return writeEndClientRenderedSuspenseBoundary$1(destination); } // ATTENTION @@ -5482,7 +5696,7 @@ function reenableLogs() { } } -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; +var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name, source, ownerFn) { { @@ -5510,7 +5724,7 @@ var componentFrameCache; function describeNativeComponentFrame(fn, construct) { // If something asked for a stack inside a fake render, it should get ignored. - if ( !fn || reentry) { + if (!fn || reentry) { return ''; } @@ -5530,10 +5744,10 @@ function describeNativeComponentFrame(fn, construct) { var previousDispatcher; { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher.current = null; + ReactCurrentDispatcher$1.current = null; disableLogs(); } @@ -5652,7 +5866,7 @@ function describeNativeComponentFrame(fn, construct) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactCurrentDispatcher$1.current = previousDispatcher; reenableLogs(); } @@ -5683,7 +5897,7 @@ function describeFunctionComponentFrame(fn, source, ownerFn) { } } -function shouldConstruct(Component) { +function shouldConstruct$1(Component) { var prototype = Component.prototype; return !!(prototype && prototype.isReactComponent); } @@ -5696,7 +5910,7 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { if (typeof type === 'function') { { - return describeNativeComponentFrame(type, shouldConstruct(type)); + return describeNativeComponentFrame(type, shouldConstruct$1(type)); } } @@ -5739,16 +5953,16 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { } var loggedTypeFailures = {}; -var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; +var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; function setCurrentlyValidatingElement(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } } @@ -6073,8 +6287,8 @@ function popProvider(context) { function getActiveContext() { return currentActiveSnapshot; } -function readContext(context) { - var value = context._currentValue2; +function readContext$1(context) { + var value = context._currentValue2; return value; } @@ -6250,7 +6464,7 @@ function constructClassInstance(ctor, props, maskedLegacyContext) { } if (typeof contextType === 'object' && contextType !== null) { - context = readContext(contextType); + context = readContext$1(contextType); } else { context = maskedLegacyContext; } @@ -6503,7 +6717,7 @@ function mountClassInstance(instance, ctor, newProps, maskedLegacyContext) { var contextType = ctor.contextType; if (typeof contextType === 'object' && contextType !== null) { - instance.context = readContext(contextType); + instance.context = readContext$1(contextType); } else { instance.context = maskedLegacyContext; } @@ -6693,7 +6907,7 @@ function createThenableState() { return []; } -function noop() {} +function noop$2() {} function trackUsedThenable(thenableState, thenable, index) { var previous = thenableState[index]; @@ -6706,7 +6920,7 @@ function trackUsedThenable(thenableState, thenable, index) { // they represent the same value, because components are idempotent. // Avoid an unhandled rejection errors for the Promises that we'll // intentionally ignore. - thenable.then(noop, noop); + thenable.then(noop$2, noop$2); thenable = previous; } } // We use an expando to track the status and result of a thenable so that we @@ -6975,14 +7189,14 @@ function resetHooksState() { workInProgressHook = null; } -function readContext$1(context) { +function readContext(context) { { if (isInHookUserCodeInDev) { error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); } } - return readContext(context); + return readContext$1(context); } function useContext(context) { @@ -6991,7 +7205,7 @@ function useContext(context) { } resolveCurrentlyRenderingComponent(); - return readContext(context); + return readContext$1(context); } function basicStateReducer(state, action) { @@ -7261,7 +7475,7 @@ function use(usable) { return trackUsedThenable(thenableState, thenable, index); } else if (usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE) { var context = usable; - return readContext$1(context); + return readContext(context); } } // eslint-disable-next-line react-internal/safe-string-coercion @@ -7280,7 +7494,7 @@ function useCacheRefresh() { function noop$1() {} var HooksDispatcher = { - readContext: readContext$1, + readContext: readContext, useContext: useContext, useMemo: useMemo, useReducer: useReducer, @@ -7359,9 +7573,9 @@ function getStackByComponentStackNode(componentStack) { } } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; +var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; -var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; +var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var PENDING = 0; var COMPLETED = 1; var FLUSHED = 2; @@ -7393,7 +7607,7 @@ function defaultErrorHandler(error) { return null; } -function noop$2() {} +function noop() {} function createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError) { var pingedTasks = []; @@ -7415,13 +7629,11 @@ function createRequest(children, responseState, rootFormatContext, progressiveCh clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], - preamble: [], - postamble: [], onError: onError === undefined ? defaultErrorHandler : onError, - onAllReady: onAllReady === undefined ? noop$2 : onAllReady, - onShellReady: onShellReady === undefined ? noop$2 : onShellReady, - onShellError: onShellError === undefined ? noop$2 : onShellError, - onFatalError: onFatalError === undefined ? noop$2 : onFatalError + onAllReady: onAllReady === undefined ? noop : onAllReady, + onShellReady: onShellReady === undefined ? noop : onShellReady, + onShellError: onShellError === undefined ? noop : onShellError, + onFatalError: onFatalError === undefined ? noop : onFatalError }; // This segment represents the root fallback. var rootSegment = createPendingSegment(request, 0, null, rootFormatContext, // Root segments are never embedded in Text on either edge @@ -7655,7 +7867,7 @@ function renderSuspenseBoundary(request, task, props) { try { // We use the safe form because we don't handle suspending here. Only error handling. renderNode(request, task, content); - pushSegmentFinale$1(contentRootSegment.chunks, request.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded); + pushSegmentFinale(contentRootSegment.chunks, request.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded); contentRootSegment.status = COMPLETED; if (enableFloat) { @@ -7720,7 +7932,7 @@ function hoistCompletedBoundaryResources(request, completedBoundary) { function renderHostElement(request, task, type, props) { pushBuiltInComponentStackInDEV(task, type); var segment = task.blockedSegment; - var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); + var children = pushStartInstance(segment.chunks, type, props, request.resources, request.responseState, segment.formatContext, segment.lastPushedText); segment.lastPushedText = false; var prevContext = segment.formatContext; segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still @@ -7730,12 +7942,12 @@ function renderHostElement(request, task, type, props) { // the correct context. Therefore this is not in a finally. segment.formatContext = prevContext; - pushEndInstance(segment.chunks, request.postamble, type); + pushEndInstance(segment.chunks, type, props, request.responseState, prevContext); segment.lastPushedText = false; popComponentStackInDEV(task); } -function shouldConstruct$1(Component) { +function shouldConstruct(Component) { return Component.prototype && Component.prototype.isReactComponent; } @@ -7777,7 +7989,7 @@ function finishClassComponent(request, task, instance, Component, props) { function renderClassComponent(request, task, Component, props) { pushClassComponentStackInDEV(task, Component); - var maskedContext = getMaskedContext(Component, task.legacyContext) ; + var maskedContext = getMaskedContext(Component, task.legacyContext) ; var instance = constructClassInstance(Component, props, maskedContext); mountClassInstance(instance, Component, props, maskedContext); finishClassComponent(request, task, instance, Component, props); @@ -7835,7 +8047,7 @@ function renderIndeterminateComponent(request, task, prevThenableState, Componen if ( // Run these checks in production only if the flag is off. // Eventually we'll delete this branch altogether. - typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { + typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { { var _componentName2 = getComponentNameFromType(Component) || 'Unknown'; @@ -7999,7 +8211,7 @@ function renderContextConsumer(request, task, context, props) { } } - var newValue = readContext(context); + var newValue = readContext$1(context); var newChildren = render(newValue); renderNodeDestructive(request, task, null, newChildren); } @@ -8047,7 +8259,7 @@ function renderOffscreen(request, task, props) { function renderElement(request, task, prevThenableState, type, props, ref) { if (typeof type === 'function') { - if (shouldConstruct$1(type)) { + if (shouldConstruct(type)) { renderClassComponent(request, task, type, props); return; } else { @@ -8300,13 +8512,13 @@ function renderNodeDestructiveImpl(request, task, prevThenableState, node) { if (typeof node === 'string') { var segment = task.blockedSegment; - segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, node, request.responseState, segment.lastPushedText); + segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, node, request.responseState, segment.lastPushedText); return; } if (typeof node === 'number') { var _segment = task.blockedSegment; - _segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, '' + node, request.responseState, _segment.lastPushedText); + _segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, '' + node, request.responseState, _segment.lastPushedText); return; } @@ -8564,7 +8776,7 @@ function finishedTask(request, boundary, segment) { if (request.pendingRootTasks === 0) { // We have completed the shell so the shell can't error anymore. - request.onShellError = noop$2; + request.onShellError = noop; var onShellReady = request.onShellReady; onShellReady(); } @@ -8662,7 +8874,7 @@ function retryTask(request, task) { var prevThenableState = task.thenableState; task.thenableState = null; renderNodeDestructive(request, task, prevThenableState, task.node); - pushSegmentFinale$1(segment.chunks, request.responseState, segment.lastPushedText, segment.textEmbedded); + pushSegmentFinale(segment.chunks, request.responseState, segment.lastPushedText, segment.textEmbedded); task.abortSet.delete(task); segment.status = COMPLETED; finishedTask(request, task.blockedBoundary, segment); @@ -8702,8 +8914,8 @@ function performWork(request) { } var prevContext = getActiveContext(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = HooksDispatcher; + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = HooksDispatcher; var prevCacheDispatcher; { @@ -8715,8 +8927,8 @@ function performWork(request) { var prevGetCurrentStackImpl; { - prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack; - ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV; + prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; + ReactDebugCurrentFrame.getCurrentStack = getCurrentStackInDEV; } var prevResponseState = currentResponseState; @@ -8741,7 +8953,7 @@ function performWork(request) { fatalError(request, error); } finally { setCurrentResponseState(prevResponseState); - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactCurrentDispatcher.current = prevDispatcher; { ReactCurrentCache.current = prevCacheDispatcher; @@ -8750,7 +8962,7 @@ function performWork(request) { cleanupAfterRender(previousHostDispatcher); { - ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl; + ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; } if (prevDispatcher === HooksDispatcher) { @@ -8832,10 +9044,10 @@ function flushSegment(request, destination, segment) { if (boundary.forceClientRender) { // Emit a client rendered suspense boundary wrapper. // We never queue the inner boundary so we'll never emit its content or partial segments. - writeStartClientRenderedSuspenseBoundary$1(destination, request.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback. + writeStartClientRenderedSuspenseBoundary(destination, request.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback. flushSubtree(request, destination, segment); - return writeEndClientRenderedSuspenseBoundary$1(destination, request.responseState); + return writeEndClientRenderedSuspenseBoundary(destination, request.responseState); } else if (boundary.pendingTasks > 0) { // This boundary is still loading. Emit a pending suspense boundary wrapper. // Assign an ID to refer to the future content by. @@ -8851,7 +9063,7 @@ function flushSegment(request, destination, segment) { writeStartPendingSuspenseBoundary(destination, request.responseState, id); // Flush the fallback. flushSubtree(request, destination, segment); - return writeEndPendingSuspenseBoundary(destination, request.responseState); + return writeEndPendingSuspenseBoundary(destination); } else if (boundary.byteSize > request.progressiveChunkSize) { // This boundary is large and will be emitted separately so that we can progressively show // other content. We add it to the queue during the flush because we have to ensure that @@ -8865,14 +9077,14 @@ function flushSegment(request, destination, segment) { writeStartPendingSuspenseBoundary(destination, request.responseState, boundary.id); // Flush the fallback. flushSubtree(request, destination, segment); - return writeEndPendingSuspenseBoundary(destination, request.responseState); + return writeEndPendingSuspenseBoundary(destination); } else { { hoistResources(request.resources, boundary.resources); } // We can inline this boundary's content as a complete boundary. - writeStartCompletedSuspenseBoundary$1(destination, request.responseState); + writeStartCompletedSuspenseBoundary(destination, request.responseState); var completedSegments = boundary.completedSegments; if (completedSegments.length !== 1) { @@ -8881,18 +9093,10 @@ function flushSegment(request, destination, segment) { var contentSegment = completedSegments[0]; flushSegment(request, destination, contentSegment); - return writeEndCompletedSuspenseBoundary$1(destination, request.responseState); + return writeEndCompletedSuspenseBoundary(destination, request.responseState); } } -function flushInitialResources(destination, resources, responseState, willFlushAllSegments) { - writeInitialResources(destination, resources, responseState); -} - -function flushImmediateResources(destination, request) { - writeImmediateResources(destination, request.resources, request.responseState); -} - function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); } @@ -8917,6 +9121,11 @@ function flushCompletedBoundary(request, destination, boundary) { } completedSegments.length = 0; + + { + writeResourcesForBoundary(destination, boundary.resources); + } + return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); } @@ -8941,7 +9150,14 @@ function flushPartialBoundary(request, destination, boundary) { } completedSegments.splice(0, i); - return true; + + { + // The way this is structured we only write resources for partial boundaries + // if there is no backpressure. Later before we complete the boundary we + // will write resources regardless of backpressure before we emit the + // completion instruction + return writeResourcesForBoundary(destination, boundary.resources); + } } function flushPartiallyCompletedSegment(request, destination, boundary, segment) { @@ -8981,14 +9197,7 @@ function flushCompletedQueues(request, destination) { if (completedRootSegment !== null) { if (request.pendingRootTasks === 0) { if (enableFloat) { - var preamble = request.preamble; - - for (i = 0; i < preamble.length; i++) { - // we expect the preamble to be tiny and will ignore backpressure - writeChunk(destination, preamble[i]); - } - - flushInitialResources(destination, request.resources, request.responseState, request.allPendingTasks === 0); + writePreamble(destination, request.resources, request.responseState, request.allPendingTasks === 0); } flushSegment(request, destination, completedRootSegment); @@ -8999,7 +9208,7 @@ function flushCompletedQueues(request, destination) { return; } } else if (enableFloat) { - flushImmediateResources(destination, request); + writeHoistables(destination, request.resources, request.responseState); } // We emit client rendering instructions for already emitted boundaries first. // This is so that we can signal to the client to start client rendering them as // soon as possible. @@ -9079,11 +9288,7 @@ function flushCompletedQueues(request, destination) { // either they have pending task or they're complete. ) { { - var postamble = request.postamble; - - for (var _i = 0; _i < postamble.length; _i++) { - writeChunk(destination, postamble[_i]); - } + writePostamble(destination, request.responseState); } { @@ -9178,7 +9383,7 @@ function renderToStringImpl(children, options, generateStaticMarkup, abortReason readyToStream = true; } - var request = createRequest(children, createResponseState$1(generateStaticMarkup, options ? options.identifierPrefix : undefined), createRootFormatContext(), Infinity, onError, undefined, onShellReady, undefined, undefined); + var request = createRequest(children, createResponseState(generateStaticMarkup, options ? options.identifierPrefix : undefined), createRootFormatContext(), Infinity, onError, undefined, onShellReady, undefined, undefined); startWork(request); // If anything suspended and is still pending, we'll abort it before writing. // That way we write only client-rendered boundaries from the start. diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js index d65945cb4781e..e348dc7108ece 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js @@ -7,119 +7,123 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("react"),ba=require("react-dom");function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c