diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 195d4ce0883fc..809abd1da9230 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -8,11 +8,6 @@ on: - trunk - '3.[89]' - '[4-9].[0-9]' - tags: - - '3.[89]' - - '3.[89].[0-9]+' - - '[4-9].[0-9]' - - '[4-9].[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 28092ae468b91..890314f25be49 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -7,11 +7,6 @@ on: - trunk - '5.[3-9]' - '[6-9].[0-9]' - tags: - - '5.[3-9]' - - '5.[3-9].[0-9]+' - - '[6-9]+.[0-9]' - - '[6-9]+.[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index df5aab9288c49..8d96c826d7a57 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -7,11 +7,6 @@ on: - trunk - '3.[89]' - '[4-9].[0-9]' - tags: - - '3.[89]' - - '3.[89].[0-9]+' - - '[4-9].[0-9]' - - '[4-9].[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/javascript-type-checking.yml b/.github/workflows/javascript-type-checking.yml index 4327a815d620c..2572bb4c2fe36 100644 --- a/.github/workflows/javascript-type-checking.yml +++ b/.github/workflows/javascript-type-checking.yml @@ -6,9 +6,6 @@ on: branches: - trunk - '[7-9].[0-9]' - tags: - - '[7-9].[0-9]' - - '[7-9]+.[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index d64bd37c91f7b..3690e6822512f 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -7,11 +7,6 @@ on: - trunk - '6.[2-9]' - '[7-9].[0-9]' - tags: - - '6.[2-9]' - - '6.[2-9].[0-9]+' - - '[7-9].[0-9]' - - '[7-9].[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 48c881a3df485..9e30670cdae7e 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -7,11 +7,6 @@ on: - trunk - '5.[5-9]' - '[6-9].[0-9]' - tags: - - '5.[5-9]' - - '5.[5-9].[0-9]+' - - '[6-9].[0-9]' - - '[6-9].[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/phpstan-static-analysis.yml b/.github/workflows/phpstan-static-analysis.yml index e09fbc44ce9c2..7d7043ac0c1ec 100644 --- a/.github/workflows/phpstan-static-analysis.yml +++ b/.github/workflows/phpstan-static-analysis.yml @@ -6,9 +6,6 @@ on: branches: - trunk - '[7-9].[0-9]' - tags: - - '[7-9].[0-9]' - - '[7-9]+.[0-9].[0-9]+' pull_request: branches: - trunk @@ -21,7 +18,7 @@ on: # These files configure PHPStan. Changes could affect the outcome. - 'phpstan.neon.dist' - 'tests/phpstan/base.neon' - - 'tests/phpstan/baseline.php' + - 'tests/phpstan/baselines/**' # Confirm any changes to relevant workflow files. - '.github/workflows/phpstan-static-analysis.yml' - '.github/workflows/reusable-phpstan-static-analysis-v1.yml' diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 81afd70449141..2b9bbfe891640 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -6,9 +6,6 @@ on: - trunk - '3.[7-9]' - '[4-9].[0-9]' - tags: - - '[0-9]+.[0-9]' - - '[0-9]+.[0-9].[0-9]+' pull_request: branches: - trunk @@ -37,6 +34,7 @@ on: # Confirm any changes to relevant workflow files. - '.github/workflows/phpunit-tests.yml' - '.github/workflows/reusable-phpunit-tests-*.yml' + - '.github/workflows/reusable-prepare-gutenberg.yml' workflow_dispatch: # Once weekly On Sundays at 00:00 UTC. schedule: @@ -54,6 +52,20 @@ concurrency: permissions: {} jobs: + # Downloads and verifies the Gutenberg build once for all PHPUnit jobs. + # + # This condition is the union of the conditions on the jobs that need it, reduced. + # The org matrices require `WordPress/wordpress-develop` or a pull request, and the + # fork matrix requires a pull request, so `wordpress-develop` or a pull request + # covers every case. Keep it in step with those jobs: a narrower condition orphans + # them, because a job that needs a skipped job is skipped too, and a broader one + # downloads a build that nothing consumes. + prepare-gutenberg: + uses: ./.github/workflows/reusable-prepare-gutenberg.yml + permissions: + contents: read + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + # # Creates a PHPUnit test job for each PHP/MySQL combination. # @@ -64,6 +76,7 @@ jobs: test-with-mysql: name: PHP ${{ matrix.php }} uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + needs: prepare-gutenberg permissions: contents: read secrets: @@ -74,7 +87,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. + php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql' ] db-version: [ '5.7', '8.0', '8.4', '9.7' ] tests-domain: [ 'example.org' ] @@ -130,6 +144,8 @@ jobs: phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} tests-domain: ${{ matrix.tests-domain }} report: ${{ matrix.report || false }} + gutenberg-artifact: gutenberg-build + gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # # Creates a PHPUnit test job for each PHP/MariaDB combination. @@ -143,6 +159,7 @@ jobs: test-with-mariadb: name: PHP ${{ matrix.php }} uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + needs: prepare-gutenberg permissions: contents: read secrets: @@ -153,7 +170,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. + php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mariadb' ] db-version: [ '5.5', '10.3', '10.5', '10.6', '10.11', '11.4', '11.8' ] multisite: [ false, true ] @@ -182,6 +200,8 @@ jobs: memcached: ${{ matrix.memcached }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} report: false + gutenberg-artifact: gutenberg-build + gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # # Creates PHPUnit test jobs to test MariaDB and MySQL innovation releases. @@ -197,6 +217,7 @@ jobs: test-innovation-releases: name: PHP ${{ matrix.php }} uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + needs: prepare-gutenberg permissions: contents: read secrets: @@ -207,7 +228,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-24.04 ] - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. + php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} db-type: [ 'mysql', 'mariadb' ] db-version: [ '12.1' ] multisite: [ false, true ] @@ -228,6 +250,8 @@ jobs: memcached: ${{ matrix.memcached }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} report: false + gutenberg-artifact: gutenberg-build + gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # # Runs the HTML API test group. @@ -240,6 +264,7 @@ jobs: html-api-test-groups: name: ${{ matrix.label }} uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + needs: prepare-gutenberg permissions: contents: read secrets: @@ -260,6 +285,8 @@ jobs: db-type: ${{ matrix.db-type }} db-version: ${{ matrix.db-version }} phpunit-test-groups: ${{ matrix.phpunit-test-groups }} + gutenberg-artifact: gutenberg-build + gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} # # Runs unit tests for forks. @@ -271,6 +298,7 @@ jobs: limited-matrix-for-forks: name: PHP ${{ matrix.php }} uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + needs: prepare-gutenberg permissions: contents: read secrets: @@ -318,8 +346,12 @@ jobs: php: ${{ matrix.php }} db-version: ${{ matrix.db-version }} db-type: ${{ matrix.db-type }} + multisite: ${{ matrix.multisite }} memcached: ${{ matrix.memcached || false }} + phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} phpunit-test-groups: ${{ matrix.phpunit-test-groups || '' }} + gutenberg-artifact: gutenberg-build + gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} slack-notifications: name: Slack Notifications @@ -327,7 +359,7 @@ jobs: permissions: actions: read contents: read - needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups, limited-matrix-for-forks ] + needs: [ prepare-gutenberg, test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups, limited-matrix-for-forks ] if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} with: calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} diff --git a/.github/workflows/reusable-phpstan-static-analysis-v1.yml b/.github/workflows/reusable-phpstan-static-analysis-v1.yml index a69b3b46fdea4..26a14ba8d890f 100644 --- a/.github/workflows/reusable-phpstan-static-analysis-v1.yml +++ b/.github/workflows/reusable-phpstan-static-analysis-v1.yml @@ -32,6 +32,7 @@ jobs: # - Builds WordPress. # - Configures caching for PHPStan static analysis scans. # - Runs PHPStan static analysis (with Pull Request annotations). + # - Checks whether the baselines need regenerating. # - Saves the PHPStan result cache. # - Ensures version-controlled files are not modified or deleted. phpstan: @@ -93,7 +94,99 @@ jobs: - name: Run PHP static analysis tests id: phpstan - run: composer run phpstan -- -vvv --error-format=checkstyle | cs2pr --errors-as-warnings --graceful-warnings + run: | + # The report is written to a file as well as piped to cs2pr, so that the step below + # can look at it. + # + # cs2pr exits successfully so that reported errors annotate the pull request without + # failing the run. A pipeline reports only the status of its last command, so that + # also discards the status of the analysis itself. Recover it from PIPESTATUS. + composer run phpstan -- -vvv --error-format=checkstyle | tee "${RUNNER_TEMP}/phpstan-report.xml" | cs2pr --errors-as-warnings --graceful-warnings + status="${PIPESTATUS[0]}" + + # PHPStan exits 1 when it has errors to report, which is the expected case here and + # is what the annotations are for. Anything higher means it did not finish at all, + # which would otherwise pass silently, since the discarded status was the only sign. + if [ "${status}" -gt 1 ]; then + echo "::error title=PHPStan did not complete::The analysis exited with status ${status}, so the code was not fully checked. This is a failure of the run itself rather than a problem found in the code." + exit "${status}" + fi + + # An ignored error that no longer occurs, or occurs a different number of times, is + # reported under an `ignore.*` identifier. That is not something to fix in the code: the + # usual cause is that the error *was* fixed, leaving a baseline describing a state that + # no longer exists. PHPStan does not allow those reports to be ignored or baselined. + # + # The analysis above is reported as warnings, so this would otherwise surface as a + # passing run carrying an annotation that reads like a complaint about a fix. Call it + # out on its own, and say what to do about it. + # + # Detection is on the identifier rather than the message, which is prose and may be + # reworded in any release. The checkstyle format carries it in the `source` attribute. + - name: Check whether the baselines need regenerating + if: ${{ !cancelled() }} + env: + BASELINES_URL: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.sha }}/tests/phpstan/baselines + README_URL: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/tests/phpstan/README.md + run: | + # This step runs even when the analysis above it failed, in which case the report may + # never have been written. That failure is reported there, so there is nothing to add + # here beyond staying quiet about a file that was never going to exist. + if [ ! -f "${RUNNER_TEMP}/phpstan-report.xml" ]; then + exit 0 + fi + + # Leave the run alone unless PHPStan reported an ignore error, because everything + # below concerns an ignore configuration that no longer describes the code, and + # nothing else. Those errors are `ignore.unmatched`, where a pattern matched nothing + # at all, and `ignore.count`, where it matched a different number of times than the + # entry records. The `ignore.` prefix is matched rather than those two names so that + # any later addition to the group is caught as well. + if ! grep -q 'source="ignore\.' "${RUNNER_TEMP}/phpstan-report.xml"; then + exit 0 + fi + + # The summary is Markdown, and its code spans and fences are written literally, so the + # heredoc is quoted to keep the backticks out of the shell's hands. The links are + # written in reference style for the same reason: the URLs are the only part needing + # a variable, so defining them afterwards keeps the whole of the prose in here. + # + # A newline renders as a line break rather than a space, so each paragraph is one + # line however long that makes it, and the rendered summary wraps to its own width. + cat >> "${GITHUB_STEP_SUMMARY}" <<'SUMMARY' + ## PHPStan baselines are out of date + + An ignored error no longer occurs, or occurs a different number of times, so PHPStan reported it under an `ignore.unmatched` or `ignore.count` identifier. + + **If you fixed the error, this is expected.** Each baseline entry records an exact count for a specific file, so that a new occurrence of an already baselined error is reported rather than absorbed. That same exactness means fixing one leaves the baseline describing a state that no longer exists. There is nothing to fix in the code; the baselines just need to catch up. + + Regenerate them and commit the result: + + ```bash + npm run typecheck:php:baselines + ``` + + or, outside the Docker environment: + + ```bash + composer phpstan:baselines + ``` + + That rewrites the files under [`tests/phpstan/baselines`][baselines], deletes any whose errors are now all fixed, and updates the list of them in `phpstan.neon.dist`. + + Where the report names an `@phpstan-ignore` annotation in the code rather than a baseline entry, remove that annotation instead; regenerating will not clear it. + + See [`tests/phpstan/README.md`][readme] for details. + + SUMMARY + + { + echo "[baselines]: ${BASELINES_URL}" + echo "[readme]: ${README_URL}" + } >> "${GITHUB_STEP_SUMMARY}" + + echo "::error title=PHPStan baselines are out of date::An ignored error no longer occurs, or occurs a different number of times. If you fixed it, that is expected: run \`npm run typecheck:php:baselines\` or \`composer phpstan:baselines\` and commit the updated baselines. See ${README_URL}" + exit 1 - name: "Save result cache" uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index dfe678e82a0da..6a7f49fba468c 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -72,6 +72,16 @@ on: required: false type: boolean default: false + gutenberg-artifact: + description: 'The name of a same-workflow artifact containing the prepared Gutenberg build. Optional: callers that omit it download Gutenberg per job.' + required: false + type: string + default: '' + gutenberg-sha: + description: 'The immutable Gutenberg source SHA verified by the calling workflow.' + required: false + type: string + default: '' secrets: CODECOV_TOKEN: description: 'The Codecov token required for uploading reports.' @@ -101,6 +111,7 @@ jobs: # Performs the following steps: # - Sets environment variables. # - Checks out the repository. + # - Downloads the prepared Gutenberg build provided by the calling workflow. # - Sets up Node.js. # - Sets up PHP. # - Installs Composer dependencies. @@ -118,7 +129,7 @@ jobs: # - Submit the test results to the WordPress.org host test results. phpunit-tests: name: ${{ ( inputs.phpunit-test-groups || inputs.coverage-report ) && format( 'PHP {0} with ', inputs.php ) || '' }} ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }} - runs-on: ${{ inputs.os }} + runs-on: ${{ vars.RUNNERS_NAME || inputs.os }} timeout-minutes: ${{ inputs.coverage-report && 120 || inputs.php == '8.4' && 30 || 20 }} permissions: contents: read @@ -135,6 +146,17 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} persist-credentials: false + # Branches >= 5.9 call this workflow at @trunk without the producer job, so they + # pass no artifact. They skip this step and fall back to a per-job download. + - name: Download prepared Gutenberg build + if: inputs.gutenberg-artifact != '' + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + # Without a run ID, this action reads only from the caller's current workflow run. + name: ${{ inputs.gutenberg-artifact }} + path: gutenberg + digest-mismatch: error + - name: Set up Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: @@ -166,6 +188,9 @@ jobs: - name: Build WordPress run: npm run build:dev + env: + # The producer resolved this once. Matrix jobs must not re-resolve mutable GHCR tags. + GUTENBERG_EXPECTED_SHA: ${{ inputs.gutenberg-sha }} - name: General debug information run: | @@ -180,6 +205,22 @@ jobs: run: | docker -v + - name: Pull Docker images (with retry) + run: | + for attempt in 1 2 3; do + if npm run env:pull; then + break + fi + + if [ "$attempt" -eq 3 ]; then + echo "npm run env:pull failed after $attempt attempts." + exit 1 + fi + + echo "npm run env:pull failed (attempt $attempt); retrying..." + sleep $(( attempt * 10 )) + done + - name: Start Docker environment run: | npm run env:start diff --git a/.github/workflows/reusable-prepare-gutenberg.yml b/.github/workflows/reusable-prepare-gutenberg.yml new file mode 100644 index 0000000000000..c5e1f904a9680 --- /dev/null +++ b/.github/workflows/reusable-prepare-gutenberg.yml @@ -0,0 +1,60 @@ +## +# A reusable workflow that downloads and verifies the Gutenberg build once per +# calling workflow run. +## +name: Prepare Gutenberg build + +on: + workflow_call: + outputs: + gutenberg-sha: + description: 'The immutable Gutenberg source SHA verified by this workflow.' + value: ${{ jobs.prepare-gutenberg.outputs.gutenberg-sha }} + +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + +jobs: + prepare-gutenberg: + name: Gutenberg + runs-on: ubuntu-24.04 + timeout-minutes: 10 + outputs: + gutenberg-sha: ${{ steps.download.outputs.gutenberg-sha }} + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + # Resolve the Gutenberg ref from the exact commit that started this workflow run. + ref: ${{ github.sha }} + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + persist-credentials: false + + - name: Set up Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version-file: '.nvmrc' + + - name: Download and verify Gutenberg build + id: download + run: | + node tools/gutenberg/download.js + gutenberg_sha="$(tr -d '\n' < gutenberg/.gutenberg-hash)" + if [[ ! "$gutenberg_sha" =~ ^[a-fA-F0-9]{40}$ ]]; then + echo "Expected a 40-character Gutenberg SHA, received: $gutenberg_sha" >&2 + exit 1 + fi + echo "gutenberg-sha=$gutenberg_sha" >> "$GITHUB_OUTPUT" + + - name: Upload Gutenberg build + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: gutenberg-build + path: gutenberg/ + if-no-files-found: error + include-hidden-files: true + retention-days: 1 diff --git a/.github/workflows/reusable-workflow-lint.yml b/.github/workflows/reusable-workflow-lint.yml index 5be73442a006d..6ae6b0df10968 100644 --- a/.github/workflows/reusable-workflow-lint.yml +++ b/.github/workflows/reusable-workflow-lint.yml @@ -44,6 +44,8 @@ jobs: zizmor: name: Zizmor runs-on: ubuntu-24.04 + # GitHub Code Security is not enabled on any of the private mirrors. + if: ${{ github.event.repository.private == false }} permissions: security-events: write actions: read diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index f52e31177b27c..d344c5371bad5 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -6,9 +6,6 @@ on: - trunk - '3.[7-9]' - '[4-9].[0-9]' - tags: - - '[0-9]+.[0-9]' - - '[0-9]+.[0-9].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index d6fe09904a925..ffc650ec370fb 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -8,6 +8,10 @@ on: paths: - '.github/workflows/test-coverage.yml' - '.github/workflows/reusable-phpunit-tests-v3.yml' + - '.github/workflows/reusable-prepare-gutenberg.yml' + - 'tools/gutenberg/**' + - 'package*.json' + - '.nvmrc' - 'docker-compose.yml' - 'phpunit.xml.dist' - 'tests/phpunit/multisite.xml' @@ -17,6 +21,10 @@ on: paths: - '.github/workflows/test-coverage.yml' - '.github/workflows/reusable-phpunit-tests-v3.yml' + - '.github/workflows/reusable-prepare-gutenberg.yml' + - 'tools/gutenberg/**' + - 'package*.json' + - '.nvmrc' - 'docker-compose.yml' - 'phpunit.xml.dist' - 'tests/phpunit/multisite.xml' @@ -42,12 +50,20 @@ env: PUPPETEER_SKIP_DOWNLOAD: true jobs: + # Downloads and verifies the Gutenberg build once for all coverage jobs. + prepare-gutenberg: + uses: ./.github/workflows/reusable-prepare-gutenberg.yml + permissions: + contents: read + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + # # Creates a PHPUnit test jobs for generating code coverage reports. # test-coverage-report: name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + needs: prepare-gutenberg permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' }} @@ -60,6 +76,8 @@ jobs: php: '8.3' multisite: ${{ matrix.multisite }} coverage-report: ${{ matrix.coverage-report }} + gutenberg-artifact: gutenberg-build + gutenberg-sha: ${{ needs.prepare-gutenberg.outputs.gutenberg-sha }} secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -69,7 +87,7 @@ jobs: permissions: actions: read contents: read - needs: [ test-coverage-report ] + needs: [ prepare-gutenberg, test-coverage-report ] if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} with: calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} diff --git a/.github/workflows/upgrade-develop-testing.yml b/.github/workflows/upgrade-develop-testing.yml index 54623834c4bc4..831b470beb418 100644 --- a/.github/workflows/upgrade-develop-testing.yml +++ b/.github/workflows/upgrade-develop-testing.yml @@ -9,9 +9,6 @@ on: - trunk - '6.[8-9]' - '[7-9].[0-9]' - tags: - - '[0-9]+.[0-9]' - - '[0-9]+.[0-9].[0-9]+' paths: # Any change to a source PHP file should run checks. - 'src/**.php' diff --git a/.gitignore b/.gitignore index 15876fa47fee8..b3180b88db126 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,9 @@ wp-tests-config.php /packagehash.txt /.gutenberg-hash /artifacts +/tools/html-api-fuzz/oracles/lexbor/build +/tools/html-api-fuzz/oracles/html5ever/build +/tools/html-api-fuzz/oracles/chrome/.chrome-for-testing /setup.log /coverage diff --git a/.mailmap b/.mailmap index bbcf17b3ec9d4..dd6623258ff4d 100644 --- a/.mailmap +++ b/.mailmap @@ -11,6 +11,7 @@ Aaron Jorbin Adam Zieliński Adam Zieliński +Aki Hamano Alex King Alex Shiels André diff --git a/README.md b/README.md index bb6d06c034651..eb88e407cb612 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,17 @@ npm run test:php -- --filter npm run test:php -- --group ``` +To run the JavaScript (QUnit) tests: + +``` +npm run grunt qunit:compiled +``` + +`qunit:compiled` builds first, then runs the suite. The QUnit runner loads +scripts from the built `build/` directory, so a plain `npm run grunt qunit` +requires a completed `npm run build` first without a build, every test fails +with a `jQuery is not defined` error. + #### To lint the workflow files GitHub Actions workflows operate in a privileged software supply chain environment, therefore all workflow files must adhere to a high degree of quality and security standards. diff --git a/composer.json b/composer.json index fe2963b7a3574..a04cdedd18d84 100644 --- a/composer.json +++ b/composer.json @@ -16,15 +16,40 @@ "php": ">=7.4" }, "suggest": { + "ext-apcu": "*", + "ext-bc": "*", + "ext-curl": "*", "ext-dom": "*", + "ext-exif": "*", + "ext-fileinfo": "*", + "ext-filter": "*", "ext-ftp": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-igbinary": "*", + "ext-imagick": "*", + "ext-intl": "*", + "ext-mbstring": "*", + "ext-memcached": "*", "ext-mysqli": "*", - "ext-ssh2": "*" + "ext-opcache": "*", + "ext-openssl": "*", + "ext-redis": "*", + "ext-shmop": "*", + "ext-simplexml": "*", + "ext-sockets": "*", + "ext-sodium": "*", + "ext-ssh2": "*", + "ext-timezonedb": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-zip": "*", + "ext-zlib": "*" }, "require-dev": { - "composer/ca-bundle": "1.5.12", + "composer/ca-bundle": "1.5.13", "squizlabs/php_codesniffer": "3.13.5", - "wp-coding-standards/wpcs": "~3.4.0", + "wp-coding-standards/wpcs": "~3.4.1", "phpcompatibility/phpcompatibility-wp": "~2.1.3", "phpstan/phpstan": "2.2.5", "phpstan/phpstan-phpunit": "2.0.18", @@ -43,6 +68,7 @@ }, "scripts": { "phpstan": "@php ./vendor/bin/phpstan analyse --memory-limit=2G", + "phpstan:baselines": [ "Composer\\Config::disableProcessTimeout", "@php ./tests/phpstan/generate-baselines.php" ], "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source", "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source", diff --git a/docker-compose.yml b/docker-compose.yml index cc2ed8d94975e..7ab6ae8c9b4d5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -87,6 +87,7 @@ services: timeout: 5s interval: 5s retries: 10 + start_period: 60s ## # The WP CLI container. diff --git a/package-lock.json b/package-lock.json index 9bb47a3281b6d..78985e8f955c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14237,16 +14237,6 @@ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" } }, - "node_modules/eslint-plugin-react-hooks/node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/eslint-plugin-react/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -33728,10 +33718,11 @@ } }, "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.1.tgz", + "integrity": "sha512-bkxUGQiqWDTXHSgqtevYDri5ee2GPC9szPct4pqpzLEpswgDQmuseDz81ZF0AnNu1xsmnBVmbtv/t/WeUIHlpg==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index a4aff38cf3dd7..1fa7810849728 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "4997026b75c922d8a6f77a03d72ed7cad04c7073", + "sha": "f05e40e91c54f29c449b1f33d0db89f5166812d9", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { @@ -112,6 +112,9 @@ "whatwg-fetch": "3.6.20", "wicg-inert": "3.1.3" }, + "overrides": { + "zod": "3.25.1" + }, "scripts": { "build": "grunt build", "build:dev": "grunt build --dev", @@ -138,7 +141,8 @@ "test:coverage": "npm run test:php -- --coverage-html ./coverage/html/ --coverage-php ./coverage/php/report.php --coverage-text=./coverage/text/report.txt", "test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js", "test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js", - "typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan", + "typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan --", + "typecheck:php:baselines": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan:baselines --", "gutenberg:copy": "node tools/gutenberg/copy.js", "gutenberg:verify": "node tools/gutenberg/utils.js", "gutenberg:download": "node tools/gutenberg/download.js && grunt build:gutenberg" diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 93e6c1f6653b3..3dcf0f6c2c0de 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,15 +14,106 @@ includes: # new strict rules. - vendor/phpstan/phpstan-phpunit/extension.neon - # The baseline file includes preexisting errors in the codebase that should be ignored. + # Preexisting errors that should be ignored, one baseline per error identifier + # so that the remaining work on each is visible as a single shrinking file. + # Each is meant to reach zero and be deleted, taking its line below with it. # https://phpstan.org/user-guide/baseline - - tests/phpstan/baseline.php + # + # Regenerate with `composer phpstan:baselines`, which rewrites both the files + # and the list between the markers. Do not edit that list by hand. + # phpstan:baselines start + - tests/phpstan/baselines/argument.type.neon + - tests/phpstan/baselines/argument.unresolvableType.neon + - tests/phpstan/baselines/arguments.count.neon + - tests/phpstan/baselines/arrayValues.list.neon + - tests/phpstan/baselines/assign.propertyType.neon + - tests/phpstan/baselines/binaryOp.invalid.neon + - tests/phpstan/baselines/booleanAnd.alwaysFalse.neon + - tests/phpstan/baselines/booleanAnd.alwaysTrue.neon + - tests/phpstan/baselines/booleanAnd.leftAlwaysTrue.neon + - tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon + - tests/phpstan/baselines/booleanAnd.rightAlwaysTrue.neon + - tests/phpstan/baselines/booleanNot.alwaysFalse.neon + - tests/phpstan/baselines/booleanNot.alwaysTrue.neon + - tests/phpstan/baselines/booleanOr.alwaysFalse.neon + - tests/phpstan/baselines/booleanOr.alwaysTrue.neon + - tests/phpstan/baselines/booleanOr.rightAlwaysTrue.neon + - tests/phpstan/baselines/catch.neverThrown.neon + - tests/phpstan/baselines/class.nameCase.neon + - tests/phpstan/baselines/class.notFound.neon + - tests/phpstan/baselines/deadCode.unreachable.neon + - tests/phpstan/baselines/empty.offset.neon + - tests/phpstan/baselines/empty.property.neon + - tests/phpstan/baselines/empty.variable.neon + - tests/phpstan/baselines/encapsedStringPart.nonString.neon + - tests/phpstan/baselines/foreach.nonIterable.neon + - tests/phpstan/baselines/function.alreadyNarrowedType.neon + - tests/phpstan/baselines/function.impossibleType.neon + - tests/phpstan/baselines/function.resultUnused.neon + - tests/phpstan/baselines/greater.invalid.neon + - tests/phpstan/baselines/greaterOrEqual.alwaysTrue.neon + - tests/phpstan/baselines/identical.alwaysFalse.neon + - tests/phpstan/baselines/identical.alwaysTrue.neon + - tests/phpstan/baselines/if.alwaysFalse.neon + - tests/phpstan/baselines/if.alwaysTrue.neon + - tests/phpstan/baselines/instanceof.alwaysTrue.neon + - tests/phpstan/baselines/isset.offset.neon + - tests/phpstan/baselines/isset.property.neon + - tests/phpstan/baselines/isset.variable.neon + - tests/phpstan/baselines/method.childParameterType.neon + - tests/phpstan/baselines/method.nonObject.neon + - tests/phpstan/baselines/method.notFound.neon + - tests/phpstan/baselines/method.unused.neon + - tests/phpstan/baselines/notIdentical.alwaysTrue.neon + - tests/phpstan/baselines/nullCoalesce.offset.neon + - tests/phpstan/baselines/nullCoalesce.property.neon + - tests/phpstan/baselines/offsetAccess.nonOffsetAccessible.neon + - tests/phpstan/baselines/offsetAccess.notFound.neon + - tests/phpstan/baselines/offsetAssign.valueType.neon + - tests/phpstan/baselines/parameter.defaultValue.neon + - tests/phpstan/baselines/parameter.notFound.neon + - tests/phpstan/baselines/parameter.phpDocType.neon + - tests/phpstan/baselines/parameter.unresolvableType.neon + - tests/phpstan/baselines/parameterByRef.type.neon + - tests/phpstan/baselines/parameterByRef.unusedType.neon + - tests/phpstan/baselines/property.defaultValue.neon + - tests/phpstan/baselines/property.nonObject.neon + - tests/phpstan/baselines/property.notFound.neon + - tests/phpstan/baselines/property.onlyWritten.neon + - tests/phpstan/baselines/property.phpDocType.neon + - tests/phpstan/baselines/property.private.neon + - tests/phpstan/baselines/property.protected.neon + - tests/phpstan/baselines/property.unusedType.neon + - tests/phpstan/baselines/return.empty.neon + - tests/phpstan/baselines/return.missing.neon + - tests/phpstan/baselines/return.type.neon + - tests/phpstan/baselines/return.unusedType.neon + - tests/phpstan/baselines/smallerOrEqual.alwaysTrue.neon + - tests/phpstan/baselines/staticClassAccess.privateMethod.neon + - tests/phpstan/baselines/ternary.alwaysFalse.neon + - tests/phpstan/baselines/ternary.alwaysTrue.neon + - tests/phpstan/baselines/varTag.noVariable.neon + - tests/phpstan/baselines/variable.undefined.neon + - tests/phpstan/baselines/while.alwaysFalse.neon + - tests/phpstan/baselines/while.alwaysTrue.neon + # phpstan:baselines end parameters: # https://phpstan.org/user-guide/rule-levels - level: 0 + level: 5 reportUnmatchedIgnoredErrors: true + # The following ignored errors are not intended to be fixed, as distinct from the baselines + # included above. + # + # A baseline records work still to be done. Every entry in one is in scope to be fixed, and + # each file is meant to reach zero and then be deleted. An entry here is the opposite: a + # decision that the code is right as written and the report is not actionable, whether + # because PHPStan cannot see what makes the code safe, or because satisfying it would mean + # changing code that has no other reason to change. + # + # So prefer fixing an error, and baseline it when it cannot be fixed yet. Add it here only + # when it should never be fixed, and say why. ignoreErrors: # Level 0: - # Inner functions aren't supported by PHPStan. @@ -40,6 +131,7 @@ parameters: identifier: function.inner path: src/wp-includes/canonical.php count: 1 + # Level 2: # ValueError is PHP 8.0+; core throws it conditionally so the docblocks are correct for WP's 7.4+ range, # but bleedingEdge's version-aware check treats the class as non-existent against the PHP 7.4 floor. diff --git a/run.sh b/run.sh new file mode 100755 index 0000000000000..06846c870214f --- /dev/null +++ b/run.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" +cd "$REPO_ROOT" + +if [[ "${SETUP_ORACLES:-0}" == "1" ]]; then + tools/html-api-fuzz/setup-oracles.sh +fi + +exec tools/html-api-fuzz/preflight.sh diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js index 6e9f4e9f20503..36ffaf18ef778 100644 --- a/src/js/_enqueues/admin/inline-edit-post.js +++ b/src/js/_enqueues/admin/inline-edit-post.js @@ -191,7 +191,7 @@ window.wp = window.wp || {}; */ setBulk : function(){ var te = '', type = this.type, c = true; - var checkedPosts = $( 'tbody th.check-column input[type="checkbox"]:checked' ); + var checkedPosts = $( 'tbody .check-column input[type="checkbox"]:checked' ); var categories = {}; this.revert(); @@ -207,7 +207,7 @@ window.wp = window.wp || {}; * * Get the selected posts based on the checked checkboxes in the post table. */ - $( 'tbody th.check-column input[type="checkbox"]' ).each( function() { + $( 'tbody .check-column input[type="checkbox"]' ).each( function() { // If the checkbox for a post is selected, add the post to the edit list. if ( $(this).prop('checked') ) { diff --git a/src/js/_enqueues/admin/tags.js b/src/js/_enqueues/admin/tags.js index ff7761adb8d3e..88e38b6926309 100644 --- a/src/js/_enqueues/admin/tags.js +++ b/src/js/_enqueues/admin/tags.js @@ -59,8 +59,10 @@ jQuery( function($) { nextFocus = prevFocus; } } - - tr.fadeOut('normal', function(){ tr.remove(); }); + tr.fadeOut('normal', function() { + tr.remove(); + updateTableNavCount(); + }); /** * Removes the term from the parent box and the tag cloud. @@ -73,7 +75,7 @@ jQuery( function($) { $('a.tag-link-' + data.match(/tag_ID=(\d+)/)[1]).remove(); nextFocus.trigger( 'focus' ); message = wp.i18n.__( 'The selected tag has been deleted.' ); - + } else if ( '-1' == r ) { message = wp.i18n.__( 'Sorry, you are not allowed to do that.' ); $('#ajax-response').empty().append('

' + message + '

'); @@ -103,6 +105,53 @@ jQuery( function($) { tr.find( ':input, a' ).prop( 'disabled', false ).removeAttr( 'tabindex' ); } + /** + * Updates the item count and table navigation after a tag is added or removed. + * + * Tags are added and removed client-side, but the item count, the `.tablenav` + * regions, the search box, and the empty-state row are otherwise only + * reconciled by PHP on a full page reload. This keeps them in sync. + * + * @param {string} [action] Pass 'add' when a tag was added. Any other value, + * including none, is treated as a removal. + * + * @return {void} + */ + function updateTableNavCount( action ) { + var $displayingNum = $( '.tablenav-pages .displaying-num' ), + currentCount = parseInt( $displayingNum.first().text().replace( /[^0-9]/g, '' ), 10 ) || 0, + itemCount = ( 'add' === action ) ? currentCount + 1 : Math.max( currentCount - 1, 0 ), + formattedCount = itemCount.toLocaleString(); + + $displayingNum.text( + wp.i18n.sprintf( + /* translators: %s: Number of items. */ + wp.i18n._n( '%s item', '%s items', itemCount ), + formattedCount + ) + ); + + if ( itemCount < 1 ) { + // No tags remain: show the empty-state row and hide the navigation. + var $list = $( '#the-list' ); + + if ( ! $list.find( 'tr.no-items' ).length ) { + var colspan = $list.closest( 'table' ).find( 'thead > tr' ).first().children( ':not(.hidden)' ).length; + $list.append( + '' + + wp.i18n.__( 'No tags found.' ) + + '' + ); + } + $( '.tablenav > *' ).hide(); + $( 'p.search-box' ).hide(); + } else { + $( '#the-list' ).find( 'tr.no-items' ).remove(); + $( '.tablenav > *' ).show(); + $( 'p.search-box' ).show(); + } + } + /** * Adds a deletion confirmation when removing a tag. * @@ -192,6 +241,8 @@ jQuery( function($) { } $('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):visible, textarea:visible', form).val(''); + + updateTableNavCount( 'add' ); }); return false; diff --git a/src/js/_enqueues/wp/customize/controls.js b/src/js/_enqueues/wp/customize/controls.js index a5846d45f687c..00123f9141c30 100644 --- a/src/js/_enqueues/wp/customize/controls.js +++ b/src/js/_enqueues/wp/customize/controls.js @@ -1701,6 +1701,7 @@ filtersHeight: 0, headerContainer: null, updateCountDebounced: null, + announceThemeDebounced: null, /** * wp.customize.ThemesSection @@ -1724,6 +1725,13 @@ section.$body = $( document.body ); api.Section.prototype.initialize.call( section, id, options ); section.updateCountDebounced = _.debounce( section.updateCount, 500 ); + section.announceThemeDebounced = _.debounce( function( name ) { + if ( ! name ) { + return; + } + + wp.a11y.speak( api.settings.l10n.announceThemeDetails.replace( '%s', name ) ); + }, 500 ); }, /** @@ -1777,13 +1785,20 @@ return; } + // Require the alt key for arrow events. + if ( 27 !== event.keyCode && ! event.altKey ) { + return; + } + // Pressing the right arrow key fires a theme:next event. if ( 39 === event.keyCode ) { + event.preventDefault(); // Prevent browser from triggering history shortcuts. section.nextTheme(); } // Pressing the left arrow key fires a theme:previous event. if ( 37 === event.keyCode ) { + event.preventDefault(); // Prevent browser from triggering history shortcuts. section.previousTheme(); } @@ -2602,7 +2617,8 @@ section.$body.addClass( 'modal-open' ); section.containFocus( section.overlay ); section.updateLimits(); - wp.a11y.speak( api.settings.l10n.announceThemeDetails.replace( '%s', theme.name ) ); + + section.announceThemeDebounced( theme.name ); if ( callback ) { callback(); } @@ -2620,6 +2636,8 @@ section.$body.removeClass( 'modal-open' ); section.overlay.fadeOut( 'fast' ); api.control( section.params.action + '_theme_' + section.currentTheme ).container.find( '.theme' ).focus(); + // Cancel any pending navigation announcement. + section.announceThemeDebounced.cancel(); }, /** diff --git a/src/js/_enqueues/wp/theme.js b/src/js/_enqueues/wp/theme.js index 56107ee475057..cfcea1fcc58b7 100644 --- a/src/js/_enqueues/wp/theme.js +++ b/src/js/_enqueues/wp/theme.js @@ -16,6 +16,30 @@ themes = wp.themes = wp.themes || {}; themes.data = _wpThemeSettings; l10n = themes.data.l10n; +/** + * Announces to screen readers the theme shown after previous/next navigation. + * + * @since 7.1.0 + * + * @param {Object} model The theme model. + * @return {void} + */ +themes.announceThemeDebounced = _.debounce( function( model ) { + var name; + + if ( ! model ) { + return; + } + + name = model.get( 'name' ) || model.get( 'id' ); + + if ( ! name ) { + return; + } + + wp.a11y.speak( l10n.themeViewed.replace( '%s', name ) ); +}, 500 ); + // Shortcut for isInstall check. themes.isInstall = !! themes.data.settings.isInstall; @@ -549,6 +573,7 @@ themes.view.Theme = wp.Backbone.View.extend({ preview.render(); this.setNavButtonsState(); $( '.next-theme' ).trigger( 'focus' ); + themes.announceThemeDebounced( self.current ); }) .listenTo( preview, 'theme:previous', function() { @@ -579,6 +604,7 @@ themes.view.Theme = wp.Backbone.View.extend({ preview.render(); this.setNavButtonsState(); $( '.previous-theme' ).trigger( 'focus' ); + themes.announceThemeDebounced( self.current ); }); this.listenTo( preview, 'preview:close', function() { @@ -769,6 +795,9 @@ themes.view.Details = wp.Backbone.View.extend({ } }); } + + // Cancel any pending navigation announcement. + themes.announceThemeDebounced.cancel(); }, // Handles .disabled classes for next/previous buttons. @@ -909,7 +938,7 @@ themes.view.Preview = themes.view.Details.extend({ 'click .devices button': 'previewDevice', 'click .previous-theme': 'previousTheme', 'click .next-theme': 'nextTheme', - 'keyup': 'keyEvent', + 'keydown': 'keyEvent', 'click .theme-install': 'installTheme' }, @@ -967,6 +996,9 @@ themes.view.Preview = themes.view.Details.extend({ this.trigger( 'preview:close' ); this.undelegateEvents(); this.unbind(); + + // Cancel any pending navigation announcement. + themes.announceThemeDebounced.cancel(); return false; }, @@ -1012,18 +1044,20 @@ themes.view.Preview = themes.view.Details.extend({ this.close(); } - // Return if Ctrl + Shift or Shift key pressed - if ( event.shiftKey || ( event.ctrlKey && event.shiftKey ) ) { + // Arrow key navigation requires Alt key to avoid interfering with screen reader navigation. + if ( ! event.altKey ) { return; } // The right arrow key, next theme. if ( event.keyCode === 39 ) { - _.once( this.nextTheme() ); + event.preventDefault(); + this.nextTheme(); } // The left arrow key, previous theme. if ( event.keyCode === 37 ) { + event.preventDefault(); this.previousTheme(); } }, @@ -1111,7 +1145,7 @@ themes.view.Themes = wp.Backbone.View.extend({ } ); // Bind keyboard events. - $( 'body' ).on( 'keyup', function( event ) { + $( 'body' ).on( 'keydown.wp-themes', function( event ) { if ( ! self.overlay ) { return; } @@ -1121,25 +1155,27 @@ themes.view.Themes = wp.Backbone.View.extend({ return; } - // Return if Ctrl + Shift or Shift key pressed - if ( event.shiftKey || ( event.ctrlKey && event.shiftKey ) ) { + // Pressing the escape key fires a theme:collapse event. + if ( event.keyCode === 27 ) { + self.overlay.collapse( event ); + } + + // Arrow key navigation requires Alt key to avoid interfering with screen reader navigation. + if ( ! event.altKey ) { return; } - // Pressing the right arrow key fires a theme:next event. + // Pressing Alt + right arrow key fires a theme:next event. if ( event.keyCode === 39 ) { + event.preventDefault(); self.overlay.nextTheme(); } - // Pressing the left arrow key fires a theme:previous event. + // Pressing Alt + left arrow key fires a theme:previous event. if ( event.keyCode === 37 ) { + event.preventDefault(); self.overlay.previousTheme(); } - - // Pressing the escape key fires a theme:collapse event. - if ( event.keyCode === 27 ) { - self.overlay.collapse( event ); - } }); }, @@ -1322,7 +1358,7 @@ themes.view.Themes = wp.Backbone.View.extend({ // Trigger a route update for the current model. self.theme.trigger( 'theme:expand', nextModel.cid ); - + themes.announceThemeDebounced( nextModel ); } }, @@ -1334,12 +1370,20 @@ themes.view.Themes = wp.Backbone.View.extend({ */ previous: function( args ) { var self = this, - model, previousModel; + model, previousModel, index; // Get the current theme. model = self.collection.get( args[0] ); + + index = self.collection.indexOf( model ); + + // Bail early if the current theme is the first one or the model does not exist. + if ( index <= 0 ) { + return; + } + // Find the previous model within the collection. - previousModel = self.collection.at( self.collection.indexOf( model ) - 1 ); + previousModel = self.collection.at( index - 1 ); if ( previousModel !== undefined ) { @@ -1349,7 +1393,7 @@ themes.view.Themes = wp.Backbone.View.extend({ // Trigger a route update for the current model. self.theme.trigger( 'theme:expand', previousModel.cid ); - + themes.announceThemeDebounced( previousModel ); } }, diff --git a/src/js/media/controllers/cropper.js b/src/js/media/controllers/cropper.js index b0a7a394400e5..2685f743ea8c7 100644 --- a/src/js/media/controllers/cropper.js +++ b/src/js/media/controllers/cropper.js @@ -116,7 +116,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe selection.set({cropDetails: controller.state().imgSelect.getSelection()}); this.$el.text(l10n.cropping); - this.$el.attr('disabled', true); + this.$el.prop( 'disabled', true ); controller.state().doCrop( selection ).done( function( croppedImage ) { controller.trigger('cropped', croppedImage ); diff --git a/src/js/media/models/attachments.js b/src/js/media/models/attachments.js index 1683494388283..fb31ba09ab9d6 100644 --- a/src/js/media/models/attachments.js +++ b/src/js/media/models/attachments.js @@ -32,6 +32,8 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * @param {Object} [options={}] */ initialize: function( models, options ) { + var normalizedOrder; + options = options || {}; this.props = new Backbone.Model(); @@ -44,7 +46,19 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen this.props.on( 'change:orderby', this._changeOrderby, this ); this.props.on( 'change:query', this._changeQuery, this ); - this.props.set( _.defaults( options.props || {} ) ); + options.props = options.props || {}; + + /* + * Normalize the order, if one is set. `Attachments.comparator()` and the + * `order` filter in `wp.media.model.Query` both test for the literal + * strings 'ASC' and 'DESC', so anything else has to fall back to 'DESC'. + */ + if ( ! _.isUndefined( options.props.order ) && ! _.isNull( options.props.order ) ) { + normalizedOrder = String( options.props.order ).toUpperCase(); + options.props.order = ( 'ASC' === normalizedOrder || 'DESC' === normalizedOrder ) ? normalizedOrder : 'DESC'; + } + + this.props.set( options.props ); if ( options.observe ) { this.observe( options.observe ); diff --git a/src/js/media/models/query.js b/src/js/media/models/query.js index b3f62018f5cd4..3c47215c39833 100644 --- a/src/js/media/models/query.js +++ b/src/js/media/models/query.js @@ -251,12 +251,6 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ // Fill default args. _.defaults( props, defaults ); - // Normalize the order. - props.order = props.order.toUpperCase(); - if ( 'DESC' !== props.order && 'ASC' !== props.order ) { - props.order = defaults.order.toUpperCase(); - } - // Ensure we have a valid orderby value. if ( ! _.contains( orderby.allowed, props.orderby ) ) { props.orderby = defaults.orderby; diff --git a/src/js/media/views/attachment.js b/src/js/media/views/attachment.js index 4ecda8347b00a..5761c959ea481 100644 --- a/src/js/media/views/attachment.js +++ b/src/js/media/views/attachment.js @@ -18,10 +18,20 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{ template: wp.template('attachment'), attributes: function() { + var ariaLabel = this.model.get( 'title' ); + + if ( ! ariaLabel ) { + if ( this.model.get( 'uploading' ) ) { + ariaLabel = wp.i18n.__( 'uploading…' ); + } else { + ariaLabel = wp.i18n.__( '(no title)' ); + } + } + return { 'tabIndex': 0, 'role': 'checkbox', - 'aria-label': this.model.get( 'title' ) || wp.i18n.__( 'uploading…' ), + 'aria-label': ariaLabel, 'aria-checked': false, 'data-id': this.model.get( 'id' ) }; diff --git a/src/js/media/views/attachments/browser.js b/src/js/media/views/attachments/browser.js index 26218ea2fa1ae..82b7359eb832a 100644 --- a/src/js/media/views/attachments/browser.js +++ b/src/js/media/views/attachments/browser.js @@ -223,7 +223,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro this.toolbar.set( 'filters', Filters.render() ); } } - + /* * Feels odd to bring the global media library switcher into the Attachment browser view. * Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar ); @@ -241,7 +241,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro }).render() ); // DateFilter is a diff --git a/src/wp-admin/export-personal-data.php b/src/wp-admin/export-personal-data.php index 64b9653c3c1ba..e9ccedc491c14 100644 --- a/src/wp-admin/export-personal-data.php +++ b/src/wp-admin/export-personal-data.php @@ -127,8 +127,8 @@ + diff --git a/src/wp-admin/font-library.php b/src/wp-admin/font-library.php index abc2ea4f4da70..6129211f45545 100644 --- a/src/wp-admin/font-library.php +++ b/src/wp-admin/font-library.php @@ -28,10 +28,26 @@ } // Set the page title -$title = _x( 'Fonts', 'Font Library admin page title' ); +$title = _x( 'Fonts', 'Font Library admin page title' ); +$js_required_message = __( 'The Fonts screen requires JavaScript. Please enable JavaScript in your browser settings to install and manage fonts.' ); require_once ABSPATH . 'wp-admin/admin-header.php'; +?> +
+

+ 'error', + 'additional_classes' => array( 'hide-if-js' ), + ) + ); + ?> +
+ false, - 'search' => '*' . $_REQUEST['term'] . '*', + 'search' => '*' . $term . '*', 'include' => $include_blog_users, 'exclude' => $exclude_blog_users, 'search_columns' => array( 'user_login', 'user_nicename', 'user_email' ), diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index 2facbeb1d522f..cd9426c6ef88b 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -1785,9 +1785,6 @@ protected function has_fatal_error() { 'Cache-Control' => 'no-cache', ); - /** This filter is documented in wp-includes/class-wp-http-streams.php */ - $sslverify = apply_filters( 'https_local_ssl_verify', false ); - // Include Basic auth in the loopback request. if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) { $headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) ); @@ -1804,7 +1801,10 @@ protected function has_fatal_error() { $needle_start = "###### wp_scraping_result_start:$scrape_key ######"; $needle_end = "###### wp_scraping_result_end:$scrape_key ######"; $url = add_query_arg( $scrape_params, home_url( '/' ) ); - $response = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); + + /** This filter is documented in wp-includes/class-wp-http-streams.php */ + $sslverify = apply_filters( 'https_local_ssl_verify', false, $url ); + $response = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); if ( is_wp_error( $response ) ) { if ( $is_debug ) { diff --git a/src/wp-admin/includes/class-wp-filesystem-direct.php b/src/wp-admin/includes/class-wp-filesystem-direct.php index dad8e329b2421..33aa14ce47cb9 100644 --- a/src/wp-admin/includes/class-wp-filesystem-direct.php +++ b/src/wp-admin/includes/class-wp-filesystem-direct.php @@ -176,7 +176,7 @@ public function chmod( $file, $mode = false, $recursive = false ) { } if ( ! $recursive || ! $this->is_dir( $file ) ) { - $current_mode = fileperms( $file ) & 0777 | 0644; + $current_mode = fileperms( $file ) & 0777; /* * fileperms() populates the stat cache, so have to clear it diff --git a/src/wp-admin/includes/class-wp-links-list-table.php b/src/wp-admin/includes/class-wp-links-list-table.php index de116ecf944bc..ae1f50175c35b 100644 --- a/src/wp-admin/includes/class-wp-links-list-table.php +++ b/src/wp-admin/includes/class-wp-links-list-table.php @@ -364,4 +364,22 @@ protected function handle_row_actions( $item, $column_name, $primary ) { return $this->row_actions( $actions ); } + + /** + * Returns a clean label for the primary (Name) column's row header `aria-label`. + * + * Provides screen readers with just the link name as the row header name, + * preventing them from computing the name from the full cell content. + * + * @since 7.1.0 + * + * @param object $link The current link object. + * @return string The link name. + */ + protected function get_primary_column_aria_label( $link ) { + $link_name = html_entity_decode( $link->link_name, ENT_QUOTES, get_bloginfo( 'charset' ) ); + $link_name = wp_strip_all_tags( $link_name ); + + return $link_name; + } } diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index d32f08a438c60..5e6bcdb0d237c 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -1029,6 +1029,8 @@ protected function get_items_per_page( $option, $default_value = 20 ) { */ protected function pagination( $which ) { if ( empty( $this->_pagination_args['total_items'] ) ) { + // translators: Number is a fixed value. This is default text when no items are found. + echo '
' . __( '0 items' ) . '
'; return; } @@ -1685,12 +1687,16 @@ protected function display_tablenav( $which ) { ?>
- has_items() ) : ?> -
+ has_items() ) { + $visibility = ''; + } + ?> +
bulk_actions( $which ); ?>
- extra_tablenav( $which ); $this->pagination( $which ); ?> @@ -1767,6 +1773,26 @@ protected function column_default( $item, $column_name ) {} */ protected function column_cb( $item ) {} + /** + * Returns a clean, human-readable label for the primary column's row header. + * + * Used as the `aria-label` attribute value on the `` element, + * giving screen readers a concise cell name instead of computing it from + * the full cell content (which may include row action links, excerpts, etc.). + * + * Subclasses should override this method to return the item's primary + * identifier (e.g. post title, plugin name, username). Return an empty string + * to omit the attribute. + * + * @since 7.1.0 + * + * @param object|array $item The current item. + * @return string The aria-label value, or an empty string. + */ + protected function get_primary_column_aria_label( $item ) { + return ''; + } + /** * Generates the columns for a single row of the table. * @@ -1796,9 +1822,9 @@ protected function single_row_columns( $item ) { $attributes = "class='$classes' $data"; if ( 'cb' === $column_name ) { - echo ''; + echo ''; echo $this->column_cb( $item ); - echo ''; + echo ''; } elseif ( method_exists( $this, '_column_' . $column_name ) ) { echo call_user_func( array( $this, '_column_' . $column_name ), @@ -1807,16 +1833,29 @@ protected function single_row_columns( $item ) { $data, $primary ); - } elseif ( method_exists( $this, 'column_' . $column_name ) ) { - echo ""; - echo call_user_func( array( $this, 'column_' . $column_name ), $item ); - echo $this->handle_row_actions( $item, $column_name, $primary ); - echo ''; } else { - echo ""; - echo $this->column_default( $item, $column_name ); + $is_primary = ( $primary === $column_name ); + $tag = $is_primary ? 'th' : 'td'; + $scope = $is_primary ? ' scope="row"' : ''; + + $aria_label = ''; + if ( $is_primary ) { + $label = $this->get_primary_column_aria_label( $item ); + if ( '' !== $label ) { + $aria_label = ' aria-label="' . esc_attr( $label ) . '"'; + } + } + + echo "<$tag $attributes$scope$aria_label>"; + + if ( method_exists( $this, 'column_' . $column_name ) ) { + echo call_user_func( array( $this, 'column_' . $column_name ), $item ); + } else { + echo $this->column_default( $item, $column_name ); + } + echo $this->handle_row_actions( $item, $column_name, $primary ); - echo ''; + echo ""; } } } diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index a14b498ea525b..feac4753d3e92 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -932,4 +932,23 @@ protected function handle_row_actions( $item, $column_name, $primary ) { return $this->row_actions( $actions ); } + + /** + * Returns a clean label for the primary (File) column's row header `aria-label`. + * + * Provides screen readers with just the attachment title as the row header + * name, preventing them from computing the name from the full cell content. + * + * @since 7.1.0 + * + * @param WP_Post $post The current WP_Post object. + * @return string The attachment title. + */ + protected function get_primary_column_aria_label( $post ) { + // The title may contain HTML. The printed aria-label uses esc_attr() later. + $attachment_title = html_entity_decode( _draft_or_post_title( $post ), ENT_QUOTES, get_bloginfo( 'charset' ) ); + $attachment_title = wp_strip_all_tags( $attachment_title ); + + return $attachment_title; + } } diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php index f4a937962ed19..1ffa24ea24106 100644 --- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -884,4 +884,23 @@ protected function handle_row_actions( $item, $column_name, $primary ) { return $this->row_actions( $actions ); } + + /** + * Returns a clean label for the primary (URL) column's row header `aria-label`. + * + * Provides screen readers with just the site title as the row header name, + * preventing them from computing the name from the full cell content. + * + * @since 7.1.0 + * + * @param array $blog The current site properties array. + * @return string The site title, or the site URL (domain + path) if the title is empty. + */ + protected function get_primary_column_aria_label( $blog ) { + $blog_name = html_entity_decode( (string) get_blog_option( $blog['blog_id'], 'blogname', '' ), ENT_QUOTES, get_bloginfo( 'charset' ) ); + $blog_name = wp_strip_all_tags( $blog_name ); + + // Fall back to the blog URL and path if the blog name is empty. + return '' !== $blog_name ? $blog_name : untrailingslashit( $blog['domain'] . $blog['path'] ); + } } diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php index a0fca2fd60fe4..81c35414d9053 100644 --- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -940,11 +940,11 @@ public function single_row_columns( $item ) { switch ( $column_name ) { case 'cb': - echo ''; + echo ''; $this->column_cb( $item ); - echo ''; + echo ''; break; case 'name': @@ -966,11 +966,11 @@ public function single_row_columns( $item ) { } } - echo "" . $item->display( 'Name' ) . $active_theme_label . ''; + echo "" . $item->display( 'Name' ) . $active_theme_label . ''; $this->column_name( $item ); - echo ''; + echo ''; break; case 'description': diff --git a/src/wp-admin/includes/class-wp-ms-users-list-table.php b/src/wp-admin/includes/class-wp-ms-users-list-table.php index b4cbf8457a0b4..145299bcc26cb 100644 --- a/src/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-users-list-table.php @@ -502,7 +502,7 @@ public function display_rows() { } ?> - + single_row_columns( $user ); ?> row_actions( $actions ); } + + /** + * Returns a clean label for the primary (Username) column's row header `aria-label`. + * + * Provides screen readers with just the user login as the row header name, + * preventing them from computing the name from the full cell content. + * + * @since 7.1.0 + * + * @param WP_User $user The current WP_User object. + * @return string The user login. + */ + protected function get_primary_column_aria_label( $user ) { + return $user->user_login; + } } diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 08b2e982e702f..d8945e103064e 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -1233,12 +1233,12 @@ public function single_row( $item ) { switch ( $column_name ) { case 'cb': - echo "$checkbox"; + echo "$checkbox"; break; case 'name': - echo "$plugin_name"; + echo "$plugin_name"; echo $this->row_actions( $actions, true ); - echo ''; + echo ''; break; case 'description': $classes = 'column-description desc'; diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index 7522f8561ba44..8a319986766b8 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -1114,10 +1114,28 @@ public function column_cb( $item ) { * @param string $primary */ protected function _column_title( $post, $classes, $data, $primary ) { - echo ''; + $aria_label = $this->get_primary_column_aria_label( $post ); + $aria_attr = ( '' !== $aria_label ) ? ' aria-label="' . esc_attr( $aria_label ) . '"' : ''; + echo ''; echo $this->column_title( $post ); echo $this->handle_row_actions( $post, 'title', $primary ); - echo ''; + echo ''; + } + + /** + * Returns a clean label for the primary (title) column's row header `aria-label`. + * + * Provides screen readers with just the post title as the row header name, + * preventing them from computing the name from the full cell content + * (which includes row action links, post states, and possibly an excerpt). + * + * @since 7.1.0 + * + * @param WP_Post $item The current post object. + * @return string The post title, or 'no title' if no title. + */ + protected function get_primary_column_aria_label( $item ) { + return isset( $item->post_title ) && ! empty( $item->post_title ) ? $item->post_title : __( 'no title' ); } /** @@ -1197,7 +1215,7 @@ public function column_title( $post ) { /* translators: %s: Parent post title. */ esc_html( sprintf( __( 'Child of %s' ), wp_strip_all_tags( $parent_title ) ) ) ); - $hierarchy_nolink = sprintf( + $hierarchy_nolink = sprintf( ' (%2$s)', esc_attr( $hierarchy_id ), /* translators: %s: Parent post title. */ diff --git a/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php b/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php index aa68c84649e2f..c7ce460f75a70 100644 --- a/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php +++ b/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php @@ -157,4 +157,19 @@ public function column_next_steps( $item ) { break; } } + + /** + * Returns a clean label for the primary (Requester) column's row header `aria-label`. + * + * Provides screen readers with just the item email as the row header name, + * preventing them from computing the name from the full cell content. + * + * @since 7.1.0 + * + * @param WP_User_Request $item Item being shown. + * @return string The user request item email. + */ + protected function get_primary_column_aria_label( $item ) { + return $item->email; + } } diff --git a/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php b/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php index 716535160f12d..36d8ba5384590 100644 --- a/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php +++ b/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php @@ -164,4 +164,19 @@ public function column_next_steps( $item ) { break; } } + + /** + * Returns a clean label for the primary (Requester) column's row header `aria-label`. + * + * Provides screen readers with just the item email as the row header name, + * preventing them from computing the name from the full cell content. + * + * @since 7.1.0 + * + * @param WP_User_Request $item Item being shown. + * @return string The user request item email. + */ + protected function get_primary_column_aria_label( $item ) { + return $item->email; + } } diff --git a/src/wp-admin/includes/class-wp-privacy-policy-content.php b/src/wp-admin/includes/class-wp-privacy-policy-content.php index 2f7ec2108d22f..141f073cd260c 100644 --- a/src/wp-admin/includes/class-wp-privacy-policy-content.php +++ b/src/wp-admin/includes/class-wp-privacy-policy-content.php @@ -329,6 +329,12 @@ public static function notice( $post = null ) { $current_screen = get_current_screen(); $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); + // If the privacy policy page has been deleted, reset the option and bail. + if ( $policy_page_id && ! get_post( $policy_page_id ) ) { + update_option( 'wp_page_for_privacy_policy', 0 ); + return; + } + if ( 'post' !== $current_screen->base || $policy_page_id !== $post->ID ) { return; } diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index ab7dfef77f67c..b0b689d412edb 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -89,7 +89,7 @@ final class WP_Screen { * have a `$parent_base` of 'edit'. * * @since 3.3.0 - * @var string|null + * @var ?string */ public $parent_base; @@ -99,7 +99,7 @@ final class WP_Screen { * Some `$parent_file` values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'. * * @since 3.3.0 - * @var string|null + * @var ?string */ public $parent_file; @@ -186,7 +186,7 @@ final class WP_Screen { * Stores the 'screen_settings' section of screen options. * * @since 3.3.0 - * @var string + * @var ?string */ private $_screen_settings; diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index 9eb4c8525a942..2ddfaadc4b39d 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -2212,9 +2212,6 @@ public function get_test_rest_availability() { 'Cache-Control' => 'no-cache', 'X-WP-Nonce' => wp_create_nonce( 'wp_rest' ), ); - /** This filter is documented in wp-includes/class-wp-http-streams.php */ - $sslverify = apply_filters( 'https_local_ssl_verify', false ); - // Include Basic auth in loopback requests. if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) { $headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) ); @@ -2230,6 +2227,9 @@ public function get_test_rest_availability() { $url ); + /** This filter is documented in wp-includes/class-wp-http-streams.php */ + $sslverify = apply_filters( 'https_local_ssl_verify', false, $url ); + $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); if ( is_wp_error( $r ) ) { @@ -3279,8 +3279,6 @@ public function can_perform_loopback() { $headers = array( 'Cache-Control' => 'no-cache', ); - /** This filter is documented in wp-includes/class-wp-http-streams.php */ - $sslverify = apply_filters( 'https_local_ssl_verify', false ); // Include Basic auth in loopback requests. if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) { @@ -3289,6 +3287,9 @@ public function can_perform_loopback() { $url = site_url( 'wp-cron.php' ); + /** This filter is documented in wp-includes/class-wp-http-streams.php */ + $sslverify = apply_filters( 'https_local_ssl_verify', false, $url ); + /* * A post request is used for the wp-cron.php loopback test to cause the file * to finish early without triggering cron jobs. This has two benefits: @@ -3611,7 +3612,7 @@ public function get_page_cache_headers(): array { private function check_for_page_caching() { /** This filter is documented in wp-includes/class-wp-http-streams.php */ - $sslverify = apply_filters( 'https_local_ssl_verify', false ); + $sslverify = apply_filters( 'https_local_ssl_verify', false, home_url( '/' ) ); $headers = array(); diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php index 75e37e45d5c4f..561888fed8394 100644 --- a/src/wp-admin/includes/class-wp-terms-list-table.php +++ b/src/wp-admin/includes/class-wp-terms-list-table.php @@ -751,4 +751,20 @@ public function inline_edit() { name; + } } diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php index 9a8709b438e05..1212c2db531e5 100644 --- a/src/wp-admin/includes/class-wp-users-list-table.php +++ b/src/wp-admin/includes/class-wp-users-list-table.php @@ -563,9 +563,16 @@ public function single_row( $user_object, $style = '', $role = '', $numposts = 0 $attributes = "class='$classes' $data"; if ( 'cb' === $column_name ) { - $row .= "$checkbox"; + $row .= "$checkbox"; } else { - $row .= ""; + $is_primary = ( $primary === $column_name ); + $tag = $is_primary ? 'th' : 'td'; + $scope = $is_primary ? ' scope="row"' : ''; + $aria_label = ''; + if ( $is_primary ) { + $aria_label = ' aria-label="' . esc_attr( $user_object->user_login ) . '"'; + } + $row .= "<$tag $attributes$scope$aria_label>"; switch ( $column_name ) { case 'username': $row .= "$avatar $edit"; @@ -628,7 +635,8 @@ public function single_row( $user_object, $style = '', $role = '', $numposts = 0 if ( $primary === $column_name ) { $row .= $this->row_actions( $actions ); } - $row .= ''; + $tag = ( $primary === $column_name ) ? 'th' : 'td'; + $row .= ""; } } $row .= ''; diff --git a/src/wp-admin/includes/dashboard-on-this-day.php b/src/wp-admin/includes/dashboard-on-this-day.php deleted file mode 100644 index 1939f8ca4b0e3..0000000000000 --- a/src/wp-admin/includes/dashboard-on-this-day.php +++ /dev/null @@ -1,238 +0,0 @@ -' . esc_html__( 'No posts were published on this day in previous years.' ) . '

'; - return; - } - - $posts_by_year = array(); - $post_count = count( $posts ); - - foreach ( $posts as $post ) { - $year = get_the_date( 'Y', $post ); - - if ( ! isset( $posts_by_year[ $year ] ) ) { - $posts_by_year[ $year ] = array(); - } - - $posts_by_year[ $year ][] = $post; - } - - /* translators: Date format for the On This Day widget date, without year. See https://www.php.net/manual/datetime.format.php */ - $date = '' . esc_html( wp_date( _x( 'F jS', 'on this day date format' ) ) ) . ''; - ?> -
-

- -

-
    - $year_posts ) : ?> -
  • -

    -
      - - post_author; - $author_name = $author_id > 0 ? (string) get_the_author_meta( 'display_name', $author_id ) : ''; - $show_author = '' !== trim( $author_name ) && get_current_user_id() !== $author_id; - ?> -
    • - - - ' . esc_html( - sprintf( - /* translators: %s: Post author's display name. */ - __( 'by %s' ), - $author_name - ) - ) . ''; - ?> - -
    • - -
    -
  • - -
-
- format( 'Y' ); - $date_query = array( - 'relation' => 'AND', - array( - 'before' => array( 'year' => $year ), - ), - _wp_dashboard_on_this_day_date_query_clause( $today ), - ); - - $args = array( - 'post_type' => 'post', - 'post_status' => array( 'publish' ), - 'posts_per_page' => 10, - 'ignore_sticky_posts' => true, - 'orderby' => 'date', - 'order' => 'DESC', - 'no_found_rows' => true, - 'update_post_term_cache' => false, - 'update_post_meta_cache' => false, - 'date_query' => $date_query, - ); - - /** - * Filters the arguments used to query posts for the On This Day dashboard widget. - * - * @since 7.1.0 - * - * @param array $args WP_Query arguments. - */ - $args = apply_filters( 'wp_dashboard_on_this_day_query_args', $args ); - - $query = new WP_Query( $args ); - - return $query->posts; -} - -/** - * Builds the date query clause for today's anniversary date. - * - * On February 28 in a non-leap year, February 29 posts are included so - * leap-day anniversaries still appear. - * - * @since 7.1.0 - * @access private - * - * @param DateTimeInterface $date Date to build the clause for. - * @return array Date query clause. - */ -function _wp_dashboard_on_this_day_date_query_clause( $date ) { - $month = (int) $date->format( 'm' ); - $day = (int) $date->format( 'd' ); - $clause = array( - 'month' => $month, - 'day' => $day, - ); - - // Display leap day posts on Feb 28 in non leap years. - if ( - 28 === $day - && 2 === $month - && false === (bool) $date->format( 'L' ) - ) { - $clause = array( - 'relation' => 'OR', - $clause, - array( - 'month' => 2, - 'day' => 29, - ), - ); - } - - return $clause; -} diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index a0b0ac6c77239..0fe5c62064b64 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -88,13 +88,6 @@ function wp_dashboard_setup() { wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' ); } - // On This Day. - if ( ! function_exists( 'wp_dashboard_on_this_day_setup' ) ) { - require_once ABSPATH . 'wp-admin/includes/dashboard-on-this-day.php'; - } - - wp_dashboard_on_this_day_setup(); - // WordPress Events and News. wp_add_dashboard_widget( 'dashboard_primary', __( 'WordPress Events and News' ), 'wp_dashboard_events_news' ); @@ -1294,7 +1287,7 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { $widget_options[ $widget_id ] = wp_widget_rss_process( $_POST['widget-rss'][ $number ] ); $widget_options[ $widget_id ]['number'] = $number; - // Title is optional. If black, fill it if possible. + // Title is optional. If blank, fill it if possible. if ( ! $widget_options[ $widget_id ]['title'] && isset( $_POST['widget-rss'][ $number ]['title'] ) ) { $rss = fetch_feed( $widget_options[ $widget_id ]['url'] ); if ( is_wp_error( $rss ) ) { @@ -1377,7 +1370,7 @@ function wp_dashboard_events_news() { * @since 4.8.0 */ function wp_print_community_events_markup() { - $community_events_notice = '

' . ( 'This widget requires JavaScript.' ) . '

'; + $community_events_notice = '

' . __( 'This widget requires JavaScript.' ) . '

'; $community_events_notice .= ''; $community_events_notice .= ''; diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index d7c771444ac98..8c0015020f35d 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -541,9 +541,6 @@ function wp_edit_theme_plugin_file( $args ) { 'Cache-Control' => 'no-cache', ); - /** This filter is documented in wp-includes/class-wp-http-streams.php */ - $sslverify = apply_filters( 'https_local_ssl_verify', false ); - // Include Basic auth in loopback requests. if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) { $headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) ); @@ -583,7 +580,11 @@ function wp_edit_theme_plugin_file( $args ) { session_write_close(); } - $url = add_query_arg( $scrape_params, $url ); + $url = add_query_arg( $scrape_params, $url ); + + /** This filter is documented in wp-includes/class-wp-http-streams.php */ + $sslverify = apply_filters( 'https_local_ssl_verify', false, $url ); + $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); $body = wp_remote_retrieve_body( $r ); $scrape_result_position = strpos( $body, $needle_start ); diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php index a9ddc55e1bf96..2f6bc25740e2d 100644 --- a/src/wp-admin/includes/image-edit.php +++ b/src/wp-admin/includes/image-edit.php @@ -151,12 +151,17 @@ function wp_image_editor( $post_id, $msg = false ) { - +
@@ -815,11 +820,13 @@ function wp_restore_image( $post_id ) { $restored = false; $msg = new stdClass(); - if ( ! is_array( $backup_sizes ) ) { + if ( ! is_array( $meta ) || ! is_array( $backup_sizes ) ) { $msg->error = __( 'Cannot load image metadata.' ); return $msg; } + $meta['sizes'] ??= array(); + $parts = pathinfo( $file ); $suffix = time() . rand( 100, 999 ); $default_sizes = get_intermediate_image_sizes(); @@ -978,6 +985,8 @@ function wp_save_image( $post_id ) { return $return; } + $meta['sizes'] ??= array(); + if ( ! is_array( $backup_sizes ) ) { $backup_sizes = array(); } diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index c2d15d758ef2e..6c50a1daba4fd 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -3425,9 +3425,9 @@ function attachment_submitbox_metadata() { $file_size = false; - if ( isset( $meta['filesize'] ) ) { - $file_size = $meta['filesize']; - } elseif ( file_exists( $file ) ) { + if ( isset( $meta['filesize'] ) && is_numeric( $meta['filesize'] ) && (int) $meta['filesize'] > 0 ) { + $file_size = (int) $meta['filesize']; + } elseif ( is_string( $file ) && '' !== $file && is_readable( $file ) ) { $file_size = wp_filesize( $file ); } diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index 50066bf14d18c..56e17113653d2 100644 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -692,7 +692,7 @@ function site_admin_notice() { if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) { $upgrade_network_message = sprintf( /* translators: %s: URL to Upgrade Network screen. */ - __( 'Thank you for Updating! Please visit the Upgrade Network page to update all your sites.' ), + __( 'Thank you for updating! Please visit the Upgrade Network page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ); @@ -939,7 +939,7 @@ function confirm_delete_users( $users ) { if ( is_array( $blog_users ) && ! empty( $blog_users ) ) { $user_site = "{$details->blogname}"; switch_to_blog( $details->userblog_id ); - /* This filter is documented in wp-admin/users.php */ + /** This filter is documented in wp-admin/users.php */ $user_has_content = (bool) apply_filters( 'users_have_additional_content', false, array( $delete_user->ID ) ); if ( ! $user_has_content ) { diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index 70263a2034807..f26d63d528e78 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -1509,7 +1509,7 @@ function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selecte wp_defer_term_counting( false ); /** This action is documented in wp-includes/nav-menu.php */ - do_action( 'wp_update_nav_menu', $nav_menu_selected_id ); + do_action( 'wp_update_nav_menu', $nav_menu_selected_id, array() ); /* translators: %s: Nav menu title. */ $message = sprintf( __( '%s has been updated.' ), '' . $nav_menu_selected_title . '' ); diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index bafd5f0904769..418bfd7def697 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -316,11 +316,13 @@ function get_inline_data( $post ) { $title = esc_textarea( trim( $post->post_title ) ); + /** This filter is documented in wp-admin/edit-tag-form.php */ + $editable_slug = apply_filters( 'editable_slug', $post->post_name, $post ); + echo ' - diff --git a/src/wp-admin/network/themes.php b/src/wp-admin/network/themes.php index 763a13712a59b..8a27669f73b67 100644 --- a/src/wp-admin/network/themes.php +++ b/src/wp-admin/network/themes.php @@ -293,7 +293,7 @@ check_admin_referer( 'bulk-themes' ); /** This action is documented in wp-admin/network/site-themes.php */ - $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, 0 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores wp_safe_redirect( $referer ); exit; diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php index 3e18aae9673a4..144f98d0f90d8 100644 --- a/src/wp-admin/network/users.php +++ b/src/wp-admin/network/users.php @@ -158,7 +158,7 @@ $user_ids = (array) $_POST['allusers']; /** This action is documented in wp-admin/network/site-themes.php */ - $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids, 0 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores wp_safe_redirect( $sendback ); exit; diff --git a/src/wp-admin/options-connectors.php b/src/wp-admin/options-connectors.php index c67d857b2b60d..7dc3b13508abe 100644 --- a/src/wp-admin/options-connectors.php +++ b/src/wp-admin/options-connectors.php @@ -27,13 +27,29 @@ } // Set the page title. -$title = __( 'Connectors' ); +$title = __( 'Connectors' ); +$js_required_message = __( 'The Connectors screen requires JavaScript. Please enable JavaScript in your browser settings to manage your connectors.' ); // Set parent file for menu highlighting. $parent_file = 'options-general.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; +?> +
+

+ 'error', + 'additional_classes' => array( 'hide-if-js' ), + ) + ); + ?> +
+
-

+

+ + +

diff --git a/src/wp-admin/options-privacy.php b/src/wp-admin/options-privacy.php index 4205967acb3a8..739c8edab1cda 100644 --- a/src/wp-admin/options-privacy.php +++ b/src/wp-admin/options-privacy.php @@ -51,12 +51,15 @@ static function ( $body_class ) { check_admin_referer( $action ); if ( 'set-privacy-page' === $action ) { - $privacy_policy_page_id = isset( $_POST['page_for_privacy_policy'] ) ? (int) $_POST['page_for_privacy_policy'] : 0; + $previous_privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); + $privacy_policy_page_id = isset( $_POST['page_for_privacy_policy'] ) ? (int) $_POST['page_for_privacy_policy'] : 0; update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id ); - $privacy_page_updated_message = __( 'Privacy Policy page updated successfully.' ); + $privacy_page_message_type = 'success'; if ( $privacy_policy_page_id ) { + $privacy_page_updated_message = __( 'Privacy Policy page updated successfully.' ); + /* * Don't always link to the menu customizer: * @@ -75,9 +78,16 @@ static function ( $body_class ) { esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus', admin_url( 'customize.php' ) ) ) ); } + } elseif ( $previous_privacy_policy_page_id ) { + // A previously set Privacy Policy page was cleared. + $privacy_page_updated_message = __( 'Privacy Policy page removed.' ); + } else { + // No Privacy Policy page was set before, and none is set now. + $privacy_page_updated_message = __( 'No Privacy Policy page is currently set.' ); + $privacy_page_message_type = 'info'; } - add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', $privacy_page_updated_message, 'success' ); + add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', $privacy_page_updated_message, $privacy_page_message_type ); } elseif ( 'create-privacy-page' === $action ) { if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) { diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php index 31facac7edcca..d52d51bbe3ae4 100644 --- a/src/wp-admin/options-reading.php +++ b/src/wp-admin/options-reading.php @@ -175,14 +175,14 @@ - + - + - - + + diff --git a/src/wp-admin/plugin-install.php b/src/wp-admin/plugin-install.php index 5c8be143bf332..395e55b8eca30 100644 --- a/src/wp-admin/plugin-install.php +++ b/src/wp-admin/plugin-install.php @@ -40,6 +40,15 @@ $wp_list_table->prepare_items(); +/** + * WP_Plugin_Install_List_Table::prepare_items() populates these globals, which + * are used throughout the rest of this file. + * + * @global string $tab The current tab of the Install Plugins screen. + * @global int $paged The current page number of the plugins list. + */ +global $tab, $paged; + $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); if ( $pagenum > $total_pages && $total_pages > 0 ) { @@ -169,7 +178,7 @@

- diff --git a/src/wp-admin/site-editor.php b/src/wp-admin/site-editor.php index 9a8268c3392d7..4289f89f7102c 100644 --- a/src/wp-admin/site-editor.php +++ b/src/wp-admin/site-editor.php @@ -211,19 +211,21 @@ static function ( $classes ) { array( '/wp/v2/settings', 'OPTIONS' ), // Used by getBlockPatternCategories in useBlockEditorSettings. '/wp/v2/block-patterns/categories', - // @see packages/core-data/src/entities.js + /** + * The preloaded URL must exactly match the request the client makes, + * including the field order. + * @link https://github.com/WordPress/gutenberg/blob/trunk/packages/core-data/src/entities.js + */ '/?_fields=' . implode( ',', array( 'description', 'gmt_offset', 'home', + 'image_max_bit_depth', 'image_sizes', 'image_size_threshold', - 'image_output_formats', - 'jpeg_interlaced', - 'png_interlaced', - 'gif_interlaced', + 'image_strip_meta', 'name', 'site_icon', 'site_icon_url', diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index fc24334abff85..8e6fc5d1eea2c 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -67,6 +67,8 @@ /* translators: %d: Number of themes. */ 'themesFound' => __( 'Number of Themes found: %d' ), 'noThemesFound' => __( 'No themes found. Try a different search.' ), + /* translators: %s: Theme name. */ + 'themeViewed' => __( 'Theme details: %s' ), 'collapseSidebar' => __( 'Collapse Sidebar' ), 'expandSidebar' => __( 'Expand Sidebar' ), /* translators: Hidden accessibility text. */ diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index a9f24765ce742..ac2cd4a9824cb 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -131,9 +131,10 @@ if ( current_user_can( 'switch_themes' ) ) { $help_overview = '

' . __( 'This screen is used for managing your installed themes. Aside from the default theme(s) included with your WordPress installation, themes are designed and developed by third parties.' ) . '

' . '

' . __( 'From this screen you can:' ) . '

' . - '
  • ' . __( 'Hover or tap to see Activate and Live Preview buttons' ) . '
  • ' . - '
  • ' . __( 'Click on the theme to see the theme name, version, author, description, tags, and the Delete link' ) . '
  • ' . - '
  • ' . __( 'Click Customize for the active theme or Live Preview for any other theme to see a live preview' ) . '
' . + '
  • ' . __( 'Hover or tap to see Activate and Live Preview buttons.' ) . '
  • ' . + '
  • ' . __( 'Click Customize for the active theme or Live Preview for any other theme to see a live preview.' ) . '
  • ' . + '
  • ' . __( 'Click on a theme to open the Theme Details dialog and see the theme name, version, author, description, tags, and the Delete link.' ) . '
  • ' . + '
  • ' . __( 'Use the buttons at the top of the dialog, or alt/option plus the left or right arrow keys on your keyboard, to navigate between themes quickly.' ) . '
' . '

' . __( 'The active theme is displayed highlighted as the first theme.' ) . '

' . '

' . __( 'The search for installed themes will search for terms in their name, description, author, or tag.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '

'; @@ -236,6 +237,8 @@ /* translators: %d: Number of themes. */ 'themesFound' => __( 'Number of Themes found: %d' ), 'noThemesFound' => __( 'No themes found. Try a different search.' ), + /* translators: %s: Theme name. */ + 'themeViewed' => __( 'Theme details: %s' ), ), ) ); diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php index 1f42a287e4957..7cf0f6fe10108 100644 --- a/src/wp-admin/upload.php +++ b/src/wp-admin/upload.php @@ -190,7 +190,7 @@ function () { 'title' => __( 'Attachment Details' ), 'content' => '

' . __( 'Clicking an item will display an Attachment Details dialog, which allows you to preview media and make quick edits. Any changes you make to the attachment details will be automatically saved.' ) . '

' . - '

' . __( 'Use the arrow buttons at the top of the dialog, or the left and right arrow keys on your keyboard, to navigate between media items quickly.' ) . '

' . + '

' . __( 'Use the buttons at the top of the dialog, or alt/option plus the left or right arrow keys on your keyboard, to navigate between media items quickly.' ) . '

' . '

' . __( 'You can also delete individual items and access the extended edit screen from the details dialog.' ) . '

', ) ); diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php index ba027b06bb366..3136705f60a03 100644 --- a/src/wp-admin/user-new.php +++ b/src/wp-admin/user-new.php @@ -603,7 +603,7 @@
- diff --git a/src/wp-content/themes/twentyeleven/author.php b/src/wp-content/themes/twentyeleven/author.php index ad2117324f571..23ca4310c1317 100644 --- a/src/wp-content/themes/twentyeleven/author.php +++ b/src/wp-content/themes/twentyeleven/author.php @@ -57,7 +57,7 @@ * * @since Twenty Eleven 1.0 * - * @param int The height and width avatar dimension in pixels. Default 60. + * @param int $size The height and width avatar dimension in pixels. Default 60. */ $author_bio_avatar_size = apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ); echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size ); diff --git a/src/wp-content/themes/twentyeleven/content-status.php b/src/wp-content/themes/twentyeleven/content-status.php index 15484232cd0d6..c76760b321111 100644 --- a/src/wp-content/themes/twentyeleven/content-status.php +++ b/src/wp-content/themes/twentyeleven/content-status.php @@ -39,7 +39,7 @@ * * @since Twenty Eleven 1.0 * - * @param int The height and width avatar dimensions in pixels. Default 65. + * @param int $size The height and width avatar dimensions in pixels. Default 65. */ echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', 65 ) ); ?> diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php index 6434507effd7a..251d2807a41e8 100644 --- a/src/wp-content/themes/twentyeleven/functions.php +++ b/src/wp-content/themes/twentyeleven/functions.php @@ -689,7 +689,7 @@ function twentyeleven_get_first_url() { } /** This filter is documented in wp-includes/link-template.php */ - return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); + return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink(), get_post() ); } /** diff --git a/src/wp-content/themes/twentyeleven/image.php b/src/wp-content/themes/twentyeleven/image.php index 54bfb17498fe7..1bab57b581259 100644 --- a/src/wp-content/themes/twentyeleven/image.php +++ b/src/wp-content/themes/twentyeleven/image.php @@ -99,7 +99,7 @@ * * @since Twenty Eleven 1.0 * - * @param int The width for the image attachment size in pixels. Default 848. + * @param int $size The width for the image attachment size in pixels. Default 848. */ $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 ); echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); diff --git a/src/wp-content/themes/twentyeleven/inc/widgets.php b/src/wp-content/themes/twentyeleven/inc/widgets.php index 4e82cdf6a055e..72411d01a8064 100644 --- a/src/wp-content/themes/twentyeleven/inc/widgets.php +++ b/src/wp-content/themes/twentyeleven/inc/widgets.php @@ -70,7 +70,7 @@ public function widget( $args, $instance ) { ob_start(); - /** This filter is documented in wp-includes/default-widgets.php */ + /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base ); if ( ! isset( $instance['number'] ) ) { diff --git a/src/wp-content/themes/twentyeleven/tag.php b/src/wp-content/themes/twentyeleven/tag.php index 23517622f0cb6..966dc7c603a93 100644 --- a/src/wp-content/themes/twentyeleven/tag.php +++ b/src/wp-content/themes/twentyeleven/tag.php @@ -30,7 +30,7 @@ * * @since Twenty Eleven 1.0 * - * @param string The default tag description. + * @param string $tag_archive_meta The default tag description. */ echo apply_filters( 'tag_archive_meta', '
' . $tag_description . '
' ); } diff --git a/src/wp-content/themes/twentyfifteen/inc/template-tags.php b/src/wp-content/themes/twentyfifteen/inc/template-tags.php index 7f39cdc194a7c..f77e13250965f 100644 --- a/src/wp-content/themes/twentyfifteen/inc/template-tags.php +++ b/src/wp-content/themes/twentyfifteen/inc/template-tags.php @@ -246,7 +246,8 @@ function twentyfifteen_post_thumbnail() { function twentyfifteen_get_link_url() { $has_url = get_url_in_content( get_the_content() ); - return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() ); + /** This filter is documented in wp-includes/link-template.php */ + return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink(), get_post() ); } endif; diff --git a/src/wp-content/themes/twentyfourteen/inc/widgets.php b/src/wp-content/themes/twentyfourteen/inc/widgets.php index 8ffac4cd83057..36846daa84860 100644 --- a/src/wp-content/themes/twentyfourteen/inc/widgets.php +++ b/src/wp-content/themes/twentyfourteen/inc/widgets.php @@ -113,7 +113,8 @@ public function widget( $args, $instance ) { $number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : 2; $title = ! empty( $instance['title'] ) ? $instance['title'] : $format_string; - $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $ephemera = new WP_Query( array( diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index 6d3e505670bc7..8cfd93bbf6faa 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -170,7 +170,7 @@ function twentyten_setup() { * * @since Twenty Ten 1.0 * - * @param int The default header image width in pixels. Default 940. + * @param int $width The default header image width in pixels. Default 940. */ 'width' => apply_filters( 'twentyten_header_image_width', 940 ), /** @@ -178,7 +178,7 @@ function twentyten_setup() { * * @since Twenty Ten 1.0 * - * @param int The default header image height in pixels. Default 198. + * @param int $height The default header image height in pixels. Default 198. */ 'height' => apply_filters( 'twentyten_header_image_height', 198 ), // Support flexible heights. diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 6cbbb1c7adf94..9aa4fca7871cf 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -739,7 +739,8 @@ function twentythirteen_get_link_url() { $content = get_the_content(); $has_url = get_url_in_content( $content ); - return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); + /** This filter is documented in wp-includes/link-template.php */ + return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink(), get_post() ); } if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) : diff --git a/src/wp-content/themes/twentytwentyfour/functions.php b/src/wp-content/themes/twentytwentyfour/functions.php index 06d60695e9041..5dd34dd34c470 100644 --- a/src/wp-content/themes/twentytwentyfour/functions.php +++ b/src/wp-content/themes/twentytwentyfour/functions.php @@ -4,7 +4,8 @@ * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * - * @package Twenty Twenty-Four + * @package WordPress + * @subpackage Twenty_Twenty_Four * @since Twenty Twenty-Four 1.0 */ diff --git a/src/wp-content/themes/twentytwentyfour/patterns/banner-hero.php b/src/wp-content/themes/twentytwentyfour/patterns/banner-hero.php index 9971884d6399e..dd5704a77e698 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/banner-hero.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/banner-hero.php @@ -5,7 +5,12 @@ * Categories: banner, call-to-action, featured * Viewport width: 1400 * Description: A hero section with a title, a paragraph, a CTA button, and an image. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/banner-project-description.php b/src/wp-content/themes/twentytwentyfour/patterns/banner-project-description.php index 7ddeea7aa1721..32e9025cfb34c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/banner-project-description.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/banner-project-description.php @@ -5,8 +5,14 @@ * Categories: featured, banner, about, portfolio * Viewport width: 1400 * Description: Project description section with title, paragraph, and an image. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentyfour/patterns/cta-content-image-on-right.php b/src/wp-content/themes/twentytwentyfour/patterns/cta-content-image-on-right.php index 49bceb2eb96ac..88c6dbc13fb22 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/cta-content-image-on-right.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/cta-content-image-on-right.php @@ -5,7 +5,12 @@ * Categories: call-to-action, banner * Viewport width: 1400 * Description: A title, paragraph, two CTA buttons, and an image for a general CTA section. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/cta-pricing.php b/src/wp-content/themes/twentytwentyfour/patterns/cta-pricing.php index 4ba39374342de..ba03a11f5cffc 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/cta-pricing.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/cta-pricing.php @@ -5,7 +5,12 @@ * Categories: call-to-action, services * Viewport width: 1400 * Description: A pricing section with a title, a paragraph and three pricing levels. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/cta-rsvp.php b/src/wp-content/themes/twentytwentyfour/patterns/cta-rsvp.php index a12386949b1a8..30c59ffc06d8d 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/cta-rsvp.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/cta-rsvp.php @@ -5,7 +5,12 @@ * Categories: call-to-action, featured * Viewport width: 1100 * Description: A large RSVP heading sideways, a description, and a CTA button. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php b/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php index b6315b0cbd30b..9b6cdf486d43d 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php @@ -5,7 +5,12 @@ * Categories: call-to-action, banner, featured, services * Viewport width: 1400 * Description: An image, title, paragraph and a CTA button to describe services. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/cta-subscribe-centered.php b/src/wp-content/themes/twentytwentyfour/patterns/cta-subscribe-centered.php index c11b9133510bb..fbb1b641c84e5 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/cta-subscribe-centered.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/cta-subscribe-centered.php @@ -5,7 +5,12 @@ * Categories: call-to-action * Keywords: newsletter, subscribe, button * Description: Subscribers CTA section with a title, a paragraph and a CTA button. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/footer-centered-logo-nav.php b/src/wp-content/themes/twentytwentyfour/patterns/footer-centered-logo-nav.php index 39258764fc9e4..13b827418bf7a 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/footer-centered-logo-nav.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/footer-centered-logo-nav.php @@ -5,7 +5,12 @@ * Categories: footer * Block Types: core/template-part/footer * Description: A footer section with a centered logo, navigation, and WordPress credits. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/footer-colophon-3-col.php b/src/wp-content/themes/twentytwentyfour/patterns/footer-colophon-3-col.php index e0de63b6f97ee..6dbbe880dc2fe 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/footer-colophon-3-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/footer-colophon-3-col.php @@ -5,7 +5,12 @@ * Categories: footer * Block Types: core/template-part/footer * Description: A footer section with a colophon and 3 columns. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/footer.php b/src/wp-content/themes/twentytwentyfour/patterns/footer.php index 4b8aeb2797883..b653e8c287027 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/footer.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/footer.php @@ -5,7 +5,12 @@ * Categories: footer * Block Types: core/template-part/footer * Description: A footer section with a colophon and 4 columns. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/gallery-full-screen-image.php b/src/wp-content/themes/twentytwentyfour/patterns/gallery-full-screen-image.php index dc9cc5d339ba2..a22f6d5899940 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/gallery-full-screen-image.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/gallery-full-screen-image.php @@ -4,7 +4,12 @@ * Slug: twentytwentyfour/gallery-full-screen-image * Categories: gallery, portfolio * Description: A cover image section that covers the entire width. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-2-col.php b/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-2-col.php index 8e2222efe74cd..53e7996262b45 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-2-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-2-col.php @@ -6,8 +6,14 @@ * Keywords: project, images, media, masonry, columns * Viewport width: 1400 * Description: A gallery section with 2 columns and offset images. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-3-col.php b/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-3-col.php index 5f32f7f861c05..a24bffc8f0f67 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-3-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-3-col.php @@ -6,8 +6,14 @@ * Keywords: project, images, media, masonry, columns * Viewport width: 1400 * Description: A gallery section with 3 columns and offset images. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-4-col.php b/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-4-col.php index df9341d0457fb..c999ae84f0a11 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-4-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/gallery-offset-images-grid-4-col.php @@ -6,7 +6,12 @@ * Keywords: project, images, media, masonry, columns * Viewport width: 1400 * Description: A gallery section with 4 columns and offset images. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/gallery-project-layout.php b/src/wp-content/themes/twentytwentyfour/patterns/gallery-project-layout.php index 143d61bd7a3f7..ea0d17fcea529 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/gallery-project-layout.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/gallery-project-layout.php @@ -5,7 +5,12 @@ * Categories: gallery, featured, portfolio * Viewport width: 1600 * Description: A gallery section with a project layout with 2 images. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-404.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-404.php index d033a13f44d1b..7900e75c2ce17 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-404.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-404.php @@ -3,7 +3,12 @@ * Title: 404 * Slug: twentytwentyfour/hidden-404 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-comments.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-comments.php index bd106684624c2..ffbea0bb411f0 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-comments.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-comments.php @@ -3,7 +3,12 @@ * Title: Comments * Slug: twentytwentyfour/hidden-comments * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-no-results.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-no-results.php index 00bbf9761bf7f..bb9242c263a7a 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-no-results.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-no-results.php @@ -3,8 +3,14 @@ * Title: No results * Slug: twentytwentyfour/hidden-no-results * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> +

diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-portfolio-hero.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-portfolio-hero.php index 1af3e7dbd17c1..467456f0e700c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-portfolio-hero.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-portfolio-hero.php @@ -3,7 +3,12 @@ * Title: Portfolio hero * Slug: twentytwentyfour/hidden-portfolio-hero * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-meta.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-meta.php index add4a1c8f3716..fc103c84aa3cd 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-meta.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-meta.php @@ -3,7 +3,12 @@ * Title: Post meta * Slug: twentytwentyfour/hidden-post-meta * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-navigation.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-navigation.php index be2dcb28b7f28..2113fd89ced44 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-navigation.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-post-navigation.php @@ -3,7 +3,12 @@ * Title: Post navigation * Slug: twentytwentyfour/hidden-post-navigation * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-posts-heading.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-posts-heading.php index 9b2811568ab6a..03a67a4bbe0ff 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-posts-heading.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-posts-heading.php @@ -4,8 +4,14 @@ * Slug: twentytwentyfour/hidden-posts-heading * Categories: hidden * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.3 */ + ?> +

diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-search.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-search.php index e4aaa64ece726..a0c9a4d16704a 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-search.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-search.php @@ -3,7 +3,12 @@ * Title: Search * Slug: twentytwentyfour/hidden-search * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/hidden-sidebar.php b/src/wp-content/themes/twentytwentyfour/patterns/hidden-sidebar.php index abcb01b7bf0ba..093d60c3fe818 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/hidden-sidebar.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/hidden-sidebar.php @@ -3,8 +3,14 @@ * Title: Sidebar * Slug: twentytwentyfour/hidden-sidebar * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-about-business.php b/src/wp-content/themes/twentytwentyfour/patterns/page-about-business.php index 7b662c243b98d..78741b9779022 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-about-business.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-about-business.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1400 * Description: A business about page with a hero section, a text section, a services section, a team section, a clients section, a FAQ section, and a CTA section. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-home-blogging.php b/src/wp-content/themes/twentytwentyfour/patterns/page-home-blogging.php index bd08b6e04317b..905b8151dcb49 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-home-blogging.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-home-blogging.php @@ -7,7 +7,12 @@ * Post Types: page, wp_template * Viewport width: 1400 * Description: A blogging home page with a hero section, a text section, a blog section, and a CTA section. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-home-business.php b/src/wp-content/themes/twentytwentyfour/patterns/page-home-business.php index 3f2c748e78553..8a665c5366dbc 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-home-business.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-home-business.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1400 * Description: A business home page with a hero section, a text section, a services section, a team section, a clients section, a FAQ section, and a CTA section. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio-gallery.php b/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio-gallery.php index 6c64adebe8dbd..f68471d36d040 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio-gallery.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio-gallery.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1400 * Description: A portfolio home page that features a gallery. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio.php b/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio.php index c03d1b13d57c3..45b1f05c80411 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-home-portfolio.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1400 * Description: A portfolio home page with a description and a 4-column post section with only feature images. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-newsletter-landing.php b/src/wp-content/themes/twentytwentyfour/patterns/page-newsletter-landing.php index 6ad69ff20ece9..2233bf3ba3a15 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-newsletter-landing.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-newsletter-landing.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1100 * Description: A block with a newsletter subscription CTA for a landing page. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-portfolio-overview.php b/src/wp-content/themes/twentytwentyfour/patterns/page-portfolio-overview.php index 6aee66b1a610a..c6d87b4971119 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-portfolio-overview.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-portfolio-overview.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1400 * Description: A full portfolio page with a section for project description, project details, a full screen image, and a gallery section with two images. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/page-rsvp-landing.php b/src/wp-content/themes/twentytwentyfour/patterns/page-rsvp-landing.php index 6ec67323ee79f..5e0dfd0196e9b 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/page-rsvp-landing.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/page-rsvp-landing.php @@ -8,7 +8,12 @@ * Post Types: page, wp_template * Viewport width: 1100 * Description: A large RSVP heading sideways, a description, and a CTA button. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/posts-1-col.php b/src/wp-content/themes/twentytwentyfour/patterns/posts-1-col.php index f2bbaa1efd323..f672bd7bbbd77 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/posts-1-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/posts-1-col.php @@ -5,7 +5,12 @@ * Categories: query * Block Types: core/query * Description: A list of posts, 1 column. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/posts-3-col.php b/src/wp-content/themes/twentytwentyfour/patterns/posts-3-col.php index 855615471b5e9..9c0f85e9d32e8 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/posts-3-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/posts-3-col.php @@ -5,7 +5,12 @@ * Categories: query * Block Types: core/query * Description: A list of posts, 3 columns. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/posts-grid-2-col.php b/src/wp-content/themes/twentytwentyfour/patterns/posts-grid-2-col.php index d6a584f6f6c3b..600f7e29642c7 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/posts-grid-2-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/posts-grid-2-col.php @@ -5,7 +5,12 @@ * Categories: query * Block Types: core/query * Description: A grid of posts featuring the first post, 2 columns. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-3-col.php b/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-3-col.php index 7aee49301e524..c28906224a05c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-3-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-3-col.php @@ -5,7 +5,12 @@ * Categories: query * Block Types: core/query * Description: A list of posts with featured images only, 3 columns. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-offset-4-col.php b/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-offset-4-col.php index 2cbcaff47e574..b6de9f474d7f4 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-offset-4-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/posts-images-only-offset-4-col.php @@ -4,7 +4,12 @@ * Slug: twentytwentyfour/posts-images-only-offset-4-col * Categories: posts * Description: A list of posts with featured images only, 4 columns. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/posts-list.php b/src/wp-content/themes/twentytwentyfour/patterns/posts-list.php index e298a544a324b..4a424b78af9da 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/posts-list.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/posts-list.php @@ -5,7 +5,12 @@ * Categories: query, posts * Block Types: core/query * Description: A list of posts without images, 1 column. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/team-4-col.php b/src/wp-content/themes/twentytwentyfour/patterns/team-4-col.php index 86a8bfac2b362..62406b2ae51e9 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/team-4-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/team-4-col.php @@ -5,7 +5,12 @@ * Categories: team, about * Viewport width: 1400 * Description: A team section, with a heading, a paragraph, and 4 columns for team members. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-archive-blogging.php b/src/wp-content/themes/twentytwentyfour/patterns/template-archive-blogging.php index 6d193a4cdd390..f5409a60053f8 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-archive-blogging.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-archive-blogging.php @@ -5,7 +5,12 @@ * Template Types: archive, category, tag, author, date * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-archive-portfolio.php b/src/wp-content/themes/twentytwentyfour/patterns/template-archive-portfolio.php index aa347ad1c2140..8db5343bb3c3a 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-archive-portfolio.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-archive-portfolio.php @@ -5,7 +5,12 @@ * Template Types: archive * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-home-blogging.php b/src/wp-content/themes/twentytwentyfour/patterns/template-home-blogging.php index 4a96d748004fb..515f3e6ad778f 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-home-blogging.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-home-blogging.php @@ -5,7 +5,12 @@ * Template Types: front-page, index, home * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-home-business.php b/src/wp-content/themes/twentytwentyfour/patterns/template-home-business.php index e84a5aca903c0..a214262ed494c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-home-business.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-home-business.php @@ -5,7 +5,12 @@ * Template Types: front-page, home * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-home-portfolio.php b/src/wp-content/themes/twentytwentyfour/patterns/template-home-portfolio.php index 4fc4f072ba3c9..fe8a895ba8595 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-home-portfolio.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-home-portfolio.php @@ -5,7 +5,12 @@ * Template Types: front-page, home * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-index-blogging.php b/src/wp-content/themes/twentytwentyfour/patterns/template-index-blogging.php index b810186324aaf..c53ce0fc31a7b 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-index-blogging.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-index-blogging.php @@ -5,7 +5,12 @@ * Template Types: index, home * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-index-portfolio.php b/src/wp-content/themes/twentytwentyfour/patterns/template-index-portfolio.php index 7b78323d2b13c..2c9417debb3d8 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-index-portfolio.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-index-portfolio.php @@ -5,7 +5,12 @@ * Template Types: index * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-search-blogging.php b/src/wp-content/themes/twentytwentyfour/patterns/template-search-blogging.php index ec9a29b8860c6..6bc185efc22a1 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-search-blogging.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-search-blogging.php @@ -5,7 +5,12 @@ * Template Types: search * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-search-portfolio.php b/src/wp-content/themes/twentytwentyfour/patterns/template-search-portfolio.php index 1c60eb18e2127..d6643b2fe4a53 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-search-portfolio.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-search-portfolio.php @@ -5,7 +5,12 @@ * Template Types: search * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-single-portfolio.php b/src/wp-content/themes/twentytwentyfour/patterns/template-single-portfolio.php index ba54d58110ce3..7934310cbe9b6 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/template-single-portfolio.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/template-single-portfolio.php @@ -5,7 +5,12 @@ * Template Types: posts, single * Viewport width: 1400 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php b/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php index 1bac825e9e5d3..2c250f6b9f37c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php @@ -6,7 +6,12 @@ * Categories: testimonials, text * Viewport width: 1300 * Description: A centered testimonial section with an avatar, name, and job title. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-alternating-images.php b/src/wp-content/themes/twentytwentyfour/patterns/text-alternating-images.php index 6ee225137dfa5..4f9f758965d39 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-alternating-images.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-alternating-images.php @@ -5,7 +5,12 @@ * Categories: text, about * Viewport width: 1400 * Description: A text section, then a two-column section with text in one column and an image in the other. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement-small.php b/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement-small.php index c558518823965..c7240750f741c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement-small.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement-small.php @@ -6,7 +6,12 @@ * Keywords: mission, introduction * Viewport width: 1200 * Description: A centered italic text statement with compact padding. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement.php b/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement.php index ca909ca773c09..4c1ce23844a52 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-centered-statement.php @@ -6,7 +6,12 @@ * Keywords: mission, introduction * Viewport width: 1400 * Description: A centered text statement with a large amount of padding on all sides. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php b/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php index 3e0c3aeecb1e7..891bfe3782527 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php @@ -6,7 +6,12 @@ * Keywords: faq, about, frequently asked * Viewport width: 1400 * Description: A FAQ section with a large FAQ heading and a group of questions and answers. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-feature-grid-3-col.php b/src/wp-content/themes/twentytwentyfour/patterns/text-feature-grid-3-col.php index 03310f564f214..67fa4c6c1750d 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-feature-grid-3-col.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-feature-grid-3-col.php @@ -5,7 +5,12 @@ * Categories: text, about * Viewport width: 1400 * Description: A feature grid of 2 rows and 3 columns with headings and text. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-project-details.php b/src/wp-content/themes/twentytwentyfour/patterns/text-project-details.php index 9116a974a3466..c95004776502c 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-project-details.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-project-details.php @@ -5,7 +5,12 @@ * Categories: text, portfolio * Viewport width: 1400 * Description: A text-only section for project details. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-title-left-image-right.php b/src/wp-content/themes/twentytwentyfour/patterns/text-title-left-image-right.php index cfcbf6dfc1260..ca32e5fb95fe0 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-title-left-image-right.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-title-left-image-right.php @@ -5,7 +5,12 @@ * Categories: banner, about, featured * Viewport width: 1400 * Description: A title, a paragraph and a CTA button on the left with an image on the right. + * + * @package WordPress + * @subpackage Twenty_Twenty_Four + * @since Twenty Twenty-Four 1.0 */ + ?> diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php index a020e62bf00c5..13e5db52031b7 100644 --- a/src/wp-content/themes/twentytwentyone/functions.php +++ b/src/wp-content/themes/twentytwentyone/functions.php @@ -581,7 +581,7 @@ function twentytwentyone_the_html_classes() { * * @since Twenty Twenty-One 1.0 * - * @param string The list of classes. Default empty string. + * @param string $classes The list of classes. Default empty string. */ $classes = apply_filters( 'twentytwentyone_html_classes', '' ); if ( ! $classes ) { diff --git a/src/wp-content/themes/twentytwentyone/inc/template-functions.php b/src/wp-content/themes/twentytwentyone/inc/template-functions.php index 529564c295319..f141b99a8cf8f 100644 --- a/src/wp-content/themes/twentytwentyone/inc/template-functions.php +++ b/src/wp-content/themes/twentytwentyone/inc/template-functions.php @@ -182,12 +182,17 @@ function twenty_twenty_one_continue_reading_link() { * Adds a title to posts and pages that are missing titles. * * @since Twenty Twenty-One 1.0 + * @since Twenty Twenty-One 2.9 Only applies the filter on the front end. * * @param string $title The title. * @return string */ function twenty_twenty_one_post_title( $title ) { - return '' === $title ? esc_html_x( 'Untitled', 'Added to posts and pages that are missing titles', 'twentytwentyone' ) : $title; + if ( is_admin() ) { + return $title; + } + + return '' === $title ? esc_html_x( 'Untitled', 'Added on the front end to posts and pages that are missing titles', 'twentytwentyone' ) : $title; } } add_filter( 'the_title', 'twenty_twenty_one_post_title' ); diff --git a/src/wp-content/themes/twentytwentythree/patterns/call-to-action.php b/src/wp-content/themes/twentytwentythree/patterns/call-to-action.php index 15427904bd22b..ca89451d26787 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/call-to-action.php +++ b/src/wp-content/themes/twentytwentythree/patterns/call-to-action.php @@ -6,8 +6,14 @@ * Keywords: Call to action * Block Types: core/buttons * Description: Left-aligned text with a CTA button and a separator. + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentythree/patterns/footer-default.php b/src/wp-content/themes/twentytwentythree/patterns/footer-default.php index e3827248be5a5..cd02cde2629ac 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/footer-default.php +++ b/src/wp-content/themes/twentytwentythree/patterns/footer-default.php @@ -5,8 +5,14 @@ * Categories: footer * Block Types: core/template-part/footer * Description: Footer with site title and powered by WordPress. + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentythree/patterns/hidden-404.php b/src/wp-content/themes/twentytwentythree/patterns/hidden-404.php index ae7dbb14ca089..7c38c9b3452c1 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/hidden-404.php +++ b/src/wp-content/themes/twentytwentythree/patterns/hidden-404.php @@ -3,8 +3,14 @@ * Title: Hidden 404 * Slug: twentytwentythree/hidden-404 * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.0 */ + ?> + diff --git a/src/wp-content/themes/twentytwentythree/patterns/hidden-comments.php b/src/wp-content/themes/twentytwentythree/patterns/hidden-comments.php index 84d4a78779e1c..285116db20e5d 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/hidden-comments.php +++ b/src/wp-content/themes/twentytwentythree/patterns/hidden-comments.php @@ -3,8 +3,14 @@ * Title: Hidden Comments * Slug: twentytwentythree/hidden-comments * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.0 */ + ?> +
diff --git a/src/wp-content/themes/twentytwentythree/patterns/hidden-heading.php b/src/wp-content/themes/twentytwentythree/patterns/hidden-heading.php index 542f9bed1a947..8147dc62a4519 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/hidden-heading.php +++ b/src/wp-content/themes/twentytwentythree/patterns/hidden-heading.php @@ -3,8 +3,14 @@ * Title: Hidden Heading for Homepage * Slug: twentytwentythree/hidden-heading * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.6 */ + ?> +

diff --git a/src/wp-content/themes/twentytwentythree/patterns/hidden-no-results.php b/src/wp-content/themes/twentytwentythree/patterns/hidden-no-results.php index d3f7ae0586556..9c22497100ad7 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/hidden-no-results.php +++ b/src/wp-content/themes/twentytwentythree/patterns/hidden-no-results.php @@ -3,8 +3,14 @@ * Title: Hidden No Results Content * Slug: twentytwentythree/hidden-no-results-content * Inserter: no + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.0 */ + ?> +

diff --git a/src/wp-content/themes/twentytwentythree/patterns/post-meta.php b/src/wp-content/themes/twentytwentythree/patterns/post-meta.php index a1a92264d5718..2282058318a5a 100644 --- a/src/wp-content/themes/twentytwentythree/patterns/post-meta.php +++ b/src/wp-content/themes/twentytwentythree/patterns/post-meta.php @@ -6,8 +6,14 @@ * Keywords: post meta * Block Types: core/template-part/post-meta * Description: Post meta information with separator on the top. + * + * @package WordPress + * @subpackage Twenty_Twenty_Three + * @since Twenty Twenty-Three 1.0 */ + ?> +

diff --git a/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php b/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php index f47e26e5dd6c9..e9def1eb63614 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php +++ b/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php @@ -2,6 +2,8 @@ /** * Twenty Twenty-Two: Block Patterns * + * @package WordPress + * @subpackage Twenty_Twenty_Two * @since Twenty Twenty-Two 1.0 */ diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php index dab9b04a86e85..8ddd949231733 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php @@ -1,7 +1,12 @@ __( 'Footer with text, title, and logo', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php index c1306cbb833e0..c6e7a45a32cf9 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php @@ -1,7 +1,12 @@ __( 'Blog footer', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php index b2ec3626fbaf8..35928ff581f84 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php @@ -1,7 +1,12 @@ __( 'Dark footer with title and citation', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-default.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-default.php index 3682643084326..1fbc4ed53825a 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-default.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-default.php @@ -1,7 +1,12 @@ __( 'Default footer', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-logo.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-logo.php index caa44e8c34900..16211476f2bad 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-logo.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-logo.php @@ -1,7 +1,12 @@ __( 'Footer with logo and citation', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation-copyright.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation-copyright.php index d0b554249d4fd..e9ef59eaff0bc 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation-copyright.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation-copyright.php @@ -1,7 +1,12 @@ __( 'Footer with navigation and copyright', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation.php index 79792c730df0a..5ff93771c58d4 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-navigation.php @@ -1,7 +1,12 @@ __( 'Footer with navigation and citation', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-images-title-citation.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-images-title-citation.php index a79c1d44cd51d..12e92ede9e12f 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-images-title-citation.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-images-title-citation.php @@ -1,7 +1,12 @@ __( 'Footer with query, featured images, title, and citation', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-title-citation.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-title-citation.php index 13bb43df5c34a..f3bb899d9de3b 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-title-citation.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-query-title-citation.php @@ -1,7 +1,12 @@ __( 'Footer with query, title, and citation', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-social-copyright.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-social-copyright.php index 0c7e4ae5178e6..9119f7f203e2a 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-social-copyright.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-social-copyright.php @@ -1,7 +1,12 @@ __( 'Footer with social links and copyright', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-title-tagline-social.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-title-tagline-social.php index 84d888b22d40d..30fa6b5d54475 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-title-tagline-social.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-title-tagline-social.php @@ -1,7 +1,12 @@ __( 'Footer with title, tagline, and social links on a dark background', 'twentytwentytwo' ), 'categories' => array( 'footer' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-dark.php index 3255e9d7067aa..42a9072fa5ea7 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-dark.php @@ -1,7 +1,12 @@ __( 'Divider with image and color (dark)', 'twentytwentytwo' ), 'categories' => array( 'featured' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-light.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-light.php index a29b8252d7be1..a7d18dd55fc19 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-light.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-divider-light.php @@ -1,7 +1,12 @@ __( 'Divider with image and color (light)', 'twentytwentytwo' ), 'categories' => array( 'featured' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-featured-posts.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-featured-posts.php index 55cbdfd92d87b..711b532dbaede 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-featured-posts.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-featured-posts.php @@ -1,7 +1,12 @@ __( 'Featured posts', 'twentytwentytwo' ), 'categories' => array( 'featured', 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-image-with-caption.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-image-with-caption.php index 0870da3951855..b681930180589 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-image-with-caption.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-image-with-caption.php @@ -1,7 +1,12 @@ __( 'Image with caption', 'twentytwentytwo' ), 'categories' => array( 'featured', 'columns', 'gallery' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-large-list-names.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-large-list-names.php index d7bd8168fa6a8..13db435ff9674 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-large-list-names.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-large-list-names.php @@ -1,7 +1,12 @@ __( 'Large list of names', 'twentytwentytwo' ), 'categories' => array( 'featured', 'text' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-layered-images-with-duotone.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-layered-images-with-duotone.php index 629a0a2a12a7f..8a865b29e2fda 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-layered-images-with-duotone.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-layered-images-with-duotone.php @@ -1,7 +1,12 @@ __( 'Layered images with duotone', 'twentytwentytwo' ), 'categories' => array( 'featured', 'gallery' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-list-events.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-list-events.php index af680dc2cdf4b..b2c7317e8bdcf 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-list-events.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-list-events.php @@ -1,7 +1,12 @@ __( 'List of events', 'twentytwentytwo' ), 'categories' => array( 'featured', 'text' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-pricing-table.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-pricing-table.php index b385eddf25f23..21ad117669de0 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-pricing-table.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-pricing-table.php @@ -1,7 +1,12 @@ __( 'Pricing table', 'twentytwentytwo' ), 'categories' => array( 'featured', 'columns', 'buttons' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-subscribe.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-subscribe.php index 34137cd20a8d8..bd7194f464ad3 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-subscribe.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-subscribe.php @@ -1,7 +1,12 @@ __( 'Subscribe callout', 'twentytwentytwo' ), 'categories' => array( 'featured', 'buttons' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-two-images-text.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-two-images-text.php index 5534b6ffba701..7390b16fd7ce5 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-two-images-text.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-two-images-text.php @@ -1,7 +1,12 @@ __( 'Two images with text', 'twentytwentytwo' ), 'categories' => array( 'featured', 'columns', 'gallery' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-header-details.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-header-details.php index 3b15a5206616e..21d96e0125664 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-header-details.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-header-details.php @@ -1,7 +1,12 @@ __( 'Video with header and details', 'twentytwentytwo' ), 'categories' => array( 'featured', 'columns' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-trailer.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-trailer.php index 22ed24860b6ad..6cb15b5c5d5c5 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-trailer.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-video-trailer.php @@ -1,7 +1,12 @@ __( 'Video trailer', 'twentytwentytwo' ), 'categories' => array( 'featured', 'columns' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-wide-image-intro-buttons.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-wide-image-intro-buttons.php index 373b0f48bb1cc..4bb7be79b19bb 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/general-wide-image-intro-buttons.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/general-wide-image-intro-buttons.php @@ -1,7 +1,12 @@ __( 'Wide image with introduction and buttons', 'twentytwentytwo' ), 'categories' => array( 'featured', 'columns' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo-black-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo-black-background.php index b10ed5b9b6350..14c51664f8d34 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo-black-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo-black-background.php @@ -1,7 +1,12 @@ __( 'Header with centered logo and background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo.php index a116c390867ff..6b6d132aa5ae1 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-logo.php @@ -1,7 +1,12 @@ __( 'Header with centered logo', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-title-navigation-social.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-title-navigation-social.php index cb1b310e110d8..3f042864dbdf3 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-title-navigation-social.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-centered-title-navigation-social.php @@ -1,7 +1,12 @@ __( 'Centered header with navigation, social links, and background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-default.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-default.php index ff25793275a3c..1ab974d3ef893 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-default.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-default.php @@ -1,7 +1,12 @@ __( 'Default header', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background-overlay.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background-overlay.php index 55422aa41bf31..aa03e9922ca56 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background-overlay.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background-overlay.php @@ -1,7 +1,12 @@ __( 'Header with image background and overlay', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background.php index 4afd36c551ace..fcbb3c4e4b923 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-image-background.php @@ -1,7 +1,12 @@ __( 'Header with image background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-large-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-large-dark.php index 5e4fea69ed5d4..dec8d972eef10 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-large-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-large-dark.php @@ -1,7 +1,12 @@ __( 'Large header with dark background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-gray-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-gray-background.php index 3ddea755f02c2..ec71a58392491 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-gray-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-gray-background.php @@ -1,7 +1,12 @@ __( 'Logo and navigation header with background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-offset-tagline.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-offset-tagline.php index 299586f0ece4f..c9e539e0b4950 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-offset-tagline.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-offset-tagline.php @@ -1,7 +1,12 @@ __( 'Logo, navigation, and offset tagline Header', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-social-black-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-social-black-background.php index c9b0f886d1dda..1fcd253ae1c7e 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-social-black-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-logo-navigation-social-black-background.php @@ -1,7 +1,12 @@ __( 'Logo, navigation, and social links header with background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-small-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-small-dark.php index 832f414220921..6db5cef7eb7f8 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-small-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-small-dark.php @@ -1,7 +1,12 @@ __( 'Small header with dark background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-stacked.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-stacked.php index bd36bbf4b9fad..3b8c7a48133b5 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-stacked.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-stacked.php @@ -1,7 +1,12 @@ __( 'Logo and navigation header', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-green-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-green-background.php index 468a696dd709c..5b1a7507dd2f2 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-green-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-green-background.php @@ -1,7 +1,12 @@ __( 'Text-only header with background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-salmon-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-salmon-background.php index 4a4913ec472cf..5cdc16e7cd4ad 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-salmon-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-salmon-background.php @@ -1,7 +1,12 @@ __( 'Text-only header with background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-with-tagline-black-background.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-with-tagline-black-background.php index d529fe851dcff..f73c60b69d8b3 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-with-tagline-black-background.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-text-only-with-tagline-black-background.php @@ -1,7 +1,12 @@ __( 'Text-only header with tagline and background', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-and-button.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-and-button.php index 5c780697dabe5..ccb27a87cb64f 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-and-button.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-and-button.php @@ -1,7 +1,12 @@ __( 'Title and button header', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-navigation-social.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-navigation-social.php index 384cda5368337..cf74bfd2540d5 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-navigation-social.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-title-navigation-social.php @@ -1,7 +1,12 @@ __( 'Title, navigation, and social links header', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-with-tagline.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-with-tagline.php index 40e633a2682a6..477a138473928 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/header-with-tagline.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/header-with-tagline.php @@ -1,7 +1,12 @@ __( 'Header with tagline', 'twentytwentytwo' ), 'categories' => array( 'header' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-404.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-404.php index 9cfd50d56e0c1..959ae2bb8ab5d 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-404.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-404.php @@ -1,7 +1,12 @@ __( '404 content', 'twentytwentytwo' ), 'inserter' => false, diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-bird.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-bird.php index cfc9db579450a..6da806d3996b0 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-bird.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-bird.php @@ -4,7 +4,12 @@ * * This pattern is used only to reference a dynamic image URL. * It does not appear in the inserter. + * + * @package WordPress + * @subpackage Twenty_Twenty_Two + * @since Twenty Twenty-Two 1.0 */ + return array( 'title' => __( 'Heading and bird image', 'twentytwentytwo' ), 'inserter' => false, diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-heading-and-bird.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-heading-and-bird.php index d3f1788ac56d4..d7e2ec77c29b8 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-heading-and-bird.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/hidden-heading-and-bird.php @@ -5,7 +5,12 @@ * This pattern is used only for translation * and to reference a dynamic image URL. It does * not appear in the inserter. + * + * @package WordPress + * @subpackage Twenty_Twenty_Two + * @since Twenty Twenty-Two 1.0 */ + return array( 'title' => __( 'Heading and bird image', 'twentytwentytwo' ), 'inserter' => false, diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-large-image-and-buttons.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-large-image-and-buttons.php index 52dbd0e2eb895..e1aaa1c6d3911 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-large-image-and-buttons.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-large-image-and-buttons.php @@ -1,7 +1,12 @@ __( 'About page with large image and buttons', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages', 'buttons' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links-dark.php index 943524f49db49..7c1a8cab38a0f 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links-dark.php @@ -1,7 +1,12 @@ __( 'About page links (dark)', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages', 'buttons' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links.php index 3cf27173db9cd..841d872ee7f04 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-links.php @@ -1,7 +1,12 @@ __( 'About page links', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages', 'buttons' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-left.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-left.php index f5c769a6ca801..0dd5f7fac8eae 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-left.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-left.php @@ -1,7 +1,12 @@ __( 'About page with media on the left', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-right.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-right.php index 8f291150e17a1..7559aded1f7a7 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-right.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-media-right.php @@ -1,7 +1,12 @@ __( 'About page with media on the right', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-simple-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-simple-dark.php index fe0715965962b..50ede062d8c0a 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-simple-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-simple-dark.php @@ -1,7 +1,12 @@ __( 'Simple dark about page', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-solid-color.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-solid-color.php index 6c07725dbaf7c..983a743919c78 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-solid-color.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-about-solid-color.php @@ -1,7 +1,12 @@ __( 'About page on solid color background', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-and-text.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-and-text.php index 20e08e01ff03c..4b35a161487ab 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-and-text.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-and-text.php @@ -1,7 +1,12 @@ __( 'Page layout with image and text', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-text-and-video.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-text-and-video.php index 0ee87f11ff8bc..c2beb20df437f 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-text-and-video.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-image-text-and-video.php @@ -1,7 +1,12 @@ __( 'Page layout with image, text and video', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-two-columns.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-two-columns.php index b24c9c57dc0d6..e32ced62f584e 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-two-columns.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-layout-two-columns.php @@ -1,7 +1,12 @@ __( 'Page layout with two columns', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts-right.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts-right.php index 070aef04b8622..afa82baad3889 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts-right.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts-right.php @@ -1,7 +1,12 @@ __( 'Blog posts with right sidebar', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts.php index e535a81a76a0b..7107b28a4a120 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-blog-posts.php @@ -1,7 +1,12 @@ __( 'Blog posts with left sidebar', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-grid-posts.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-grid-posts.php index b4aa6a560a0a6..4bd63ffef9ba8 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-grid-posts.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-grid-posts.php @@ -1,7 +1,12 @@ __( 'Grid of posts with left sidebar', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-poster.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-poster.php index 9cbcef2a7a97e..035c9c8104717 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-poster.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/page-sidebar-poster.php @@ -1,7 +1,12 @@ __( 'Poster with right sidebar', 'twentytwentytwo' ), 'categories' => array( 'twentytwentytwo_pages' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-default.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-default.php index 7cebaccf75f5d..ed41f2f2c2807 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-default.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-default.php @@ -1,7 +1,12 @@ __( 'Default posts', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-grid.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-grid.php index f695eba354047..c1eeb9e2dadef 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-grid.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-grid.php @@ -1,7 +1,12 @@ __( 'Grid of posts', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-image-grid.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-image-grid.php index e5672e3c1cfe9..4c0b0e26049ae 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-image-grid.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-image-grid.php @@ -1,7 +1,12 @@ __( 'Grid of image posts', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-irregular-grid.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-irregular-grid.php index c5da08ab749b6..ca67baa7d6097 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-irregular-grid.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-irregular-grid.php @@ -1,7 +1,12 @@ __( 'Irregular grid of posts', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-large-titles.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-large-titles.php index 6ff8afadfe15d..2732a9766fbd1 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-large-titles.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-large-titles.php @@ -1,7 +1,12 @@ __( 'Large post titles', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-simple-blog.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-simple-blog.php index 4b089846dd292..4921ecba65f48 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-simple-blog.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-simple-blog.php @@ -1,7 +1,12 @@ __( 'Simple blog posts', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-text-grid.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-text-grid.php index a8f84d3cf2a91..b1fdab67b0003 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/query-text-grid.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/query-text-grid.php @@ -1,7 +1,12 @@ __( 'Text-based grid of posts', 'twentytwentytwo' ), 'categories' => array( 'query' ), diff --git a/src/wp-includes/PHPMailer/PHPMailer.php b/src/wp-includes/PHPMailer/PHPMailer.php index 2bb3578c7e0d9..4900cbc43afef 100644 --- a/src/wp-includes/PHPMailer/PHPMailer.php +++ b/src/wp-includes/PHPMailer/PHPMailer.php @@ -59,6 +59,7 @@ class PHPMailer const ICAL_METHOD_REFRESH = 'REFRESH'; const ICAL_METHOD_COUNTER = 'COUNTER'; const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; + const RFC822_DATE_FORMAT = 'D, j M Y H:i:s O'; /** * Email priority. @@ -77,7 +78,7 @@ class PHPMailer public $CharSet = self::CHARSET_ISO88591; /** - * The MIME Content-type of the message. + * The MIME Content-Type of the message. * * @var string */ @@ -159,7 +160,7 @@ class PHPMailer public $Ical = ''; /** - * Value-array of "method" in Contenttype header "text/calendar" + * Value-array of "method" in Content-Type header "text/calendar" * * @var string[] */ @@ -768,7 +769,7 @@ class PHPMailer * * @var string */ - const VERSION = '7.0.2'; + const VERSION = '7.1.1'; /** * Error severity: message only, continue processing. @@ -1283,26 +1284,27 @@ protected function addAnAddress($kind, $address, $name = '') /** * Parse and validate a string containing one or more RFC822-style comma-separated email addresses * of the form "display name
" into an array of name/address pairs. - * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available and + * the deprecated $useimap argument is truthy. * Note that quotes in the name part are removed. * * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation * * @param string $addrstr The address list string - * @param null $useimap Unused. Argument has been deprecated in PHPMailer 6.11.0. - * Previously this argument determined whether to use - * the IMAP extension to parse the list and accepted a boolean value. + * @param bool|null $useimap Deprecated in PHPMailer 6.11.0. + * Truthy values request the deprecated IMAP parser + * and trigger a deprecation warning. * @param string $charset The charset to use when decoding the address list string. * * @return array */ public static function parseAddresses($addrstr, $useimap = null, $charset = self::CHARSET_ISO88591) { - if ($useimap !== null) { + if ($useimap == true) { trigger_error(self::lang('deprecated_argument') . '$useimap', E_USER_DEPRECATED); } $addresses = []; - if (function_exists('imap_rfc822_parse_adrlist')) { + if ($useimap == true && function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.imap_rfc822_parse_adrlistRemoved -- wrapped in function_exists() $list = imap_rfc822_parse_adrlist($addrstr, ''); @@ -1779,6 +1781,8 @@ public function preSend() //Trim subject consistently $this->Subject = trim($this->Subject); + + //Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) $this->MIMEHeader = ''; $this->MIMEBody = $this->createBody(); @@ -1853,7 +1857,7 @@ public function postSend() return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: $sendMethod = $this->Mailer . 'Send'; - if (method_exists($this, $sendMethod)) { + if (!empty($this->Mailer) && method_exists($this, $sendMethod)) { return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); } @@ -1911,7 +1915,7 @@ protected function sendmailSend($header, $body) // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. // Also don't add the -f automatically unless it has been set either via Sender - // or sendmail_path. Otherwise it can introduce new problems. + // or sendmail_path. Otherwise, it can introduce new problems. // @see http://github.com/PHPMailer/PHPMailer/issues/2298 if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { $sendmailArgs[] = '-f' . $this->Sender; @@ -2510,7 +2514,7 @@ public static function setLanguage($langcode = 'en', $lang_path = '') 'authenticate' => 'SMTP Error: Could not authenticate.', 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . - ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + ' your php.ini, switch to macOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', 'empty_message' => 'Message body empty', @@ -2847,7 +2851,10 @@ public function createHeader() { $result = ''; - $result .= $this->headerLine('Date', '' === $this->MessageDate ? self::rfcDate() : $this->MessageDate); + $result .= $this->headerLine( + 'Date', + self::sanitiseDate($this->MessageDate) + ); //The To header is created automatically by mail(), so needs to be omitted here if ('mail' !== $this->Mailer) { @@ -2916,7 +2923,7 @@ public function createHeader() ); } elseif (is_string($this->XMailer) && trim($this->XMailer) !== '') { //Some string - $result .= $this->headerLine('X-Mailer', trim($this->XMailer)); + $result .= $this->headerLine('X-Mailer', $this->secureHeader(trim($this->XMailer))); } //Other values result in no X-Mailer header if ('' !== $this->ConfirmReadingTo) { @@ -2966,13 +2973,20 @@ public function getMailMIME() break; default: //Catches case 'plain': and case '': - $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + $result .= $this->textLine( + 'Content-Type: ' . + $this->secureHeader($this->ContentType) . + '; charset=' . $this->secureHeader($this->CharSet) + ); $ismultipart = false; break; } + if (!$this->validateEncoding($this->Encoding)) { + throw new Exception(self::lang('encoding') . $this->Encoding); + } //RFC1341 part 5 says 7bit is assumed if not specified if (static::ENCODING_7BIT !== $this->Encoding) { - //RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE + //RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit, or binary CTE if ($ismultipart) { if (static::ENCODING_8BIT === $this->Encoding) { $result .= $this->headerLine('Content-Transfer-Encoding', static::ENCODING_8BIT); @@ -3047,6 +3061,9 @@ public function createBody() $this->setWordWrap(); + if (!$this->validateEncoding($this->Encoding)) { + throw new Exception(self::lang('encoding') . $this->Encoding); + } $bodyEncoding = $this->Encoding; $bodyCharSet = $this->CharSet; //Can we do a 7-bit downgrade? @@ -4166,7 +4183,7 @@ public function addStringEmbeddedImage( protected function validateEncoding($encoding) { return in_array( - $encoding, + strtolower($encoding), [ self::ENCODING_7BIT, self::ENCODING_QUOTED_PRINTABLE, @@ -4426,7 +4443,7 @@ protected function setError($msg) } /** - * Return an RFC 822 formatted date. + * Return the current date and time as an RFC 822 formatted date. * * @return string */ @@ -4436,7 +4453,51 @@ public static function rfcDate() //Will default to UTC if it's not set properly in php.ini date_default_timezone_set(@date_default_timezone_get()); - return date('D, j M Y H:i:s O'); + return date(self::RFC822_DATE_FORMAT); + } + + /** + * Normalise a user-supplied date into a correctly-formatted RFC 5322 date value + * string suitable for use in the Date header. + * + * Accepts: + * - A {@see \DateTime} (or \DateTimeImmutable) object + * - Any date/time string understood by PHP's DateTime constructor (RFC 5322, ISO 8601, + * Unix timestamp with leading "@", natural-language strings, etc.) + * + * Dates in the future are not permitted for email headers; if the parsed date is later + * than "now" the method falls back to the current time via {@see self::rfcDate()}. + * An empty value, a non-string/non-DateTime argument, or any value that cannot be + * parsed will likewise fall back to {@see self::rfcDate()}. + * + * @param \DateTime|\DateTimeImmutable|string $date The date to normalise + * + * @return string An RFC 5322-formatted date string + */ + private static function sanitiseDate($date) + { + try { + //Ensure the default timezone is set properly + date_default_timezone_set(@date_default_timezone_get()); + + if ($date instanceof \DateTimeInterface) { + $dt = $date; + } elseif (is_string($date) && $date !== '') { + $dt = new \DateTime($date); + } else { + //Empty string, null, or any unsupported type + return self::rfcDate(); + } + + //Reject future dates — they are invalid for outgoing message headers + if ($dt->getTimestamp() > time()) { + return self::rfcDate(); + } + + return $dt->format(self::RFC822_DATE_FORMAT); + } catch (\Exception $e) { + return self::rfcDate(); + } } /** diff --git a/src/wp-includes/PHPMailer/POP3.php b/src/wp-includes/PHPMailer/POP3.php index 186fe9fe47ab7..0ba9678373217 100644 --- a/src/wp-includes/PHPMailer/POP3.php +++ b/src/wp-includes/PHPMailer/POP3.php @@ -47,7 +47,7 @@ class POP3 * @var string * @deprecated This constant will be removed in PHPMailer 8.0. Use `PHPMailer::VERSION` instead. */ - const VERSION = '7.0.2'; + const VERSION = '7.1.1'; /** * Default POP3 port number. @@ -212,9 +212,9 @@ public function authorise($host, $port = false, $timeout = false, $username = '' } else { $this->tval = (int) $timeout; } - $this->do_debug = $debug_level; - $this->username = $username; - $this->password = $password; + $this->do_debug = (int) $debug_level; + $this->username = self::stripControls($username); + $this->password = self::stripControls($password); //Reset the error log $this->errors = []; //Connect @@ -319,7 +319,8 @@ public function login($username = '', $password = '') if (empty($password)) { $password = $this->password; } - + $username = self::stripControls($username); + $password = self::stripControls($password); //Send the Username $this->sendString("USER $username" . static::LE); $pop3_response = $this->getResponse(); @@ -407,7 +408,7 @@ protected function sendString($string) /** * Checks the POP3 server response. - * Looks for for +OK or -ERR. + * Looks for +OK or -ERR. * * @param string $string * @@ -467,4 +468,16 @@ protected function catchWarning($errno, $errstr, $errfile, $errline) "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" ); } + + /** + * Strip all control chars from a string. + * + * @param $string + * + * @return string + */ + protected static function stripControls($string) + { + return preg_replace('/[\x00-\x1F\x7F]/u', '', $string); + } } diff --git a/src/wp-includes/PHPMailer/SMTP.php b/src/wp-includes/PHPMailer/SMTP.php index 559b52c45e8f8..f0957b80a919f 100644 --- a/src/wp-includes/PHPMailer/SMTP.php +++ b/src/wp-includes/PHPMailer/SMTP.php @@ -36,7 +36,7 @@ class SMTP * @var string * @deprecated This constant will be removed in PHPMailer 8.0. Use `PHPMailer::VERSION` instead. */ - const VERSION = '7.0.2'; + const VERSION = '7.1.1'; /** * SMTP line break constant. @@ -1289,7 +1289,7 @@ public function getServerExtList() * 3. EHLO has been sent - * $name == 'HELO'|'EHLO': returns the server name * $name == any other string: if extension $name exists, returns True - * or its options (e.g. AUTH mechanisms supported). Otherwise returns False. + * or its options (e.g. AUTH mechanisms supported). Otherwise, returns False. * * @param string $name Name of SMTP extension or 'HELO'|'EHLO' * diff --git a/src/wp-includes/abilities-api/class-wp-ability.php b/src/wp-includes/abilities-api/class-wp-ability.php index 2127417a887b9..9efefc6713f5a 100644 --- a/src/wp-includes/abilities-api/class-wp-ability.php +++ b/src/wp-includes/abilities-api/class-wp-ability.php @@ -782,6 +782,8 @@ public function execute( $input = null ) { */ do_action( 'wp_ability_invoked', $this->name, $input, $this ); + $pre_execute_sentinel = new WP_Filter_Sentinel(); + /** * Filters whether to short-circuit ability execution. * @@ -804,8 +806,7 @@ public function execute( $input = null ) { * @param mixed $input The raw input passed to `execute()`. * @param WP_Ability $ability The ability instance. */ - $pre_execute_sentinel = new WP_Filter_Sentinel(); - $pre = apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this ); + $pre = apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this ); if ( $pre !== $pre_execute_sentinel ) { return $pre; } diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index 7420056b8553b..6b0ed2811e9d4 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -4,7 +4,7 @@ 'wp-dom-ready', 'wp-i18n' ), - 'version' => '483af07a6016f640f456' + 'version' => '31c6cec5a4ff7aff483d' ), 'annotations.js' => array( 'dependencies' => array( @@ -13,7 +13,7 @@ 'wp-i18n', 'wp-rich-text' ), - 'version' => 'd4fe1eeb787c2fd5ee89' + 'version' => '348a030f1b5717cfaba4' ), 'api-fetch.js' => array( 'dependencies' => array( @@ -21,25 +21,25 @@ 'wp-private-apis', 'wp-url' ), - 'version' => 'b5b51750518787a93005' + 'version' => '6f2a4faeee3c722b1e57' ), 'autop.js' => array( 'dependencies' => array( ), - 'version' => '9d0d0901b46f0a9027c9' + 'version' => '4e10a18cb6f21a043fc0' ), 'base-styles.js' => array( 'dependencies' => array( ), - 'version' => '8ebe97b095beb7e9279b' + 'version' => '67fd7250ac73fa2feba5' ), 'blob.js' => array( 'dependencies' => array( ), - 'version' => '198af75fe06d924090d8' + 'version' => 'c7582a735ddd2edc9731' ), 'block-directory.js' => array( 'dependencies' => array( @@ -66,7 +66,7 @@ 'wp-theme', 'wp-url' ), - 'version' => 'e534a0f04643c4175bf3' + 'version' => '7c679438bdaf9853987a' ), 'block-editor.js' => array( 'dependencies' => array( @@ -104,7 +104,7 @@ 'wp-url', 'wp-warning' ), - 'version' => '77626afea4a1cac03204' + 'version' => '3e3993ced88d35b1fafc' ), 'block-library.js' => array( 'dependencies' => array( @@ -150,19 +150,19 @@ 'import' => 'dynamic' ) ), - 'version' => 'd24e08348f91bcfce1b7' + 'version' => '6569ec7523b3693a2b2e' ), 'block-serialization-default-parser.js' => array( 'dependencies' => array( ), - 'version' => 'bff55bd3f1ce9df0c99c' + 'version' => '4c6f3dd40077f7c17604' ), 'block-serialization-spec-parser.js' => array( 'dependencies' => array( ), - 'version' => '9ebc5e95e1de1cabd1e6' + 'version' => '7b0b496c3d48b1ef3f9e' ), 'blocks.js' => array( 'dependencies' => array( @@ -183,7 +183,7 @@ 'wp-shortcode', 'wp-warning' ), - 'version' => 'dc4bdf700024000fd427' + 'version' => 'c0e57a630a0b6f6c3bb5' ), 'commands.js' => array( 'dependencies' => array( @@ -199,7 +199,7 @@ 'wp-primitives', 'wp-private-apis' ), - 'version' => '148d9b31ef4d2952561e' + 'version' => '1a4910212c7ed2355300' ), 'components.js' => array( 'dependencies' => array( @@ -224,7 +224,7 @@ 'wp-theme', 'wp-warning' ), - 'version' => 'd54375c07776a218ee99' + 'version' => '7937a1d6ffdc16e88517' ), 'compose.js' => array( 'dependencies' => array( @@ -239,7 +239,7 @@ 'wp-private-apis', 'wp-undo-manager' ), - 'version' => '6176e314156a3d1f9501' + 'version' => '0e8bde2a499ea6073b42' ), 'core-commands.js' => array( 'dependencies' => array( @@ -256,7 +256,7 @@ 'wp-router', 'wp-url' ), - 'version' => '8fc41d3503f7892d3ed8' + 'version' => '426a33508599b7f31db3' ), 'core-data.js' => array( 'dependencies' => array( @@ -277,7 +277,7 @@ 'wp-url', 'wp-warning' ), - 'version' => 'c7a571126b75599516cf' + 'version' => 'f0176a9c136b2962fdc4' ), 'customize-widgets.js' => array( 'dependencies' => array( @@ -306,7 +306,13 @@ 'wp-theme', 'wp-widgets' ), - 'version' => 'f28ae391ffd39b8db426' + 'module_dependencies' => array( + array( + 'id' => '@wordpress/route', + 'import' => 'static' + ) + ), + 'version' => 'a73c35651dc8614d5fb3' ), 'data.js' => array( 'dependencies' => array( @@ -319,7 +325,7 @@ 'wp-private-apis', 'wp-redux-routine' ), - 'version' => 'c547bd40753de57cdc64' + 'version' => '14a216e0932d72c22976' ), 'data-controls.js' => array( 'dependencies' => array( @@ -327,32 +333,32 @@ 'wp-data', 'wp-deprecated' ), - 'version' => '730061ade69d7f341014' + 'version' => '7e8f932da184d5537725' ), 'date.js' => array( 'dependencies' => array( 'moment', 'wp-deprecated' ), - 'version' => '2faaf49020b2074de156' + 'version' => '8173fc0fc12b7bb7eaf0' ), 'deprecated.js' => array( 'dependencies' => array( 'wp-hooks' ), - 'version' => '990e85f234fee8f7d446' + 'version' => 'fe587bac92b7d0ef760e' ), 'dom.js' => array( 'dependencies' => array( 'wp-deprecated' ), - 'version' => '22d969bde5c7182cdd2f' + 'version' => 'c95f94cbbc1ac3fde84f' ), 'dom-ready.js' => array( 'dependencies' => array( ), - 'version' => 'a06281ae5cf5500e9317' + 'version' => '3fe927cab37bf38d6a23' ), 'edit-post.js' => array( 'dependencies' => array( @@ -396,7 +402,7 @@ 'import' => 'static' ) ), - 'version' => '4aeb2f3aa372be39adb2' + 'version' => 'e566fa04fc489a642398' ), 'edit-site.js' => array( 'dependencies' => array( @@ -446,7 +452,7 @@ 'import' => 'static' ) ), - 'version' => 'c33d508cfc124b1b3e2d' + 'version' => 'b818e670c0d0297645f2' ), 'edit-widgets.js' => array( 'dependencies' => array( @@ -487,7 +493,7 @@ 'import' => 'static' ) ), - 'version' => 'b6608ebdd73ddae5a250' + 'version' => 'a84bb1dba0b91cf80efa' ), 'editor.js' => array( 'dependencies' => array( @@ -537,7 +543,7 @@ 'import' => 'static' ) ), - 'version' => 'cf691bc72eeac5643913' + 'version' => 'e3c5b4a412541c51a59d' ), 'element.js' => array( 'dependencies' => array( @@ -545,13 +551,13 @@ 'react-dom', 'wp-escape-html' ), - 'version' => 'ce395381f7d64d2a6d71' + 'version' => '4a4370b2b349066fd440' ), 'escape-html.js' => array( 'dependencies' => array( ), - 'version' => '3f093e5cca67aa0f8b56' + 'version' => '87ebe53e97bba59805a5' ), 'format-library.js' => array( 'dependencies' => array( @@ -578,31 +584,31 @@ 'import' => 'dynamic' ) ), - 'version' => 'fc1a40ac6923d97797a4' + 'version' => 'd69ac704b4a81b89c946' ), 'hooks.js' => array( 'dependencies' => array( ), - 'version' => '7496969728ca0f95732d' + 'version' => 'f0f188028580e8dc1255' ), 'html-entities.js' => array( 'dependencies' => array( ), - 'version' => '8c6fa5b869dfeadc4af2' + 'version' => 'a976ff3a0f00bc2999a3' ), 'i18n.js' => array( 'dependencies' => array( 'wp-hooks' ), - 'version' => '125448662852c5e18937' + 'version' => '1dfe7db3940c23ea9216' ), 'is-shallow-equal.js' => array( 'dependencies' => array( ), - 'version' => '5d84b9f3cb50d2ce7d04' + 'version' => '7ad271045c1fe60f5496' ), 'keyboard-shortcuts.js' => array( 'dependencies' => array( @@ -611,13 +617,13 @@ 'wp-element', 'wp-keycodes' ), - 'version' => '0dd268b2132a3f82b1d4' + 'version' => '37da95806f2339bc80d0' ), 'keycodes.js' => array( 'dependencies' => array( 'wp-i18n' ), - 'version' => 'b156d58a707bff518176' + 'version' => 'd0b4204e4bbeb412df6e' ), 'list-reusable-blocks.js' => array( 'dependencies' => array( @@ -629,7 +635,7 @@ 'wp-element', 'wp-i18n' ), - 'version' => 'a44da9be02cdfef6e44d' + 'version' => '68a57d388ce085b9691e' ), 'media-utils.js' => array( 'dependencies' => array( @@ -657,7 +663,7 @@ 'wp-url', 'wp-warning' ), - 'version' => '8addf2ae46aa60243073' + 'version' => 'b8bf604c1cc119e63ee6' ), 'notices.js' => array( 'dependencies' => array( @@ -665,14 +671,14 @@ 'wp-components', 'wp-data' ), - 'version' => '505026883bbd05994872' + 'version' => 'c09a068fdab0eb465e14' ), 'nux.js' => array( 'dependencies' => array( 'wp-data', 'wp-deprecated' ), - 'version' => 'b0afe722eacfd6e9a364' + 'version' => '1a78c05bba2c02820a7e' ), 'patterns.js' => array( 'dependencies' => array( @@ -695,7 +701,7 @@ 'wp-theme', 'wp-url' ), - 'version' => '1d5dc833056614a65601' + 'version' => 'be5af192f57cc14d340f' ), 'plugins.js' => array( 'dependencies' => array( @@ -707,7 +713,7 @@ 'wp-is-shallow-equal', 'wp-primitives' ), - 'version' => '50bcc9bb42e4c0723a8c' + 'version' => '673d1e05ca49004ab160' ), 'preferences.js' => array( 'dependencies' => array( @@ -723,32 +729,32 @@ 'wp-primitives', 'wp-private-apis' ), - 'version' => 'ba5e81b3db928d4649c6' + 'version' => '5a169e3fc0e657f74172' ), 'preferences-persistence.js' => array( 'dependencies' => array( 'wp-api-fetch' ), - 'version' => 'e8033be98338d1861bca' + 'version' => 'a34abbdacd8f50f9acb1' ), 'primitives.js' => array( 'dependencies' => array( 'react-jsx-runtime', 'wp-element' ), - 'version' => 'a5c905ec27bcd76ef287' + 'version' => '44cc5a35c7b9fe07a838' ), 'priority-queue.js' => array( 'dependencies' => array( ), - 'version' => '1f0e89e247bc0bd3f9b9' + 'version' => '6c0aa59b65d55dfd509b' ), 'private-apis.js' => array( 'dependencies' => array( ), - 'version' => 'd253db066c622f144ae7' + 'version' => 'eb85f28c4c729bb4f002' ), 'react-i18n.js' => array( 'dependencies' => array( @@ -756,13 +762,13 @@ 'wp-element', 'wp-i18n' ), - 'version' => '9b74577dbd7e50f6b77b' + 'version' => 'ba2bd3d7a3817f0494af' ), 'redux-routine.js' => array( 'dependencies' => array( ), - 'version' => '64f9f5001aabc046c605' + 'version' => 'acca2b4857d83ad1790e' ), 'reusable-blocks.js' => array( 'dependencies' => array( @@ -779,7 +785,7 @@ 'wp-primitives', 'wp-url' ), - 'version' => '00a57a244d360831336a' + 'version' => '5161508c6662b8490ee8' ), 'rich-text.js' => array( 'dependencies' => array( @@ -794,7 +800,7 @@ 'wp-keycodes', 'wp-private-apis' ), - 'version' => '1c4b61567c93d486f1dc' + 'version' => '3e5852e42cee1c239bae' ), 'router.js' => array( 'dependencies' => array( @@ -804,7 +810,7 @@ 'wp-private-apis', 'wp-url' ), - 'version' => '0249e6724784b1c2583b' + 'version' => 'dda75cd9ff9d7e0eb19f' ), 'server-side-render.js' => array( 'dependencies' => array( @@ -818,19 +824,19 @@ 'wp-i18n', 'wp-url' ), - 'version' => '77621917ec58330ec283' + 'version' => '83e806a0634df6b93530' ), 'shortcode.js' => array( 'dependencies' => array( ), - 'version' => '11742fe18cc215d3d5ab' + 'version' => 'f6273476300cc5fad4cd' ), 'style-engine.js' => array( 'dependencies' => array( ), - 'version' => '50b0461aa90d44c4123b' + 'version' => '914befb08774033e6265' ), 'sync.js' => array( 'dependencies' => array( @@ -838,7 +844,7 @@ 'wp-hooks', 'wp-private-apis' ), - 'version' => '82121af3ec5dd7ba0296' + 'version' => '15f3a34404da1c4bb483' ), 'theme.js' => array( 'dependencies' => array( @@ -848,19 +854,19 @@ 'wp-element', 'wp-private-apis' ), - 'version' => 'f017490f1df372de8462' + 'version' => '48f91740a3d737558e9c' ), 'token-list.js' => array( 'dependencies' => array( ), - 'version' => '16f0aebdd39d87c2a84b' + 'version' => 'e86ab419d8302d57822c' ), 'undo-manager.js' => array( 'dependencies' => array( 'wp-is-shallow-equal' ), - 'version' => '27bb0ae036a2c9d4a1b5' + 'version' => '4554fce6276d8910a4ae' ), 'upload-media.js' => array( 'dependencies' => array( @@ -883,13 +889,13 @@ 'import' => 'dynamic' ) ), - 'version' => 'a16fcecc49ab54f868c2' + 'version' => 'f7174b0617bcd68e57c3' ), 'url.js' => array( 'dependencies' => array( ), - 'version' => '9dd5f16a5ce37bf4ba2c' + 'version' => '7b0de086d4ae11d55704' ), 'viewport.js' => array( 'dependencies' => array( @@ -897,13 +903,13 @@ 'wp-data', 'wp-element' ), - 'version' => '83b39beb77dcc56c4d26' + 'version' => 'a56e3489ed4faeac7720' ), 'warning.js' => array( 'dependencies' => array( ), - 'version' => '36fdbdc984d93aee8a97' + 'version' => 'a0978839debc564a6608' ), 'widgets.js' => array( 'dependencies' => array( @@ -920,12 +926,12 @@ 'wp-notices', 'wp-primitives' ), - 'version' => '2a2e101698084ec9e2c3' + 'version' => '087235ca647aa1a33227' ), 'wordcount.js' => array( 'dependencies' => array( ), - 'version' => 'f53ba7c5b085d7a53357' + 'version' => 'f0b1f0e977b2ff6e0132' ) ); \ No newline at end of file diff --git a/src/wp-includes/assets/script-modules-packages.php b/src/wp-includes/assets/script-modules-packages.php index 90e2c2a1f32fb..1213445dd9d48 100644 --- a/src/wp-includes/assets/script-modules-packages.php +++ b/src/wp-includes/assets/script-modules-packages.php @@ -76,7 +76,7 @@ 'import' => 'static' ) ), - 'version' => '96a846e1d7b789c39ab9' + 'version' => '1bf28ded04f9f188bdcb' ), 'block-library/playlist/view.js' => array( 'dependencies' => array( @@ -128,7 +128,7 @@ 'import' => 'static' ) ), - 'version' => '581cf5c9168a7665f2dd' + 'version' => 'cc1a34b1bee3c2e17bc4' ), 'boot/index.js' => array( 'dependencies' => array( @@ -164,7 +164,7 @@ 'import' => 'static' ) ), - 'version' => '4b0281842169241e3d0e' + 'version' => 'e6158521d3acdf579ed2' ), 'connectors/index.js' => array( 'dependencies' => array( @@ -211,7 +211,7 @@ 'import' => 'static' ) ), - 'version' => '2fe152df83cad8d59403' + 'version' => 'b9a1df775b12692a9ffb' ), 'core-abilities/index.js' => array( 'dependencies' => array( @@ -247,7 +247,7 @@ 'import' => 'static' ) ), - 'version' => '35485e5cfea4689dcaa1' + 'version' => 'e2f82d3d1c3179d25626' ), 'interactivity/index.js' => array( 'dependencies' => array( @@ -315,7 +315,7 @@ 'wp-private-apis', 'wp-style-engine' ), - 'version' => '9d008e280440935933bc' + 'version' => '0e40b71e65fda1397a4b' ), 'route/index.js' => array( 'dependencies' => array( diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php index 896f6d25543cf..3be4f07b055ea 100644 --- a/src/wp-includes/block-supports/layout.php +++ b/src/wp-includes/block-supports/layout.php @@ -955,9 +955,24 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false function wp_render_layout_support_flag( $block_content, $block ) { static $global_styles = null; - $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); - $block_supports_layout = block_has_support( $block_type, 'layout', false ) || block_has_support( $block_type, '__experimentalLayout', false ); - $style_attr = $block['attrs']['style'] ?? array(); + $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); + $block_supports_layout = block_has_support( $block_type, 'layout', false ) || block_has_support( $block_type, '__experimentalLayout', false ); + $style_attr = $block['attrs']['style'] ?? array(); + /* + * A block with no layout support and no style attribute at all cannot + * produce layout output, so return before resolving global settings. + * + * Resolving settings is not read-only: on a cold cache it queries the + * user's `wp_global_styles` post, which fires `the_posts`. A callback on + * that hook that renders blocks re-enters this filter, and the content it + * renders at that point is the global styles post itself, which parses to a + * single block with no name and no attributes. Without this return that + * block resolves settings again and the recursion has no base case. + */ + if ( ! $block_supports_layout && empty( $style_attr ) ) { + return $block_content; + } + $global_settings = wp_get_global_settings(); $viewport_settings = $global_settings['viewport'] ?? null; $responsive_media_queries = WP_Theme_JSON::get_viewport_media_queries( $viewport_settings ); diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 41e11f4a2a75f..a0360ffdc8bf8 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -43,6 +43,11 @@ function remove_block_asset_path_prefix( $asset_handle_or_path ) { * @param int $index Optional. Index of the asset when multiple items passed. * Default 0. * @return string Generated asset name for the block's field. + * + * @phpstan-param non-falsy-string $block_name + * @phpstan-param 'editorScript'|'editorStyle'|'script'|'style'|'viewScript'|'viewScriptModule'|'viewStyle' $field_name + * @phpstan-param int<0, max> $index + * @phpstan-return non-falsy-string */ function generate_block_asset_handle( $block_name, $field_name, $index = 0 ) { if ( str_starts_with( $block_name, 'core/' ) ) { @@ -86,6 +91,8 @@ function generate_block_asset_handle( $block_name, $field_name, $index = 0 ) { * * @param string $path A normalized path to a block asset. * @return string|false The URL to the block asset or false on failure. + * + * @phpstan-return non-falsy-string|false */ function get_block_asset_url( $path ) { if ( empty( $path ) ) { @@ -102,6 +109,7 @@ function get_block_asset_url( $path ) { return includes_url( str_replace( $wpinc_path_norm, '', $path ) ); } + /** @var array $template_paths_norm */ static $template_paths_norm = array(); $template = get_template(); @@ -128,11 +136,12 @@ function get_block_asset_url( $path ) { } /** - * Finds a script module ID for the selected block metadata field. It detects - * when a path to file was provided and optionally finds a corresponding asset - * file with details necessary to register the script module under with an - * automatically generated module ID. It returns unprocessed script module - * ID otherwise. + * Finds a script module ID for the selected block metadata field. + * + * Detects when a path to a file was provided and optionally finds a + * corresponding asset file with details necessary to register the script + * module with an automatically generated module ID. It returns the + * unprocessed script module ID otherwise. * * @since 6.5.0 * @@ -141,6 +150,21 @@ function get_block_asset_url( $path ) { * @param int $index Optional. Index of the script module ID to register when multiple * items passed. Default 0. * @return string|false Script module ID or false on failure. + * + * @phpstan-param array{ + * name?: non-falsy-string, + * file: non-falsy-string|null, + * version?: string, + * supports?: array{ + * interactivity?: bool|array{interactive?: bool, clientNavigation?: bool, ...}, + * ... + * }, + * viewScriptModule?: string|list, + * ... + * } $metadata + * @phpstan-param 'viewScriptModule' $field_name + * @phpstan-param int<0, max> $index + * @phpstan-return non-falsy-string|false */ function register_block_script_module_id( $metadata, $field_name, $index = 0 ) { if ( empty( $metadata[ $field_name ] ) ) { @@ -170,6 +194,7 @@ function register_block_script_module_id( $metadata, $field_name, $index = 0 ) { $module_path_norm = wp_normalize_path( realpath( $path . '/' . $module_path ) ); $module_uri = get_block_asset_url( $module_path_norm ); + /** @var array{ dependencies?: list, version?: string|false|null, ... } $module_asset */ $module_asset = ! empty( $module_asset_path ) ? require $module_asset_path : array(); $module_dependencies = $module_asset['dependencies'] ?? array(); $block_version = $metadata['version'] ?? false; @@ -206,10 +231,13 @@ function register_block_script_module_id( $metadata, $field_name, $index = 0 ) { } /** - * Finds a script handle for the selected block metadata field. It detects - * when a path to file was provided and optionally finds a corresponding asset - * file with details necessary to register the script under automatically - * generated handle name. It returns unprocessed script handle otherwise. + * Finds a script handle for the selected block metadata field. + * + * Detects when a path to a file was provided and optionally finds a + * corresponding asset file with details necessary to register the script. The + * handle is taken from the asset file when it provides one, and is otherwise + * generated automatically. It returns the unprocessed script handle when a + * handle rather than a path was given. * * @since 5.5.0 * @since 6.1.0 Added `$index` parameter. @@ -221,6 +249,20 @@ function register_block_script_module_id( $metadata, $field_name, $index = 0 ) { * Default 0. * @return string|false Script handle provided directly or created through * script's registration, or false on failure. + * + * @phpstan-param array{ + * name?: non-falsy-string, + * file: non-falsy-string|null, + * version?: string, + * textdomain?: string, + * editorScript?: string|list, + * script?: string|list, + * viewScript?: string|list, + * ... + * } $metadata + * @phpstan-param 'editorScript'|'script'|'viewScript' $field_name + * @phpstan-param int<0, max> $index + * @phpstan-return non-falsy-string|false */ function register_block_script_handle( $metadata, $field_name, $index = 0 ) { if ( empty( $metadata[ $field_name ] ) ) { @@ -247,6 +289,7 @@ function register_block_script_handle( $metadata, $field_name, $index = 0 ) { ); // Asset file for blocks is optional. See https://core.trac.wordpress.org/ticket/60460. + /** @var array{ handle?: non-falsy-string, dependencies?: list, version?: string|false|null, ... } $script_asset */ $script_asset = ! empty( $script_asset_path ) ? require $script_asset_path : array(); $script_handle = $script_asset['handle'] ?? generate_block_asset_handle( $metadata['name'], $field_name, $index ); @@ -283,9 +326,13 @@ function register_block_script_handle( $metadata, $field_name, $index = 0 ) { } /** - * Finds a style handle for the block metadata field. It detects when a path - * to file was provided and registers the style under automatically - * generated handle name. It returns unprocessed style handle otherwise. + * Finds a style handle for the block metadata field. + * + * Detects when a path to a file was provided and registers the style under an + * automatically generated handle name. It returns the unprocessed style handle + * otherwise, except for the first style of a core block, which is instead + * registered from the block's own stylesheet when separate core block assets + * are loaded. Core blocks accept only handles, not paths. * * @since 5.5.0 * @since 6.1.0 Added `$index` parameter. @@ -296,6 +343,19 @@ function register_block_script_handle( $metadata, $field_name, $index = 0 ) { * Default 0. * @return string|false Style handle provided directly or created through * style's registration, or false on failure. + * + * @phpstan-param array{ + * name?: non-falsy-string, + * file: non-falsy-string|null, + * version?: string, + * editorStyle?: string|list, + * style?: string|list, + * viewStyle?: string|list, + * ... + * } $metadata + * @phpstan-param 'editorStyle'|'style'|'viewStyle' $field_name + * @phpstan-param int<0, max> $index + * @phpstan-return non-falsy-string|false */ function register_block_style_handle( $metadata, $field_name, $index = 0 ) { if ( empty( $metadata[ $field_name ] ) ) { @@ -2778,7 +2838,7 @@ function build_query_vars_from_query_block( $block, $page ) { if ( 'only' === $block->context['query']['sticky'] ) { /* * Passing an empty array to post__in will return have_posts() as true (and all posts will be returned). - * Logic should be used before hand to determine if WP_Query should be used in the event that the array + * Logic should be used beforehand to determine if WP_Query should be used in the event that the array * being passed to post__in is empty. * * @see https://core.trac.wordpress.org/ticket/28099 diff --git a/src/wp-includes/blocks/blocks-json.php b/src/wp-includes/blocks/blocks-json.php index 422eca780bfd3..4e3a2878536a4 100644 --- a/src/wp-includes/blocks/blocks-json.php +++ b/src/wp-includes/blocks/blocks-json.php @@ -4812,7 +4812,6 @@ 'full' ), 'splitting' => true, - 'editableRoot' => true, 'anchor' => true, 'className' => false, '__experimentalBorder' => array( @@ -4976,6 +4975,7 @@ 'supports' => array( 'anchor' => true, 'align' => true, + '__experimentalExposeControlsToChildren' => true, 'color' => array( 'gradients' => true, 'link' => true, diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index 802909a39e648..fcb8f5f97af8e 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -1250,7 +1250,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut ) ) ) { $tags->set_attribute( 'data-wp-on--click', 'actions.toggleMenuOnClick' ); - $tags->set_attribute( 'data-wp-bind--aria-expanded', 'state.isMenuOpen' ); + $tags->set_attribute( 'data-wp-bind--aria-expanded', 'state.isSubmenuOpen' ); // The `aria-expanded` attribute for SSR is already added in the submenu block. } // Add directives to the submenu. diff --git a/src/wp-includes/blocks/paragraph/block.json b/src/wp-includes/blocks/paragraph/block.json index 1b6ad873c6b66..556c2870557f7 100644 --- a/src/wp-includes/blocks/paragraph/block.json +++ b/src/wp-includes/blocks/paragraph/block.json @@ -29,7 +29,6 @@ "supports": { "align": [ "wide", "full" ], "splitting": true, - "editableRoot": true, "anchor": true, "className": false, "__experimentalBorder": { diff --git a/src/wp-includes/blocks/playlist/block.json b/src/wp-includes/blocks/playlist/block.json index 796b3d580e6a6..566174e50d3c9 100644 --- a/src/wp-includes/blocks/playlist/block.json +++ b/src/wp-includes/blocks/playlist/block.json @@ -69,6 +69,7 @@ "supports": { "anchor": true, "align": true, + "__experimentalExposeControlsToChildren": true, "color": { "gradients": true, "link": true, diff --git a/src/wp-includes/build/pages/font-library/page-wp-admin.php b/src/wp-includes/build/pages/font-library/page-wp-admin.php index 0ec524abcf6dd..bbca5fa7964fb 100644 --- a/src/wp-includes/build/pages/font-library/page-wp-admin.php +++ b/src/wp-includes/build/pages/font-library/page-wp-admin.php @@ -87,9 +87,10 @@ function wp_get_font_library_wp_admin_menu_items() { */ function wp_font_library_wp_admin_preload_data() { // Define paths to preload - same for all pages - // Please also change packages/core-data/src/entities.js when changing this. + // This must exactly match the _fields list in packages/core-data/src/entities.js, + // same fields in the same order, or the preload is never consumed. $preload_paths = array( - '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', array( '/wp/v2/settings', 'OPTIONS' ), ); @@ -269,23 +270,23 @@ function wp_font_library_wp_admin_render_page() { #wpwrap { overflow-y: auto; } - body { + body.js { background: #fff; } /* Reset wp-admin padding */ - #wpcontent { + body.js #wpcontent { padding-inline-start: 0; } - #wpbody-content { + body.js #wpbody-content { padding-bottom: 0; } /* Hide legacy admin elements */ - #wpbody-content > div:not(.boot-layout-container):not(#screen-meta) { + body.js #wpbody-content > div:not(.boot-layout-container):not(#screen-meta) { display: none; } - #wpfooter { + body.js #wpfooter { display: none; } diff --git a/src/wp-includes/build/pages/font-library/page.php b/src/wp-includes/build/pages/font-library/page.php index dae179c60987c..0aaec2d145acf 100644 --- a/src/wp-includes/build/pages/font-library/page.php +++ b/src/wp-includes/build/pages/font-library/page.php @@ -88,9 +88,10 @@ function wp_get_font_library_menu_items() { */ function wp_font_library_preload_data() { // Define paths to preload - same for all pages - // Please also change packages/core-data/src/entities.js when changing this. + // This must exactly match the _fields list in packages/core-data/src/entities.js, + // same fields in the same order, or the preload is never consumed. $preload_paths = array( - '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', array( '/wp/v2/settings', 'OPTIONS' ), ); diff --git a/src/wp-includes/build/pages/options-connectors/page-wp-admin.php b/src/wp-includes/build/pages/options-connectors/page-wp-admin.php index e32cf496549a8..3b11db178f809 100644 --- a/src/wp-includes/build/pages/options-connectors/page-wp-admin.php +++ b/src/wp-includes/build/pages/options-connectors/page-wp-admin.php @@ -87,9 +87,10 @@ function wp_get_options_connectors_wp_admin_menu_items() { */ function wp_options_connectors_wp_admin_preload_data() { // Define paths to preload - same for all pages - // Please also change packages/core-data/src/entities.js when changing this. + // This must exactly match the _fields list in packages/core-data/src/entities.js, + // same fields in the same order, or the preload is never consumed. $preload_paths = array( - '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', array( '/wp/v2/settings', 'OPTIONS' ), ); @@ -269,23 +270,23 @@ function wp_options_connectors_wp_admin_render_page() { #wpwrap { overflow-y: auto; } - body { + body.js { background: #fff; } /* Reset wp-admin padding */ - #wpcontent { + body.js #wpcontent { padding-inline-start: 0; } - #wpbody-content { + body.js #wpbody-content { padding-bottom: 0; } /* Hide legacy admin elements */ - #wpbody-content > div:not(.boot-layout-container):not(#screen-meta) { + body.js #wpbody-content > div:not(.boot-layout-container):not(#screen-meta) { display: none; } - #wpfooter { + body.js #wpfooter { display: none; } diff --git a/src/wp-includes/build/pages/options-connectors/page.php b/src/wp-includes/build/pages/options-connectors/page.php index 1ece3b8003e97..7695969c7c060 100644 --- a/src/wp-includes/build/pages/options-connectors/page.php +++ b/src/wp-includes/build/pages/options-connectors/page.php @@ -88,9 +88,10 @@ function wp_get_options_connectors_menu_items() { */ function wp_options_connectors_preload_data() { // Define paths to preload - same for all pages - // Please also change packages/core-data/src/entities.js when changing this. + // This must exactly match the _fields list in packages/core-data/src/entities.js, + // same fields in the same order, or the preload is never consumed. $preload_paths = array( - '/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', + '/?_fields=description,gmt_offset,home,image_max_bit_depth,image_sizes,image_size_threshold,image_strip_meta,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front', array( '/wp/v2/settings', 'OPTIONS' ), ); diff --git a/src/wp-includes/build/routes/connectors-home/content.js b/src/wp-includes/build/routes/connectors-home/content.js index 186807ef4d8e6..521cbcd5b9dc1 100644 --- a/src/wp-includes/build/routes/connectors-home/content.js +++ b/src/wp-includes/build/routes/connectors-home/content.js @@ -8937,9 +8937,9 @@ if (typeof process === "undefined" || true) { } var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; if (typeof process === "undefined" || true) { - registerStyle3("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}"); + registerStyle3("da99a163ac", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus{outline:none}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){@include mixins.focus-ring()}}}"); } -var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" }; +var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active" }; if (typeof process === "undefined" || true) { registerStyle3("af6d9984a6", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}"); } @@ -9904,9 +9904,9 @@ if (typeof process === "undefined" || true) { } var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; if (typeof process === "undefined" || true) { - registerStyle10("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}"); + registerStyle10("da99a163ac", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus{outline:none}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){@include mixins.focus-ring()}}}"); } -var focus_default2 = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" }; +var focus_default2 = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active" }; if (typeof process === "undefined" || true) { registerStyle10("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}'); } diff --git a/src/wp-includes/build/routes/connectors-home/content.min.asset.php b/src/wp-includes/build/routes/connectors-home/content.min.asset.php index 666c2ec30313d..d033468a89d76 100644 --- a/src/wp-includes/build/routes/connectors-home/content.min.asset.php +++ b/src/wp-includes/build/routes/connectors-home/content.min.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/connectors', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '22188cb77ae78d025593'); \ No newline at end of file + array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/connectors', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '1c478cb5cadaf4aded06'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/connectors-home/content.min.js b/src/wp-includes/build/routes/connectors-home/content.min.js index 3f51fd2690b81..62f17f892185e 100644 --- a/src/wp-includes/build/routes/connectors-home/content.min.js +++ b/src/wp-includes/build/routes/connectors-home/content.min.js @@ -1,4 +1,4 @@ -var wf=Object.create;var _r=Object.defineProperty;var vf=Object.getOwnPropertyDescriptor;var _f=Object.getOwnPropertyNames;var yf=Object.getPrototypeOf,xf=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),At=(e,t)=>{for(var o in t)_r(e,o,{get:t[o],enumerable:!0})},Rf=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _f(t))!xf.call(e,r)&&r!==o&&_r(e,r,{get:()=>t[r],enumerable:!(n=vf(t,r))||n.enumerable});return e};var h=(e,t,o)=>(o=e!=null?wf(yf(e)):{},Rf(t||!e||!e.__esModule?_r(o,"default",{value:e,enumerable:!0}):o,e));var Ot=Re((g0,Gs)=>{Gs.exports=window.wp.i18n});var de=Re((h0,Ks)=>{Ks.exports=window.wp.element});var z=Re((w0,qs)=>{qs.exports=window.React});var Q=Re((E0,$s)=>{$s.exports=window.ReactJSXRuntime});var Mt=Re((Ah,Ta)=>{Ta.exports=window.ReactDOM});var Mc=Re(Ic=>{"use strict";var wo=z();function Tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var km=typeof Object.is=="function"?Object.is:Tm,Pm=wo.useState,Cm=wo.useEffect,Am=wo.useLayoutEffect,Om=wo.useDebugValue;function Nm(e,t){var o=t(),n=Pm({inst:{value:o,getSnapshot:t}}),r=n[0].inst,i=n[1];return Am(function(){r.value=o,r.getSnapshot=t,ri(r)&&i({inst:r})},[e,o,t]),Cm(function(){return ri(r)&&i({inst:r}),e(function(){ri(r)&&i({inst:r})})},[e]),Om(o),o}function ri(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!km(e,o)}catch{return!0}}function Lm(e,t){return t()}var Im=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Lm:Nm;Ic.useSyncExternalStore=wo.useSyncExternalStore!==void 0?wo.useSyncExternalStore:Im});var ii=Re((w1,Bc)=>{"use strict";Bc.exports=Mc()});var zc=Re(Hc=>{"use strict";var Dn=z(),Mm=ii();function Bm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hm=typeof Object.is=="function"?Object.is:Bm,zm=Mm.useSyncExternalStore,Dm=Dn.useRef,jm=Dn.useEffect,Fm=Dn.useMemo,Vm=Dn.useDebugValue;Hc.useSyncExternalStoreWithSelector=function(e,t,o,n,r){var i=Dm(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Fm(function(){function d(m){if(!c){if(c=!0,l=m,m=n(m),r!==void 0&&s.hasValue){var u=s.value;if(r(u,m))return f=u}return f=m}if(u=f,Hm(l,m))return u;var g=n(m);return r!==void 0&&r(u,g)?(l=m,u):(l=m,f=g)}var c=!1,l,f,p=o===void 0?null:o;return[function(){return d(t())},p===null?void 0:function(){return d(p())}]},[t,o,n,r]);var a=zm(e,i[0],i[1]);return jm(function(){s.hasValue=!0,s.value=a},[a]),Vm(a),a}});var jc=Re((_1,Dc)=>{"use strict";Dc.exports=zc()});var $t=Re((X2,md)=>{md.exports=window.wp.primitives});var Rd=Re((g4,xd)=>{xd.exports=window.wp.theme});var Qi=Re((b4,Sd)=>{Sd.exports=window.wp.privateApis});var on=Re((q5,Au)=>{Au.exports=window.wp.components});var rn=Re((a3,zu)=>{zu.exports=window.wp.data});var mr=Re((c3,Du)=>{Du.exports=window.wp.coreData});var Hs=Re((u3,Fu)=>{Fu.exports=window.wp.notices});var Wu=Re((f3,Vu)=>{Vu.exports=window.wp.url});function Xs(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;te();function Y(e){let t=Se(kf).current;return t.next=e,Tf(t.effect),t.trampoline}function kf(){let e={next:void 0,callback:Pf,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Pf(){}var Js=h(z(),1),Cf=()=>{},D=typeof document<"u"?Js.useLayoutEffect:Cf;var hn=h(z(),1),Af=hn.createContext(void 0);function so(){return hn.useContext(Af)?.direction??"ltr"}function Of(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set("code",n.toString()),r.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${n}; visit ${i} for the full message.`}}var Nf=Of("https://base-ui.com/production-error","Base UI"),Pe=Nf;var Wt=h(z(),1);function xr(e,t,o,n){let r=Se(ta).current;return Lf(r,e,t,o,n)&&oa(r,[e,t,o,n]),r.callback}function ea(e){let t=Se(ta).current;return If(t,e)&&oa(t,e),t.callback}function ta(){return{callback:null,cleanup:null,refs:[]}}function Lf(e,t,o,n,r){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==n||e.refs[3]!==r}function If(e,t){return e.refs.length!==t.length||e.refs.some((o,n)=>o!==t[n])}function oa(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let n=Array(t.length).fill(null);for(let r=0;r{for(let r=0;r=e}function Rr(e){if(!ra.isValidElement(e))return null;let t=e,o=t.props;return(ao(19)?o?.ref:t.ref)??null}function Bo(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Nt(){}var I0=Object.freeze([]),be=Object.freeze({});function ia(e,t){let o={};for(let n in e){let r=e[n];if(t?.hasOwnProperty(n)){let i=t[n](r);i!=null&&Object.assign(o,i);continue}r===!0?o[`data-${n.toLowerCase()}`]="":r&&(o[`data-${n.toLowerCase()}`]=r.toString())}return o}function sa(e,t){return typeof e=="function"?e(t):e}function aa(e,t){return typeof e=="function"?e(t):e}var Sr={};function ye(e,t,o,n,r){if(!o&&!n&&!r&&!e)return wn(t);let i=wn(e);return t&&(i=Ho(i,t)),o&&(i=Ho(i,o)),n&&(i=Ho(i,n)),r&&(i=Ho(i,r)),i}function ca(e){if(e.length===0)return Sr;if(e.length===1)return wn(e[0]);let t=wn(e[0]);for(let o=1;o=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Er(e){return typeof e=="function"}function da(e,t){return Er(e)?e(t):e??Sr}function zf(e,t){return t?e?(...o)=>{let n=o[0];if(fa(n)){let i=n;zo(i);let s=t(...o);return i.baseUIHandlerPrevented||e?.(...o),s}let r=t(...o);return e?.(...o),r}:ua(t):e}function ua(e){return e&&((...t)=>{let o=t[0];return fa(o)&&zo(o),e(...t)})}function zo(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Tr(e,t){return t?e?t+" "+e:t:e}function fa(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var kr=h(z(),1);function Ce(e,t,o={}){let n=t.render,r=Df(t,o);if(o.enabled===!1)return null;let i=o.state??be;return Vf(e,n,r,i)}function Df(e,t={}){let{className:o,style:n,render:r}=e,{state:i=be,ref:s,props:a,stateAttributesMapping:d,enabled:c=!0}=t,l=c?sa(o,i):void 0,f=c?aa(n,i):void 0,p=c?ia(i,d):be,m=c&&a?jf(a):void 0,u=c?Bo(p,m)??{}:be;return typeof document<"u"&&(c?Array.isArray(s)?u.ref=ea([u.ref,Rr(r),...s]):u.ref=xr(u.ref,Rr(r),s):xr(null,null)),c?(l!==void 0&&(u.className=Tr(u.className,l)),f!==void 0&&(u.style=Bo(u.style,f)),u):be}function jf(e){return Array.isArray(e)?ca(e):ye(void 0,e)}var Ff=Symbol.for("react.lazy");function Vf(e,t,o,n){if(t){if(typeof t=="function")return t(o,n);let r=ye(o,t.props);r.ref=o.ref;let i=t;return i?.$$typeof===Ff&&(i=Wt.Children.toArray(t)[0]),Wt.cloneElement(i,r)}if(e&&typeof e=="string")return Wf(e,o);throw new Error(Pe(8))}function Wf(e,t){return e==="button"?(0,kr.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,kr.createElement)("img",{alt:"",...t,key:t.key}):Wt.createElement(e,t)}var vn=h(z(),1);var pa=0;function Yf(e,t="mui"){let[o,n]=vn.useState(e),r=e||o;return vn.useEffect(()=>{o==null&&(pa+=1,n(`${t}-${pa}`))},[o,t]),r}var ma=Mo.useId;function Lt(e,t){if(ma!==void 0){let o=ma();return e??(t?`${t}-${o}`:o)}return Yf(e,t)}function ga(e){return Lt(e,"base-ui")}var U={};At(U,{cancelOpen:()=>wp,chipRemovePress:()=>ep,clearPress:()=>$f,closePress:()=>Qf,closeWatcher:()=>up,decrementPress:()=>np,disabled:()=>_p,drag:()=>gp,escapeKey:()=>dp,focusOut:()=>lp,imperativeAction:()=>Rp,incrementPress:()=>op,initial:()=>xp,inputBlur:()=>sp,inputChange:()=>rp,inputClear:()=>ip,inputPaste:()=>ap,inputPress:()=>cp,itemPress:()=>Zf,keyboard:()=>pp,linkPress:()=>Jf,listNavigation:()=>fp,missing:()=>yp,none:()=>Uf,outsidePress:()=>qf,pointer:()=>mp,scrub:()=>hp,siblingOpen:()=>vp,swipe:()=>Sp,trackPress:()=>tp,triggerFocus:()=>Kf,triggerHover:()=>Xf,triggerPress:()=>Gf,wheel:()=>bp,windowResize:()=>Ep});var Uf="none",Gf="trigger-press",Xf="trigger-hover",Kf="trigger-focus",qf="outside-press",Zf="item-press",Qf="close-press",Jf="link-press",$f="clear-press",ep="chip-remove-press",tp="track-press",op="increment-press",np="decrement-press",rp="input-change",ip="input-clear",sp="input-blur",ap="input-paste",cp="input-press",lp="focus-out",dp="escape-key",up="close-watcher",fp="list-navigation",pp="keyboard",mp="pointer",gp="drag",bp="wheel",hp="scrub",wp="cancel-open",vp="sibling-open",_p="disabled",yp="missing",xp="initial",Rp="imperative-action",Sp="swipe",Ep="window-resize";function ee(e,t,o,n){let r=!1,i=!1,s=n??be;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:o,...s}}var Cr=h(z(),1);var ba=h(z(),1),Tp=[];function co(e){ba.useEffect(e,Tp)}var _n=null,ah=globalThis.requestAnimationFrame,Pr=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let r=0;r=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},yn=new Pr,ft=class e{static create(){return new e}static request(t){return yn.request(t)}static cancel(t){return yn.cancel(t)}currentId=_n;request(t){this.cancel(),this.currentId=yn.request(()=>{this.currentId=_n,t()})}cancel=()=>{this.currentId!==_n&&(yn.cancel(this.currentId),this.currentId=_n)};disposeEffect=()=>this.cancel};function lo(){let e=Se(ft.create).current;return co(e.disposeEffect),e}function ha(e,t=!1,o=!1){let[n,r]=Cr.useState(e&&t?"idle":void 0),[i,s]=Cr.useState(e);return e&&!i&&(s(!0),r("starting")),!e&&i&&n!=="ending"&&!o&&r("ending"),!e&&!i&&n==="ending"&&r(void 0),D(()=>{if(!e&&i&&n!=="ending"&&o){let a=ft.request(()=>{r("ending")});return()=>{ft.cancel(a)}}},[e,i,n,o]),D(()=>{if(!e||t)return;let a=ft.request(()=>{r(void 0)});return()=>{ft.cancel(a)}},[t,e]),D(()=>{if(!e||!t)return;e&&i&&n!=="idle"&&r("starting");let a=ft.request(()=>{r("idle")});return()=>{ft.cancel(a)}},[t,e,i,n]),{mounted:i,setMounted:s,transitionStatus:n}}var Yt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),kp={[Yt.startingStyle]:""},Pp={[Yt.endingStyle]:""},wa={transitionStatus(e){return e==="starting"?kp:e==="ending"?Pp:null}};var po=h(z(),1);function xn(){return typeof window<"u"}function Gt(e){return Rn(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ot(e){var t;return(t=(Rn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rn(e){return xn()?e instanceof Node||e instanceof ge(e).Node:!1}function V(e){return xn()?e instanceof Element||e instanceof ge(e).Element:!1}function we(e){return xn()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function uo(e){return!xn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}function fo(e){let{overflow:t,overflowX:o,overflowY:n,display:r}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&r!=="inline"&&r!=="contents"}function va(e){return/^(table|td|th)$/.test(Gt(e))}function Do(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Cp=/transform|translate|scale|rotate|perspective|filter/,Ap=/paint|layout|strict|content/,Ut=e=>!!e&&e!=="none",Ar;function Sn(e){let t=V(e)?Ae(e):e;return Ut(t.transform)||Ut(t.translate)||Ut(t.scale)||Ut(t.rotate)||Ut(t.perspective)||!En()&&(Ut(t.backdropFilter)||Ut(t.filter))||Cp.test(t.willChange||"")||Ap.test(t.contain||"")}function _a(e){let t=tt(e);for(;we(t)&&!nt(t);){if(Sn(t))return t;if(Do(t))return null;t=tt(t)}return null}function En(){return Ar==null&&(Ar=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ar}function nt(e){return/^(html|body|#document)$/.test(Gt(e))}function Ae(e){return ge(e).getComputedStyle(e)}function jo(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(Gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||uo(e)&&e.host||ot(e);return uo(t)?t.host:t}function ya(e){let t=tt(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&fo(t)?t:ya(t)}function It(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let r=ya(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=ge(r);if(i){let a=Tn(s);return t.concat(s,s.visualViewport||[],fo(r)?r:[],a&&o?It(a):[])}else return t.concat(r,It(r,[],o))}function Tn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var kn=h(z(),1),Op=kn.createContext(void 0);function xa(e=!1){let t=kn.useContext(Op);if(t===void 0&&!e)throw new Error(Pe(16));return t}var Ra=h(z(),1);function Sa(e){let{focusableWhenDisabled:t,disabled:o,composite:n=!1,tabIndex:r=0,isNativeButton:i}=e,s=n&&t!==!1,a=n&&t===!1;return{props:Ra.useMemo(()=>{let c={onKeyDown(l){o&&t&&l.key!=="Tab"&&l.preventDefault()}};return n||(c.tabIndex=r,!i&&o&&(c.tabIndex=t?r:-1)),(i&&(t||s)||!i&&o)&&(c["aria-disabled"]=o),i&&(!t||a)&&(c.disabled=o),c},[n,o,t,s,a,i,r])}}function Ea(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:n=0,native:r=!0,composite:i}=e,s=po.useRef(null),a=xa(!0),d=i??a!==void 0,{props:c}=Sa({focusableWhenDisabled:o,disabled:t,composite:d,tabIndex:n,isNativeButton:r}),l=po.useCallback(()=>{let m=s.current;Or(m)&&d&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,d]);D(l,[l]);let f=po.useCallback((m={})=>{let{onClick:u,onMouseDown:g,onKeyUp:v,onKeyDown:_,onPointerDown:w,...y}=m;return ye({onClick(b){if(t){b.preventDefault();return}u?.(b)},onMouseDown(b){t||g?.(b)},onKeyDown(b){if(t||(zo(b),_?.(b),b.baseUIHandlerPrevented))return;let S=b.target===b.currentTarget,x=b.currentTarget,E=Or(x),T=!r&&Np(x),k=S&&(r?E:!T),C=b.key==="Enter",j=b.key===" ",A=x.getAttribute("role"),L=A?.startsWith("menuitem")||A==="option"||A==="gridcell";if(S&&d&&j){if(b.defaultPrevented&&L)return;b.preventDefault(),T||r&&E?(x.click(),b.preventBaseUIHandler()):k&&(u?.(b),b.preventBaseUIHandler());return}k&&(!r&&(j||C)&&b.preventDefault(),!r&&C&&u?.(b))},onKeyUp(b){if(!t){if(zo(b),v?.(b),b.target===b.currentTarget&&r&&d&&Or(b.currentTarget)&&b.key===" "){b.preventDefault();return}b.baseUIHandlerPrevented||b.target===b.currentTarget&&!r&&!d&&b.key===" "&&u?.(b)}},onPointerDown(b){if(t){b.preventDefault();return}w?.(b)}},r?{type:"button"}:{role:"button"},c,y)},[t,c,d,r]),p=Y(m=>{s.current=m,l()});return{getButtonProps:f,buttonRef:p}}function Or(e){return we(e)&&e.tagName==="BUTTON"}function Np(e){return!!(e?.tagName==="A"&&e?.href)}function re(e,t,o,n){return e.addEventListener(t,o,n),()=>{e.removeEventListener(t,o,n)}}function ze(e){let t=Se(Lp,e).current;return t.next=e,D(t.effect),t}function Lp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function xe(e){return e?.ownerDocument||document}var Ca=h(z(),1);var Pa=h(Mt(),1);function ka(e){return e==null?e:"current"in e?e.current:e}function mo(e,t=!1,o=!0){let n=lo();return Y((r,i=null)=>{n.cancel();let s=ka(e);if(s==null)return;let a=s,d=()=>{Pa.flushSync(r)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{i?.aborted||d()}).catch(()=>{if(o){i?.aborted||d();return}let l=a.getAnimations();!i?.aborted&&l.length>0&&l.some(f=>f.pending||f.playState!=="finished")&&c()})}if(t){let l=Yt.startingStyle;if(!a.hasAttribute(l)){n.request(c);return}let f=new MutationObserver(()=>{a.hasAttribute(l)||(f.disconnect(),c())});f.observe(a,{attributes:!0,attributeFilter:[l]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}n.request(c)})}function Pn(e){let{enabled:t=!0,open:o,ref:n,onComplete:r}=e,i=Y(r),s=mo(n,o,!1);Ca.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var Aa=h(z(),1);function Oa(e){let t=Aa.useRef(!0);t.current&&(t.current=!1,e())}var xt={};At(xt,{engine:()=>Br,env:()=>zr,os:()=>Ir,screenReader:()=>Hr});var Ir={};At(Ir,{android:()=>Ia,apple:()=>Lr,ios:()=>Nr,linux:()=>zp,mac:()=>Ma,windows:()=>Hp});function Ip(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Mp,platform:Bp,maxTouchPoints:Na}=Ip(),Xt=Mp.toLowerCase(),Kt=Bp.toLowerCase();var Nr=/^i(os$|p)/.test(Kt)||Kt==="macintel"&&Na>1,La="android",Ia=Kt===La||Xt.includes(La),Ma=!Nr&&Kt.startsWith("mac"),Hp=Kt.startsWith("win"),zp=!Ia&&/^(linux|chrome os)/.test(Kt),Lr=Ma||Nr;var Br={};At(Br,{blink:()=>jp,gecko:()=>Dp,webkit:()=>Mr});var Mr=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),Dp=!Mr&&Xt.includes("firefox"),jp=!Mr&&Xt.includes("chrom");var Hr={};At(Hr,{voiceOver:()=>Fp});var Fp=Lr;var zr={};At(zr,{jsdom:()=>Vp});var Vp=/jsdom|happydom/.test(Xt);var Fo=0,Ye=class e{static create(){return new e}currentId=Fo;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fo,o()},t)}isStarted(){return this.currentId!==Fo}clear=()=>{this.currentId!==Fo&&(clearTimeout(this.currentId),this.currentId=Fo)};disposeEffect=()=>this.clear};function rt(){let e=Se(Ye.create).current;return co(e.disposeEffect),e}var Oe=h(z(),1);function Ba(e){return"nativeEvent"in e}function Rt(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function Ha(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var Dr="data-base-ui-focusable";var jr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Cn(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ie(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&uo(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Me(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Bt(e,t){if(!V(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute("data-trigger-disabled");for(let[,n]of t.entries())if(ie(n,o))return!n.hasAttribute("data-trigger-disabled");return!1}function An(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function za(e){return e.matches("html,body")}function Da(e){return we(e)&&e.matches(jr)}function Fr(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${jr}`)!=null}function ja(e){if(!e||xt.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Wp(e,t){return t!=null&&!Rt(t)?0:typeof e=="function"?e():e}function St(e,t,o){let n=Wp(e,o);return typeof n=="number"?n:n?.[t]}function Vr(e){return typeof e=="function"?e():e}function On(e,t){return t||e==="click"||e==="mousedown"}function Fa(e){return e?.includes("mouse")&&e!=="mousedown"}var Va=h(Q(),1),Wa=Oe.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ye,currentIdRef:{current:null},currentContextRef:{current:null}});function Yp(e,t){e.current=t.current}function Wr(e){let{children:t,delay:o,timeoutMs:n=0}=e,r=Oe.useRef(o),i=Oe.useRef(o),s=Oe.useRef(null),a=Oe.useRef(null),d=rt();return D(()=>{if(i.current=o,!s.current){r.current=o;return}r.current={open:St(r.current,"open"),close:St(o,"close")}},[o,s,r,i]),(0,Va.jsx)(Wa.Provider,{value:Oe.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:i,currentIdRef:s,timeoutMs:n,currentContextRef:a,timeout:d}),[n,d]),children:t})}function Yr(e,t={open:!1}){let{open:o}=t,n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),i=Oe.useContext(Wa),{currentIdRef:s,delayRef:a,timeoutMs:d,initialDelayRef:c,currentContextRef:l,hasProvider:f,timeout:p}=i,[m,u]=Oe.useState(!1),g=Oe.useRef(o),v=Oe.useRef(!1);return D(()=>{g.current=o},[o]),D(()=>()=>{v.current=!0},[]),D(()=>{function _(){v.current||u(!1),l.current?.setIsInstantPhase(!1),s.current=null,l.current=null,a.current=c.current,p.clear()}if(s.current&&!o&&s.current===r){if(u(!1),d){let w=r;return p.start(d,()=>{n.select("open")||s.current&&s.current!==w||_()}),()=>{(g.current||s.current!==w)&&p.clear()}}_()}},[o,r,s,a,d,c,l,p,n]),D(()=>{if(!o)return;let _=l.current,w=s.current;p.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:u},s.current=r,a.current={open:0,close:St(c.current,"close")},w!==null&&w!==r?(u(!0),_?.setIsInstantPhase(!0),_?.onOpenChange(!1,ee(U.none))):(u(!1),_?.setIsInstantPhase(!1))},[o,r,n,s,a,c,l,p]),D(()=>()=>{if(s.current===r){if(l.current=null,!g.current)return;s.current=null,Yp(a,c),p.clear()}},[l,s,a,r,c,p]),Oe.useMemo(()=>({hasProvider:f,delayRef:a,isInstantPhase:m}),[f,a,m])}function it(...e){return()=>{for(let t=0;t({x:e,y:e}),Up={left:"right",right:"left",bottom:"top",top:"bottom"};function Yo(e,t,o){return Be(e,Ht(t,o))}function at(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function ct(e){return e.split("-")[1]}function Ln(e){return e==="x"?"y":"x"}function Uo(e){return e==="y"?"height":"width"}function De(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Go(e){return Ln(De(e))}function Xa(e,t,o){o===void 0&&(o=!1);let n=ct(e),r=Go(e),i=Uo(r),s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Vo(s)),[s,Vo(s)]}function Ka(e){let t=Vo(e);return[Nn(e),t,Nn(t)]}function Nn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Ya=["left","right"],Ua=["right","left"],Gp=["top","bottom"],Xp=["bottom","top"];function Kp(e,t,o){switch(e){case"top":case"bottom":return o?t?Ua:Ya:t?Ya:Ua;case"left":case"right":return t?Gp:Xp;default:return[]}}function qa(e,t,o,n){let r=ct(e),i=Kp(Ee(e),o==="start",n);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Nn)))),i}function Vo(e){let t=Ee(e);return Up[t]+e.slice(t.length)}function qp(e){return{top:0,right:0,bottom:0,left:0,...e}}function In(e){return typeof e!="number"?qp(e):{top:e,right:e,bottom:e,left:e}}function qt(e){let{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Et(e,t,o=!0){return e.filter(r=>r.parentId===t).flatMap(r=>[...!o||r.context?.open?[r]:[],...Et(e,r.id,o)])}function go(e){return`data-base-ui-${e}`}var Ue=h(z(),1),Ja=h(Mt(),1);var Za={style:{transition:"none"}};var Zp="data-base-ui-swipe-ignore",Qp="data-swipe-ignore",ww=`[${Zp}]`,vw=`[${Qp}]`;var Qa={fallbackAxisSide:"end"};var $a=h(Q(),1),Jp=Ue.createContext(null),$p=()=>Ue.useContext(Jp),em=go("portal");function Ur(e={}){let{ref:t,container:o,componentProps:n=be,elementProps:r}=e,i=Lt(),a=$p()?.portalNode,[d,c]=Ue.useState(null),[l,f]=Ue.useState(null),p=Y(v=>{v!==null&&f(v)}),m=Ue.useRef(null);D(()=>{if(o===null){m.current&&(m.current=null,f(null),c(null));return}if(i==null)return;let v=(o&&(Rn(o)?o:o.current))??a??document.body;if(v==null){m.current&&(m.current=null,f(null),c(null));return}m.current!==v&&(m.current=v,f(null),c(v))},[o,a,i]);let u=Ce("div",n,{ref:[t,p],props:[{id:i,[em]:""},r]});return{portalNode:l,portalSubtree:d&&u?Ja.createPortal(u,d):null}}var Zt=h(z(),1);function ec(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(n=>n(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var tm=h(Q(),1),om=Zt.createContext(null),nm=Zt.createContext(null),bo=()=>Zt.useContext(om)?.id||null,Dt=e=>{let t=Zt.useContext(nm);return e??t};var je=h(z(),1);function rm(e,t){let o=null,n=null,r=!1;return{contextElement:e||void 0,getBoundingClientRect(){let i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",c=i.width,l=i.height,f=i.x,p=i.y;return o==null&&t.x&&s&&(o=i.x-t.x),n==null&&t.y&&a&&(n=i.y-t.y),f-=o||0,p-=n||0,c=0,l=0,!r||d?(c=t.axis==="y"?i.width:0,l=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,p=a&&t.y!=null?t.y:p):r&&!d&&(l=t.axis==="x"?i.height:l,c=t.axis==="y"?i.width:c),r=!0,{width:c,height:l,x:f,y:p,top:p,right:f+c,bottom:p+l,left:f}}}}function tc(e){return e!=null&&e.clientX!=null}function Gr(e,t={}){let{enabled:o=!0,axis:n="both"}=t,r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),a=r.useState("domReferenceElement"),d=r.context.dataRef,c=je.useRef(!1),l=je.useRef(null),[f,p]=je.useState(),[m,u]=je.useState([]),g=Y(b=>{r.set("positionReference",b)}),v=Y((b,S,x)=>{c.current||d.current.openEvent&&!tc(d.current.openEvent)||r.set("positionReference",rm(x??a,{x:b,y:S,axis:n,dataRef:d,pointerType:f}))}),_=Y(b=>{i?l.current||(v(b.clientX,b.clientY,b.currentTarget),u([])):v(b.clientX,b.clientY,b.currentTarget)}),w=Rt(f)?s:i;je.useEffect(()=>{if(!o){g(a);return}if(!w)return;function b(){l.current?.(),l.current=null}let S=ge(s);function x(E){let T=Me(E);ie(s,T)?b():v(E.clientX,E.clientY)}return!d.current.openEvent||tc(d.current.openEvent)?l.current=re(S,"mousemove",x):g(a),b},[w,o,s,d,a,r,v,g,m]),je.useEffect(()=>()=>{r.set("positionReference",null)},[r]),je.useEffect(()=>{o&&!s&&(c.current=!1)},[o,s]),je.useEffect(()=>{!o&&i&&(c.current=!0)},[o,i]);let y=je.useMemo(()=>{function b(S){p(S.pointerType)}return{onPointerDown:b,onPointerEnter:b,onMouseMove:_,onMouseEnter:_}},[_]);return je.useMemo(()=>o?{reference:y,trigger:y}:{},[o,y])}var Fe=h(z(),1);function im(){return!1}function sm(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Xr(e,t={}){let{enabled:o=!0,escapeKey:n=!0,outsidePress:r=!0,outsidePressEvent:i="sloppy",referencePress:s=im,bubbles:a,externalTree:d}=t,c="rootStore"in e?e.rootStore:e,l=c.useState("open"),f=c.useState("floatingElement"),{dataRef:p}=c.context,m=Dt(d),u=Y(typeof r=="function"?r:()=>!1),g=typeof r=="function"?u:r,v=g!==!1,_=Y(()=>i),{escapeKey:w,outsidePress:y}=sm(a),b=Fe.useRef(!1),S=Fe.useRef(!1),x=Fe.useRef(!1),E=Fe.useRef(!1),T=Fe.useRef(""),k=Fe.useRef(null),C=rt(),j=rt(),A=Y(()=>{j.clear(),p.current.insideReactTree=!1}),L=Y(W=>{let oe=p.current.floatingContext?.nodeId;return(m?Et(m.nodesRef.current,oe):[]).some(se=>se.context?.open&&!se.context.dataRef.current[W])}),I=Y(W=>An(W,c.select("floatingElement"))||An(W,c.select("domReferenceElement"))),R=Y(W=>{s()&&c.setOpen(!1,ee(U.triggerPress,W.nativeEvent))}),N=Y(W=>{if(!l||!o||!n||W.key!=="Escape"||E.current||!w&&L("__escapeKeyBubbles"))return;let oe=Ba(W)?W.nativeEvent:W,te=ee(U.escapeKey,oe);c.setOpen(!1,te),te.isCanceled||W.preventDefault(),!w&&!te.isPropagationAllowed&&W.stopPropagation()}),H=Y(()=>{p.current.insideReactTree=!0,j.start(0,A)}),P=Y(W=>{if(!l||!o||W.button!==0)return;let oe=Me(W.nativeEvent);ie(c.select("floatingElement"),oe)&&(b.current||(b.current=!0,S.current=!1))}),O=Y(W=>{!l||!o||(W.defaultPrevented||W.nativeEvent.defaultPrevented)&&b.current&&(S.current=!0)});Fe.useEffect(()=>{if(!l||!o)return;p.current.__escapeKeyBubbles=w,p.current.__outsidePressBubbles=y;let W=new Ye,oe=new Ye;function te(){W.clear(),E.current=!0}function se(){W.start(xt.engine.webkit?5:0,()=>{E.current=!1})}function G(){x.current=!0,oe.start(0,()=>{x.current=!1})}function K(){b.current=!1,S.current=!1}function J(){let B=T.current,F=B==="pen"||!B?"mouse":B,he=_(),ke=typeof he=="function"?he():he;return typeof ke=="string"?ke:ke[F]}function ne(B){let F=J();return F==="intentional"&&B.type!=="click"||F==="sloppy"&&B.type==="click"}function me(B){let F=p.current.floatingContext?.nodeId,he=m&&Et(m.nodesRef.current,F).some(ke=>An(B,ke.context?.elements.floating));return I(B)||he}function le(B){if(ne(B)){B.type!=="click"&&!I(B)&&(oe.clear(),x.current=!1),A();return}if(p.current.insideReactTree){A();return}let F=Me(B),he=`[${go("inert")}]`,ke=V(F)?F.getRootNode():null,kt=Array.from((uo(ke)?ke:xe(c.select("floatingElement"))).querySelectorAll(he)),Lo=c.context.triggerElements;if(F&&(Lo.hasElement(F)||Lo.hasMatchingElement(We=>ie(We,F))))return;let _t=V(F)?F:null;for(;_t&&!nt(_t);){let We=tt(_t);if(nt(We)||!V(We))break;_t=We}if(!(kt.length&&V(F)&&!za(F)&&!ie(F,c.select("floatingElement"))&&kt.every(We=>!ie(_t,We)))){if(we(F)&&!("touches"in B)){let We=nt(F),Pt=Ae(F),Ct=/auto|scroll/,un=We||Ct.test(Pt.overflowX),fn=We||Ct.test(Pt.overflowY),pn=un&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,mn=fn&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,gn=Pt.direction==="rtl",ae=mn&&(gn?B.offsetX<=F.offsetWidth-F.clientWidth:B.offsetX>F.clientWidth),Ie=pn&&B.offsetY>F.clientHeight;if(ae||Ie)return}if(!me(B)){if(J()==="intentional"&&x.current){oe.clear(),x.current=!1;return}typeof g=="function"&&!g(B)||L("__outsidePressBubbles")||(c.setOpen(!1,ee(U.outsidePress,B)),A())}}}function X(B){J()!=="sloppy"||B.pointerType==="touch"||!c.select("open")||!o||I(B)||le(B)}function pe(B){if(J()!=="sloppy"||!c.select("open")||!o||I(B))return;let F=B.touches[0];F&&(k.current={startTime:Date.now(),startX:F.clientX,startY:F.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},C.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function ue(B,F){let he=Me(B);if(!he)return;let ke=re(he,B.type,()=>{F(B),ke()})}function vt(B){T.current="touch",ue(B,pe)}function Te(B){C.clear(),B.type==="pointerdown"&&(T.current=B.pointerType),!(B.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)&&ue(B,F=>{F.type==="pointerdown"?X(F):le(F)})}function Ve(B){if(!b.current)return;let F=S.current;if(K(),J()==="intentional"){if(B.type==="pointercancel"){F&&G();return}if(!me(B)){if(F){G();return}typeof g=="function"&&!g(B)||(oe.clear(),x.current=!0,A())}}}function Ke(B){if(J()!=="sloppy"||!k.current||I(B))return;let F=B.touches[0];if(!F)return;let he=Math.abs(F.clientX-k.current.startX),ke=Math.abs(F.clientY-k.current.startY),kt=Math.sqrt(he*he+ke*ke);kt>5&&(k.current.dismissOnTouchEnd=!0),kt>10&&(le(B),C.clear(),k.current=null)}function He(B){ue(B,Ke)}function no(B){J()!=="sloppy"||!k.current||I(B)||(k.current.dismissOnTouchEnd&&le(B),C.clear(),k.current=null)}function dn(B){ue(B,no)}let _e=xe(f),ro=it(n&&it(re(_e,"keydown",N),re(_e,"compositionstart",te),re(_e,"compositionend",se)),v&&it(re(_e,"click",Te,!0),re(_e,"pointerdown",Te,!0),re(_e,"pointerup",Ve,!0),re(_e,"pointercancel",Ve,!0),re(_e,"mousedown",Te,!0),re(_e,"mouseup",Ve,!0),re(_e,"touchstart",vt,!0),re(_e,"touchmove",He,!0),re(_e,"touchend",dn,!0)));return()=>{ro(),W.clear(),oe.clear(),K(),x.current=!1}},[p,f,n,v,g,l,o,w,y,N,A,_,L,I,m,c,C]),Fe.useEffect(A,[g,A]);let M=Fe.useMemo(()=>({onKeyDown:N,onPointerDown:R,onClick:R}),[N,R]),Z=Fe.useMemo(()=>({onKeyDown:N,onPointerDown:O,onMouseDown:O,onClickCapture:H,onMouseDownCapture(W){H(),P(W)},onPointerDownCapture(W){H(),P(W)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[N,H,P,O]);return Fe.useMemo(()=>o?{reference:M,floating:Z,trigger:M}:{},[o,M,Z])}var Ne=h(z(),1);function oc(e,t,o){let{reference:n,floating:r}=e,i=De(t),s=Go(t),a=Uo(s),d=Ee(t),c=i==="y",l=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2,p=n[a]/2-r[a]/2,m;switch(d){case"top":m={x:l,y:n.y-r.height};break;case"bottom":m={x:l,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-r.width,y:f};break;default:m={x:n.x,y:n.y}}switch(ct(t)){case"start":m[s]-=p*(o&&c?-1:1);break;case"end":m[s]+=p*(o&&c?-1:1);break}return m}async function ic(e,t){var o;t===void 0&&(t={});let{x:n,y:r,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=at(t,e),u=In(m),v=a[p?f==="floating"?"reference":"floating":f],_=qt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(v)))==null||o?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:d})),w=f==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=qt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:d}):w);return{top:(_.top-S.top+u.top)/b.y,bottom:(S.bottom-_.bottom+u.bottom)/b.y,left:(_.left-S.left+u.left)/b.x,right:(S.right-_.right+u.right)/b.x}}var am=50,sc=async(e,t,o)=>{let{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:s}=o,a=s.detectOverflow?s:{...s,detectOverflow:ic},d=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:l,y:f}=oc(c,n,d),p=n,m=0,u={};for(let g=0;gI<=0)){var j,A;let I=(((j=i.flip)==null?void 0:j.index)||0)+1,R=E[I];if(R&&(!(f==="alignment"?w!==De(R):!1)||C.every(P=>De(P.placement)===w?P.overflows[0]>0:!0)))return{data:{index:I,overflows:C},reset:{placement:R}};let N=(A=C.filter(H=>H.overflows[0]<=0).sort((H,P)=>H.overflows[1]-P.overflows[1])[0])==null?void 0:A.placement;if(!N)switch(m){case"bestFit":{var L;let H=(L=C.filter(P=>{if(x){let O=De(P.placement);return O===w||O==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,M)=>O+M,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:L[0];H&&(N=H);break}case"initialPlacement":N=a;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function nc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rc(e){return Ga.some(t=>e[t]>=0)}var cc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o,platform:n}=t,{strategy:r="referenceHidden",...i}=at(e,t);switch(r){case"referenceHidden":{let s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=nc(s,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rc(a)}}}case"escaped":{let s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=nc(s,o.floating);return{data:{escapedOffsets:a,escaped:rc(a)}}}default:return{}}}}};var lc=new Set(["left","top"]);async function cm(e,t){let{placement:o,platform:n,elements:r}=e,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=Ee(o),a=ct(o),d=De(o)==="y",c=lc.has(s)?-1:1,l=i&&d?-1:1,f=at(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:u}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof u=="number"&&(m=a==="end"?u*-1:u),d?{x:m*l,y:p*c}:{x:p*c,y:m*l}}var dc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;let{x:r,y:i,placement:s,middlewareData:a}=t,d=await cm(t,e);return s===((o=a.offset)==null?void 0:o.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+d.x,y:i+d.y,data:{...d,placement:s}}}}},uc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:d={fn:_=>{let{x:w,y}=_;return{x:w,y}}},...c}=at(e,t),l={x:o,y:n},f=await i.detectOverflow(t,c),p=De(Ee(r)),m=Ln(p),u=l[m],g=l[p];if(s){let _=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=u+f[_],b=u-f[w];u=Yo(y,u,b)}if(a){let _=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=g+f[_],b=g-f[w];g=Yo(y,g,b)}let v=d.fn({...t,[m]:u,[p]:g});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[m]:s,[p]:a}}}}}},fc=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:n,placement:r,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:d=!0,crossAxis:c=!0}=at(e,t),l={x:o,y:n},f=De(r),p=Ln(f),m=l[p],u=l[f],g=at(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){let y=p==="y"?"height":"width",b=i.reference[p]-i.floating[y]+v.mainAxis,S=i.reference[p]+i.reference[y]-v.mainAxis;mS&&(m=S)}if(c){var _,w;let y=p==="y"?"width":"height",b=lc.has(Ee(r)),S=i.reference[f]-i.floating[y]+(b&&((_=s.offset)==null?void 0:_[f])||0)+(b?0:v.crossAxis),x=i.reference[f]+i.reference[y]+(b?0:((w=s.offset)==null?void 0:w[f])||0)-(b?v.crossAxis:0);ux&&(u=x)}return{[p]:m,[f]:u}}}},pc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;let{placement:r,rects:i,platform:s,elements:a}=t,{apply:d=()=>{},...c}=at(e,t),l=await s.detectOverflow(t,c),f=Ee(r),p=ct(r),m=De(r)==="y",{width:u,height:g}=i.floating,v,_;f==="top"||f==="bottom"?(v=f,_=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=f,v=p==="end"?"top":"bottom");let w=g-l.top-l.bottom,y=u-l.left-l.right,b=Ht(g-l[v],w),S=Ht(u-l[_],y),x=!t.middlewareData.shift,E=b,T=S;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(T=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=w),x&&!p){let C=Be(l.left,0),j=Be(l.right,0),A=Be(l.top,0),L=Be(l.bottom,0);m?T=u-2*(C!==0||j!==0?C+j:Be(l.left,l.right)):E=g-2*(A!==0||L!==0?A+L:Be(l.top,l.bottom))}await d({...t,availableWidth:T,availableHeight:E});let k=await s.getDimensions(a.floating);return u!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function hc(e){let t=Ae(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=we(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n,a=zt(o)!==i||zt(n)!==s;return a&&(o=i,n=s),{width:o,height:n,$:a}}function qr(e){return V(e)?e:e.contextElement}function ho(e){let t=qr(e);if(!we(t))return st(1);let o=t.getBoundingClientRect(),{width:n,height:r,$:i}=hc(t),s=(i?zt(o.width):o.width)/n,a=(i?zt(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var lm=st(0);function wc(e){let t=ge(e);return!En()||!t.visualViewport?lm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dm(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ge(e)?!1:t}function Qt(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let r=e.getBoundingClientRect(),i=qr(e),s=st(1);t&&(n?V(n)&&(s=ho(n)):s=ho(e));let a=dm(i,o,n)?wc(i):st(0),d=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,l=r.width/s.x,f=r.height/s.y;if(i){let p=ge(i),m=n&&V(n)?ge(n):n,u=p,g=Tn(u);for(;g&&n&&m!==u;){let v=ho(g),_=g.getBoundingClientRect(),w=Ae(g),y=_.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,b=_.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;d*=v.x,c*=v.y,l*=v.x,f*=v.y,d+=y,c+=b,u=ge(g),g=Tn(u)}}return qt({width:l,height:f,x:d,y:c})}function Mn(e,t){let o=jo(e).scrollLeft;return t?t.left+o:Qt(ot(e)).left+o}function vc(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Mn(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function um(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e,i=r==="fixed",s=ot(n),a=t?Do(t.floating):!1;if(n===s||a&&i)return o;let d={scrollLeft:0,scrollTop:0},c=st(1),l=st(0),f=we(n);if((f||!f&&!i)&&((Gt(n)!=="body"||fo(s))&&(d=jo(n)),f)){let m=Qt(n);c=ho(n),l.x=m.x+n.clientLeft,l.y=m.y+n.clientTop}let p=s&&!f&&!i?vc(s,d):st(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-d.scrollLeft*c.x+l.x+p.x,y:o.y*c.y-d.scrollTop*c.y+l.y+p.y}}function fm(e){return Array.from(e.getClientRects())}function pm(e){let t=ot(e),o=jo(e),n=e.ownerDocument.body,r=Be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+Mn(e),a=-o.scrollTop;return Ae(n).direction==="rtl"&&(s+=Be(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:s,y:a}}var mc=25;function mm(e,t){let o=ge(e),n=ot(e),r=o.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,d=0;if(r){i=r.width,s=r.height;let l=En();(!l||l&&t==="fixed")&&(a=r.offsetLeft,d=r.offsetTop)}let c=Mn(n);if(c<=0){let l=n.ownerDocument,f=l.body,p=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,u=Math.abs(n.clientWidth-f.clientWidth-m);u<=mc&&(i-=u)}else c<=mc&&(i+=c);return{width:i,height:s,x:a,y:d}}function gm(e,t){let o=Qt(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=we(e)?ho(e):st(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,d=r*i.x,c=n*i.y;return{width:s,height:a,x:d,y:c}}function gc(e,t,o){let n;if(t==="viewport")n=mm(e,o);else if(t==="document")n=pm(ot(e));else if(V(t))n=gm(t,o);else{let r=wc(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return qt(n)}function _c(e,t){let o=tt(e);return o===t||!V(o)||nt(o)?!1:Ae(o).position==="fixed"||_c(o,t)}function bm(e,t){let o=t.get(e);if(o)return o;let n=It(e,[],!1).filter(a=>V(a)&&Gt(a)!=="body"),r=null,i=Ae(e).position==="fixed",s=i?tt(e):e;for(;V(s)&&!nt(s);){let a=Ae(s),d=Sn(s);!d&&a.position==="fixed"&&(r=null),(i?!d&&!r:!d&&a.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||fo(s)&&!d&&_c(e,s))?n=n.filter(l=>l!==s):r=a,s=tt(s)}return t.set(e,n),n}function hm(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e,s=[...o==="clippingAncestors"?Do(t)?[]:bm(t,this._c):[].concat(o),n],a=gc(t,s[0],r),d=a.top,c=a.right,l=a.bottom,f=a.left;for(let p=1;p{s(!1,1e-7)},1e3)}E===1&&!xc(c,e.getBoundingClientRect())&&s(),b=!1}try{o=new IntersectionObserver(S,{...y,root:r.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(e)}return s(!0),i}function Xo(e,t,o,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,c=qr(e),l=r||i?[...c?It(c):[],...t?It(t):[]]:[];l.forEach(_=>{r&&_.addEventListener("scroll",o,{passive:!0}),i&&_.addEventListener("resize",o)});let f=c&&a?xm(c,o):null,p=-1,m=null;s&&(m=new ResizeObserver(_=>{let[w]=_;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),o()}),c&&!d&&m.observe(c),t&&m.observe(t));let u,g=d?Qt(e):null;d&&v();function v(){let _=Qt(e);g&&!xc(g,_)&&o(),g=_,u=requestAnimationFrame(v)}return o(),()=>{var _;l.forEach(w=>{r&&w.removeEventListener("scroll",o),i&&w.removeEventListener("resize",o)}),f?.(),(_=m)==null||_.disconnect(),m=null,d&&cancelAnimationFrame(u)}}var Rc=dc;var Sc=uc,Ec=ac,Tc=pc,kc=cc;var Pc=fc,Bn=(e,t,o)=>{let n=new Map,r={platform:Zr,...o},i={...r.platform,_c:n};return sc(e,t,{...r,platform:i})};var ve=h(z(),1),Ac=h(z(),1),Oc=h(Mt(),1),Sm=typeof document<"u",Em=function(){},Hn=Sm?Ac.useLayoutEffect:Em;function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!zn(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){let i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!zn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Nc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cc(e,t){let o=Nc(e);return Math.round(t*o)/o}function Qr(e){let t=ve.useRef(e);return Hn(()=>{t.current=e}),t}function Lc(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:c}=e,[l,f]=ve.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ve.useState(n);zn(p,n)||m(n);let[u,g]=ve.useState(null),[v,_]=ve.useState(null),w=ve.useCallback(P=>{P!==x.current&&(x.current=P,g(P))},[]),y=ve.useCallback(P=>{P!==E.current&&(E.current=P,_(P))},[]),b=i||u,S=s||v,x=ve.useRef(null),E=ve.useRef(null),T=ve.useRef(l),k=d!=null,C=Qr(d),j=Qr(r),A=Qr(c),L=ve.useCallback(()=>{if(!x.current||!E.current)return;let P={placement:t,strategy:o,middleware:p};j.current&&(P.platform=j.current),Bn(x.current,E.current,P).then(O=>{let M={...O,isPositioned:A.current!==!1};I.current&&!zn(T.current,M)&&(T.current=M,Oc.flushSync(()=>{f(M)}))})},[p,t,o,j,A]);Hn(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[c]);let I=ve.useRef(!1);Hn(()=>(I.current=!0,()=>{I.current=!1}),[]),Hn(()=>{if(b&&(x.current=b),S&&(E.current=S),b&&S){if(C.current)return C.current(b,S,L);L()}},[b,S,L,C,k]);let R=ve.useMemo(()=>({reference:x,floating:E,setReference:w,setFloating:y}),[w,y]),N=ve.useMemo(()=>({reference:b,floating:S}),[b,S]),H=ve.useMemo(()=>{let P={position:o,left:0,top:0};if(!N.floating)return P;let O=Cc(N.floating,l.x),M=Cc(N.floating,l.y);return a?{...P,transform:"translate("+O+"px, "+M+"px)",...Nc(N.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:O,top:M}},[o,a,N.floating,l.x,l.y]);return ve.useMemo(()=>({...l,update:L,refs:R,elements:N,floatingStyles:H}),[l,L,R,N,H])}var Jr=(e,t)=>{let o=Rc(e);return{name:o.name,fn:o.fn,options:[e,t]}},$r=(e,t)=>{let o=Sc(e);return{name:o.name,fn:o.fn,options:[e,t]}},ei=(e,t)=>({fn:Pc(e).fn,options:[e,t]}),ti=(e,t)=>{let o=Ec(e);return{name:o.name,fn:o.fn,options:[e,t]}},oi=(e,t)=>{let o=Tc(e);return{name:o.name,fn:o.fn,options:[e,t]}};var ni=(e,t)=>{let o=kc(e);return{name:o.name,fn:o.fn,options:[e,t]}};var _o=h(z(),1),qc=h(Mt(),1);var Xc=h(z(),1);var q=(e,t,o,n,r,i,...s)=>{if(s.length>0)throw new Error(Pe(1));let a;if(e&&t&&o&&n&&r&&i)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f),u=o(d,c,l,f),g=n(d,c,l,f),v=r(d,c,l,f);return i(p,m,u,g,v,c,l,f)};else if(e&&t&&o&&n&&r)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f),u=o(d,c,l,f),g=n(d,c,l,f);return r(p,m,u,g,c,l,f)};else if(e&&t&&o&&n)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f),u=o(d,c,l,f);return n(p,m,u,c,l,f)};else if(e&&t&&o)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f);return o(p,m,c,l,f)};else if(e&&t)a=(d,c,l,f)=>{let p=e(d,c,l,f);return t(p,c,l,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var Uc=h(z(),1),li=h(ii(),1),Gc=h(jc(),1);var Fc=h(z(),1);var si=[],ai;function Vc(){return ai}function Wc(e){si.push(e)}function ci(e){let t=(o,n)=>{let r=Se(Wm).current,i;try{ai=r;for(let s of si)s.before(r);i=e(o,n);for(let s of si)s.after(r);r.didInitialize=!0}finally{ai=void 0}return i};return t.displayName=e.displayName||e.name,t}function Yc(e){return Fc.forwardRef(ci(e))}function Wm(){return{didInitialize:!1}}var Ym=ao(19),Um=Ym?Xm:Km;function jn(e,t,o,n,r){return Um(e,t,o,n,r)}function Gm(e,t,o,n,r){let i=Uc.useCallback(()=>t(e.getSnapshot(),o,n,r),[e,t,o,n,r]);return(0,li.useSyncExternalStore)(e.subscribe,i,i)}Wc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let r of e.syncHooks)o.add(r.store);let n=[];for(let r of o)n.push(r.subscribe(t));return()=>{for(let r of n)r()}}),(0,li.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xm(e,t,o,n,r){let i=Vc();if(!i)return Gm(e,t,o,n,r);let s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,n)||!Object.is(a.a3,r))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=n,a.a3=r,a.value=t(e.getSnapshot(),o,n,r))):(a={store:e,selector:t,a1:o,a2:n,a3:r,value:t(e.getSnapshot(),o,n,r)},i.syncHooks.push(a)),a.value}function Km(e,t,o,n,r){return(0,Gc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,o,n,r))}var Fn=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let n of this.listeners){if(o!==this.updateTick)return;n(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,n,r){return jn(this,t,o,n,r)}};var Jt=h(z(),1);var vo=class extends Fn{constructor(t,o={},n){super(t),this.context=o,this.selectors=n}useSyncedValue(t,o){Jt.useDebugValue(t);let n=this;D(()=>{n.state[t]!==o&&n.set(t,o)},[n,t,o])}useSyncedValueWithCleanup(t,o){let n=this;D(()=>(n.state[t]!==o&&n.set(t,o),()=>{n.set(t,void 0)}),[n,t,o])}useSyncedValues(t){let o=this,n=Object.values(t);D(()=>{o.update(t)},[o,...n])}useControlledProp(t,o){Jt.useDebugValue(t);let n=this,r=o!==void 0;D(()=>{r&&!Object.is(n.state[t],o)&&n.setState({...n.state,[t]:o})},[n,t,o,r])}select(t,o,n,r){let i=this.selectors[t];return i(this.state,o,n,r)}useState(t,o,n,r){return Jt.useDebugValue(t),jn(this,this.selectors[t],o,n,r)}useContextCallback(t,o){Jt.useDebugValue(t);let n=Y(o??Nt);this.context[t]=n}useStateSetter(t){let o=Jt.useRef(void 0);return o.current===void 0&&(o.current=n=>{this.set(t,n)}),o.current}observe(t,o){let n;typeof t=="function"?n=t:n=this.selectors[t];let r=n(this.state);return o(r,r,this),this.subscribe(i=>{let s=n(i);if(!Object.is(r,s)){let a=r;r=s,o(s,a,this)}})}};var qm={open:q(e=>e.open),transitionStatus:q(e=>e.transitionStatus),domReferenceElement:q(e=>e.domReferenceElement),referenceElement:q(e=>e.positionReference??e.referenceElement),floatingElement:q(e=>e.floatingElement),floatingId:q(e=>e.floatingId)},pt=class extends vo{constructor(t){let{syncOnly:o,nested:n,onOpenChange:r,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ec(),nested:n,triggerElements:i},qm),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&Ha(o))&&(this.context.dataRef.current.openEvent=t?o:void 0)};dispatchOpenChange=(t,o)=>{this.syncOpenEvent(t,o.event);let n={open:t,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",n)};setOpen=(t,o)=>{if(this.syncOnly){this.context.onOpenChange?.(t,o);return}this.dispatchOpenChange(t,o),this.context.onOpenChange?.(t,o)}};function Kc(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:n,floatingId:r,nested:i,onOpenChange:s}=e,a=t.useState("open"),d=t.useState("activeTriggerElement"),c=t.useState(o?"popupElement":"positionerElement"),l=t.context.triggerElements,f=s,p=Xc.useRef(null);n===void 0&&p.current===null&&(p.current=new pt({open:a,transitionStatus:void 0,referenceElement:d,floatingElement:c,triggerElements:l,onOpenChange:f,floatingId:r,syncOnly:!0,nested:i}));let m=n??p.current;return t.useSyncedValue("floatingId",r),D(()=>{let u={open:a,floatingId:r,referenceElement:d,floatingElement:c};V(d)&&(u.domReferenceElement=d),m.state.positionReference===m.state.referenceElement&&(u.positionReference=d),m.update(u)},[a,r,d,c,m]),m.context.onOpenChange=f,m.context.nested=i,m}var Zc={tabIndex:-1,[Dr]:""};function Qc(e,t,o=!1){let n=Lt(),r=bo()!=null,i=_o.useRef(null);e===void 0&&i.current===null&&(i.current=t(n,r));let s=e??i.current;return Kc({popupStore:s,treatPopupAsFloatingElement:o,floatingRootContext:s.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function Zm(e,t){let o=_o.useRef(null),n=_o.useRef(null);return _o.useCallback(r=>{if(e===void 0)return;let i=!1;if(o.current!==null){let s=o.current,a=n.current,d=t.context.triggerElements.getById(s);a&&d===a&&(t.context.triggerElements.delete(s),i=!0),o.current=null,n.current=null}if(r!==null&&(o.current=e,n.current=r,t.context.triggerElements.add(e,r),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function Qm(e,t,o,n=!1){t?e.preventUnmountingOnClose=!1:n&&(e.preventUnmountingOnClose=!0);let r=o?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=o??null)}function Jm(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Jc(e,t,o,n={}){let r=o.reason,i=r===U.triggerHover,s=t&&r===U.triggerFocus,a=!t&&(r===U.triggerPress||r===U.escapeKey),d=Jm(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;n.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let c=()=>{let l={...n.extraState,open:t};s?l.instantType="focus":a?l.instantType="dismiss":i&&(l.instantType=void 0),Qm(l,t,o.trigger,d()),e.update(l)};i?qc.flushSync(c):c()}function $c(e,t,o,n){Oa(()=>{t===void 0&&e.state.open===!1&&o&&(e.state={...e.state,open:!0,activeTriggerId:n,preventUnmountingOnClose:!1})})}function el(e,t,o,n){let r=o.useState("isMountedByTrigger",e),i=Zm(e,o),s=Y(a=>{if(i(a),!a)return;let d=o.select("open"),c=o.select("activeTriggerId");if(c===e){o.update({activeTriggerElement:a,...d?n:null});return}c==null&&d&&o.update({activeTriggerId:e,activeTriggerElement:a,...n})});return D(()=>{r&&o.update({activeTriggerElement:t.current,...n})},[r,o,t,...Object.values(n)]),{registerTrigger:s,isMountedByThisTrigger:r}}function tl(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,n=e.useState("open"),r=e.useState("triggerCount");D(()=>{if(!n){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let a=e.select("activeTriggerId"),d=null;if(a){let c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(s.activeTriggerElement=c):d=a}if(!d&&!a&&i===1){let c=e.context.triggerElements.entries().next();if(!c.done){let[l,f]=c.value;s.activeTriggerId=l,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),d&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){let c=ee(U.none);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[n,e,r,o])}function ol(e,t,o){let{mounted:n,setMounted:r,transitionStatus:i}=ha(e),s=t.useState("preventUnmountingOnClose"),a=e?!1:s;t.useSyncedValues({mounted:n,transitionStatus:i,preventUnmountingOnClose:a});let d=Y(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)});return Pn({enabled:n&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:i}}function nl(e,t){e.useSyncedValues(t),D(()=>()=>{e.update({activeTriggerProps:be,inactiveTriggerProps:be,popupProps:be})},[e])}var jt=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,o){let n=this.idMap.get(t);n!==o&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(o),this.idMap.set(t,o))}delete(t){let o=this.idMap.get(t);o&&(this.elementsSet.delete(o),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let o of this.elementsSet)if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function rl(){return new pt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new jt,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function sl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:rl(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:be,inactiveTriggerProps:be,popupProps:be}}function al(e,t,o=!1){return new pt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}var Ko=q(e=>e.triggerIdProp??e.activeTriggerId),di=q(e=>e.openProp??e.open),il=q(e=>(e.popupElement?.id??e.floatingId)||void 0);function cl(e,t){return t!==void 0&&di(e)&&Ko(e)===t}function $m(e,t){return cl(e,t)?!0:t!==void 0&&di(e)&&Ko(e)==null&&e.triggerCount===1}var ll={open:di,mounted:q(e=>e.mounted),transitionStatus:q(e=>e.transitionStatus),floatingRootContext:q(e=>e.floatingRootContext),triggerCount:q(e=>e.triggerCount),preventUnmountingOnClose:q(e=>e.preventUnmountingOnClose),payload:q(e=>e.payload),activeTriggerId:Ko,activeTriggerElement:q(e=>e.mounted?e.activeTriggerElement:null),popupId:il,isTriggerActive:q((e,t)=>t!==void 0&&Ko(e)===t),isOpenedByTrigger:q((e,t)=>cl(e,t)),isMountedByTrigger:q((e,t)=>t!==void 0&&Ko(e)===t&&e.mounted),triggerProps:q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:q((e,t)=>$m(e,t)?il(e):void 0),popupProps:q(e=>e.popupProps),popupElement:q(e=>e.popupElement),positionerElement:q(e=>e.positionerElement)};function dl(e){let{open:t=!1,onOpenChange:o,elements:n={}}=e,r=Lt(),i=bo()!=null,s=Se(()=>new pt({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new jt,floatingId:r,syncOnly:!1,nested:i})).current;return D(()=>{let a={open:t,floatingId:r};n.reference!==void 0&&(a.referenceElement=n.reference,a.domReferenceElement=V(n.reference)?n.reference:null),n.floating!==void 0&&(a.floatingElement=n.floating),s.update(a)},[t,r,n.reference,n.floating,s]),s.context.onOpenChange=o,s.context.nested=i,s}function ui(e={}){let{nodeId:t,externalTree:o}=e,n=dl(e),r=e.rootContext||n,i=r.useState("referenceElement"),s=r.useState("floatingElement"),a=r.useState("domReferenceElement"),d=r.useState("open"),c=r.useState("floatingId"),[l,f]=Ne.useState(null),[p,m]=Ne.useState(void 0),[u,g]=Ne.useState(void 0),v=Ne.useRef(null),_=Dt(o),w=Ne.useMemo(()=>({reference:i,floating:s,domReference:a}),[i,s,a]),y=Lc({...e,elements:{...w,...l&&{reference:l}}}),b=V(p)?p:null,S=u===void 0?r.state.floatingElement:u;r.useSyncedValue("referenceElement",p??null),r.useSyncedValue("domReferenceElement",p===void 0?a:b),r.useSyncedValue("floatingElement",S);let x=Ne.useCallback(A=>{let L=V(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;f(L),y.refs.setReference(L)},[y.refs]),E=Ne.useCallback(A=>{(V(A)||A===null)&&(v.current=A,m(A)),(V(y.refs.reference.current)||y.refs.reference.current===null||A!==null&&!V(A))&&y.refs.setReference(A)},[y.refs,m]),T=Ne.useCallback(A=>{g(A),y.refs.setFloating(A)},[y.refs]),k=Ne.useMemo(()=>({...y.refs,setReference:E,setFloating:T,setPositionReference:x,domReference:v}),[y.refs,E,T,x]),C=Ne.useMemo(()=>({...y.elements,domReference:a}),[y.elements,a]),j=Ne.useMemo(()=>({...y,dataRef:r.context.dataRef,open:d,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:k,elements:C,nodeId:t,rootStore:r}),[y,k,C,t,r,d,c]);return D(()=>{a&&(v.current=a)},[a]),D(()=>{r.context.dataRef.current.floatingContext=j;let A=_?.nodesRef.current.find(L=>L.id===t);A&&(A.context=j)}),Ne.useMemo(()=>({...y,context:j,refs:k,elements:C,rootStore:r}),[y,k,C,j,r])}var mt=h(z(),1);var fi=xt.os.mac&&xt.engine.webkit;function pi(e,t={}){let{enabled:o=!0,delay:n}=t,r="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=r.context,a=mt.useRef(!1),d=mt.useRef(null),c=mt.useRef(!0),l=rt();mt.useEffect(()=>{let p=r.select("domReferenceElement");if(!o)return;let m=ge(p);function u(){let _=r.select("domReferenceElement");!r.select("open")&&we(_)&&_===Cn(xe(_))&&(a.current=!0)}function g(){c.current=!0}function v(){c.current=!1}return it(re(m,"blur",u),fi&&re(m,"keydown",g,!0),fi&&re(m,"pointerdown",v,!0))},[r,o]),mt.useEffect(()=>{if(!o)return;function p(m){if(m.reason===U.triggerPress||m.reason===U.escapeKey){let u=r.select("domReferenceElement");V(u)&&(d.current=u,a.current=!0)}}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,o,r]);let f=mt.useMemo(()=>{function p(){a.current=!1,d.current=null}return{onMouseLeave(){p()},onFocus(m){let u=m.currentTarget;if(a.current){if(d.current===u)return;p()}let g=Me(m.nativeEvent);if(V(g)){if(fi&&!m.relatedTarget){if(!c.current&&!Da(g))return}else if(!ja(g))return}let v=Bt(m.relatedTarget,r.context.triggerElements),{nativeEvent:_,currentTarget:w}=m,y=typeof n=="function"?n():n;if(r.select("open")&&v||y===0||y===void 0){r.setOpen(!0,ee(U.triggerFocus,_,w));return}l.start(y,()=>{a.current||r.setOpen(!0,ee(U.triggerFocus,_,w))})},onBlur(m){p();let u=m.relatedTarget,g=m.nativeEvent,v=V(u)&&u.hasAttribute(go("focus-guard"))&&u.getAttribute("data-type")==="outside";l.start(0,()=>{let _=r.select("domReferenceElement"),w=Cn(xe(_));!u&&w===_||ie(s.current.floatingContext?.refs.floating.current,w)||ie(_,w)||v||Bt(u??w,r.context.triggerElements)||r.setOpen(!1,ee(U.triggerFocus,g))})}}},[s,n,r,l]);return mt.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var gi=h(z(),1);var mi=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ye,this.restTimeout=new Ye,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Vn=new WeakMap;function yo(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Vn.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Vn.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Wn(e,t){let{scopeElement:o,referenceElement:n,floatingElement:r}=t,i=Vn.get(o);i&&i!==e&&yo(i),yo(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=n,e.pointerEventsFloatingElement=r,Vn.set(o,e),o.style.pointerEvents="none",n.style.pointerEvents="auto",r.style.pointerEvents="auto"}function xo(e){let t=e.context.dataRef.current,o=Se(()=>t.hoverInteractionState??mi.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),co(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function bi(e,t={}){let{enabled:o=!0,closeDelay:n=0,nodeId:r}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),a=i.useState("floatingElement"),d=i.useState("domReferenceElement"),{dataRef:c}=i.context,l=Dt(),f=bo(),p=xo(i),m=rt(),u=Y(()=>On(c.current.openEvent?.type,p.interactedInside)),g=Y(()=>Fa(c.current.openEvent?.type)),v=Y(()=>{yo(p)});D(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,v())},[s,p,v]),gi.useEffect(()=>v,[v]),D(()=>{if(o&&s&&p.handleCloseOptions?.blockPointerEvents&&g()&&V(d)&&a){let _=d,w=a,y=xe(a),b=l?.nodesRef.current.find(T=>T.id===f)?.context?.elements.floating;b&&(b.style.pointerEvents="");let S=p.pointerEventsScopeElement!==w?p.pointerEventsScopeElement:null,x=b!==w?b:null,E=p.handleCloseOptions?.getScope?.()??S??x??_.closest("[data-rootownerid]")??y.body;return Wn(p,{scopeElement:E,referenceElement:_,floatingElement:w}),()=>{v()}}},[o,s,d,a,p,g,l,f,v]),gi.useEffect(()=>{if(!o)return;function _(){return!!(l&&f&&Et(l.nodesRef.current,f).length>0)}function w(T){let k=St(n,"close",p.pointerType),C=()=>{i.setOpen(!1,ee(U.triggerHover,T)),l?.events.emit("floating.closed",T)};k?p.openChangeTimeout.start(k,C):(p.openChangeTimeout.clear(),C())}function y(T){let k=Me(T);if(!Fr(k)){p.interactedInside=!1;return}p.interactedInside=k?.closest("[aria-haspopup]")!=null}function b(){p.openChangeTimeout.clear(),m.clear(),l?.events.off("floating.closed",x),v()}function S(T){if(_()&&l){l.events.on("floating.closed",x);return}if(Bt(T.relatedTarget,i.context.triggerElements))return;let k=c.current.floatingContext?.nodeId??r,C=T.relatedTarget;if(!(l&&k&&V(C)&&Et(l.nodesRef.current,k,!1).some(A=>ie(A.context?.elements.floating,C)))){if(p.handler){p.handler(T);return}v(),g()&&!u()&&w(T)}}function x(T){!l||!f||_()||m.start(0,()=>{l.events.off("floating.closed",x),i.setOpen(!1,ee(U.triggerHover,T)),l.events.emit("floating.closed",T)})}let E=a;return it(E&&re(E,"mouseenter",b),E&&re(E,"mouseleave",S),E&&re(E,"pointerdown",y,!0),()=>{l?.events.off("floating.closed",x)})},[o,a,i,c,n,r,g,u,v,p,l,f,m])}var Ft=h(z(),1),ul=h(Mt(),1);var eg={current:null};function hi(e,t={}){let{enabled:o=!0,delay:n=0,handleClose:r=null,mouseOnly:i=!1,restMs:s=0,move:a=!0,triggerElementRef:d=eg,externalTree:c,isActiveTrigger:l=!0,getHandleCloseContext:f,isClosing:p,shouldOpen:m}=t,u="rootStore"in e?e.rootStore:e,{dataRef:g,events:v}=u.context,_=Dt(c),w=xo(u),y=Ft.useRef(!1),b=ze(r),S=ze(n),x=ze(s),E=ze(o),T=ze(m),k=ze(p),C=Y(()=>On(g.current.openEvent?.type,w.interactedInside)),j=Y(()=>T.current?.()!==!1),A=Y((R,N,H)=>{let P=u.context.triggerElements;if(P.hasElement(N))return!R||!ie(R,N);if(!V(H))return!1;let O=H;return P.hasMatchingElement(M=>ie(M,O))&&(!R||!ie(R,O))}),L=Y(()=>{if(!w.handler)return;xe(u.select("domReferenceElement")).removeEventListener("mousemove",w.handler),w.handler=void 0}),I=Y(()=>{yo(w)});return l&&(w.handleCloseOptions=b.current?.__options),Ft.useEffect(()=>L,[L]),Ft.useEffect(()=>{if(!o)return;function R(N){N.open?y.current=!1:(y.current=N.reason===U.triggerHover,L(),w.openChangeTimeout.clear(),w.restTimeout.clear(),w.blockMouseMove=!0,w.restTimeoutPending=!1)}return v.on("openchange",R),()=>{v.off("openchange",R)}},[o,v,w,L]),Ft.useEffect(()=>{if(!o)return;function R(O,M=!0){let Z=St(S.current,"close",w.pointerType);Z?w.openChangeTimeout.start(Z,()=>{u.setOpen(!1,ee(U.triggerHover,O)),_?.events.emit("floating.closed",O)}):M&&(w.openChangeTimeout.clear(),u.setOpen(!1,ee(U.triggerHover,O)),_?.events.emit("floating.closed",O))}let N=d.current??(l?u.select("domReferenceElement"):null);if(!V(N))return;function H(O){if(w.openChangeTimeout.clear(),w.blockMouseMove=!1,i&&!Rt(w.pointerType))return;let M=Vr(x.current),Z=St(S.current,"open",w.pointerType),W=Me(O),oe=O.currentTarget??null,te=u.select("domReferenceElement"),se=oe;if(V(W)&&!u.context.triggerElements.hasElement(W)){for(let ue of u.context.triggerElements.elements())if(ie(ue,W)){se=ue;break}}V(oe)&&V(te)&&!u.context.triggerElements.hasElement(oe)&&ie(oe,te)&&(se=te);let G=se==null?!1:A(te,se,W),K=u.select("open"),J=k.current?.()??u.select("transitionStatus")==="ending",ne=!K&&J&&y.current,me=!G&&V(se)&&V(te)&&ie(te,se)&&ne,le=M>0&&!Z,X=G&&(K||ne)||me,pe=!K||G;if(X){j()&&u.setOpen(!0,ee(U.triggerHover,O,se));return}le||(Z?w.openChangeTimeout.start(Z,()=>{pe&&j()&&u.setOpen(!0,ee(U.triggerHover,O,se))}):pe&&j()&&u.setOpen(!0,ee(U.triggerHover,O,se)))}function P(O){if(C()){I();return}L();let M=u.select("domReferenceElement"),Z=xe(M);w.restTimeout.clear(),w.restTimeoutPending=!1;let W=g.current.floatingContext??f?.();if(Bt(O.relatedTarget,u.context.triggerElements))return;if(b.current&&W){u.select("open")||w.openChangeTimeout.clear();let te=d.current;w.handler=b.current({...W,tree:_,x:O.clientX,y:O.clientY,onClose(){I(),L(),E.current&&!C()&&te===u.select("domReferenceElement")&&R(O,!0)}}),Z.addEventListener("mousemove",w.handler),w.handler(O);return}(w.pointerType!=="touch"||!ie(u.select("floatingElement"),O.relatedTarget))&&R(O)}return a?it(re(N,"mousemove",H,{once:!0}),re(N,"mouseenter",H),re(N,"mouseleave",P)):it(re(N,"mouseenter",H),re(N,"mouseleave",P))},[L,I,g,S,u,o,b,w,l,A,C,i,a,x,d,_,E,f,k,j]),Ft.useMemo(()=>{if(!o)return;function R(N){w.pointerType=N.pointerType}return{onPointerDown:R,onPointerEnter:R,onMouseMove(N){let{nativeEvent:H}=N,P=N.currentTarget,O=u.select("domReferenceElement"),M=u.select("open"),Z=A(O,P,N.target);if(i&&!Rt(w.pointerType))return;if(M&&Z&&w.handleCloseOptions?.blockPointerEvents){let te=u.select("floatingElement");if(te){let se=w.handleCloseOptions?.getScope?.()??P.ownerDocument.body;Wn(w,{scopeElement:se,referenceElement:P,floatingElement:te})}}let W=Vr(x.current);if(M&&!Z||W===0||!Z&&w.restTimeoutPending&&N.movementX**2+N.movementY**2<2)return;w.restTimeout.clear();function oe(){if(w.restTimeoutPending=!1,C())return;let te=u.select("open");!w.blockMouseMove&&(!te||Z)&&j()&&u.setOpen(!0,ee(U.triggerHover,H,P))}w.pointerType==="touch"?ul.flushSync(()=>{oe()}):Z&&M?oe():(w.restTimeoutPending=!0,w.restTimeout.start(W,oe))}}},[o,w,C,A,i,u,x,j])}var fl=.1,tg=fl*fl,ce=.5;function Yn(e,t,o,n,r,i){return n>=t!=i>=t&&e<=(r-o)*(t-n)/(i-n)+o}function Un(e,t,o,n,r,i,s,a,d,c){let l=!1;return Yn(e,t,o,n,r,i)&&(l=!l),Yn(e,t,r,i,s,a)&&(l=!l),Yn(e,t,s,a,d,c)&&(l=!l),Yn(e,t,d,c,o,n)&&(l=!l),l}function og(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function Gn(e,t,o,n,r,i){let s=Math.min(o,r),a=Math.max(o,r),d=Math.min(n,i),c=Math.max(n,i);return e>=s&&e<=a&&t>=d&&t<=c}function wi(e={}){let{blockPointerEvents:t=!1}=e,o=new Ye,n=({x:r,y:i,placement:s,elements:a,onClose:d,nodeId:c,tree:l})=>{let f=s?.split("-")[0],p=!1,m=null,u=null,g=typeof performance<"u"?performance.now():0;function v(w,y){let b=performance.now(),S=b-g;if(m===null||u===null||S===0)return m=w,u=y,g=b,!1;let x=w-m,E=y-u,T=x*x+E*E,k=S*S*tg;return m=w,u=y,g=b,T0)}function L(){A()||_()}if(A())return;let I=b.getBoundingClientRect(),R=S.getBoundingClientRect(),N=r>R.right-R.width/2,H=i>R.bottom-R.height/2,P=R.width>I.width,O=R.height>I.height,M=(P?I:R).left,Z=(P?I:R).right,W=(O?I:R).top,oe=(O?I:R).bottom;if(f==="top"&&i>=I.bottom-1||f==="bottom"&&i<=I.top+1||f==="left"&&r>=I.right-1||f==="right"&&r<=I.left+1){L();return}let te=!1;switch(f){case"top":te=Gn(x,E,M,I.top+1,Z,R.bottom-1);break;case"bottom":te=Gn(x,E,M,R.top+1,Z,I.bottom-1);break;case"left":te=Gn(x,E,R.right-1,oe,I.left+1,W);break;case"right":te=Gn(x,E,I.right-1,oe,R.left+1,W);break;default:}if(te)return;if(p&&!og(x,E,I)){L();return}if(!k&&v(x,E)){L();return}let se=!1;switch(f){case"top":{let G=P?ce/2:ce*4,K=P||N?r+G:r-G,J=P?r-G:N?r+G:r-G,ne=i+ce+1,me=N||P?R.bottom-ce:R.top,le=N?P?R.bottom-ce:R.top:R.bottom-ce;se=Un(x,E,K,ne,J,ne,R.left,me,R.right,le);break}case"bottom":{let G=P?ce/2:ce*4,K=P||N?r+G:r-G,J=P?r-G:N?r+G:r-G,ne=i-ce,me=N||P?R.top+ce:R.bottom,le=N?P?R.top+ce:R.bottom:R.top+ce;se=Un(x,E,K,ne,J,ne,R.left,me,R.right,le);break}case"left":{let G=O?ce/2:ce*4,K=O||H?i+G:i-G,J=O?i-G:H?i+G:i-G,ne=r+ce+1,me=H||O?R.right-ce:R.left,le=H?O?R.right-ce:R.left:R.right-ce;se=Un(x,E,me,R.top,le,R.bottom,ne,K,ne,J);break}case"right":{let G=O?ce/2:ce*4,K=O||H?i+G:i-G,J=O?i-G:H?i+G:i-G,ne=r-ce,me=H||O?R.left+ce:R.right,le=H?O?R.left+ce:R.right:R.left+ce;se=Un(x,E,ne,K,ne,J,me,R.top,le,R.bottom);break}default:}se?p||o.start(40,L):L()}};return n.__options={...e,blockPointerEvents:t},n}var vi=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Yt.startingStyle]="startingStyle",e[e.endingStyle=Yt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),qo=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),ng={[qo.popupOpen]:""},B_={[qo.popupOpen]:"",[qo.pressed]:""},rg={[vi.open]:""},ig={[vi.closed]:""},sg={[vi.anchorHidden]:""},pl={open(e){return e?ng:null}};var Ro={open(e){return e?rg:ig},anchorHidden(e){return e?sg:null}};function ml(e){return ao(19)?e:e?"true":void 0}var Ge=h(z(),1);var ag=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:n,placement:r,rects:i,platform:s,elements:a,middlewareData:d}=t,{element:c,padding:l=0,offsetParent:f="real"}=at(e,t)||{};if(c==null)return{};let p=In(l),m={x:o,y:n},u=Go(r),g=Uo(u),v=await s.getDimensions(c),_=u==="y",w=_?"top":"left",y=_?"bottom":"right",b=_?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[u]-m[u]-i.floating[g],x=m[u]-i.reference[u],E=f==="real"?await s.getOffsetParent?.(c):a.floating,T=a.floating[b]||i.floating[g];(!T||!await s.isElement?.(E))&&(T=a.floating[b]||i.floating[g]);let k=S/2-x/2,C=T/2-v[g]/2-1,j=Math.min(p[w],C),A=Math.min(p[y],C),L=j,I=T-v[g]-A,R=T/2-v[g]/2+k,N=Yo(L,R,I),H=!d.arrow&&ct(r)!=null&&R!==N&&i.reference[g]/2-(R({...ag(e),options:[e,t]});var cg=ni().fn,bl={name:"hide",async fn(e){let{width:t,height:o,x:n,y:r}=e.rects.reference,i=t===0&&o===0&&n===0&&r===0;return{data:{referenceHidden:(await cg(e)).data?.referenceHidden||i}}}};var Zo={sideX:"left",sideY:"top"},hl={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:n},elements:{floating:r},platform:i,strategy:s,placement:a}=e,d=ge(r),c=d.getComputedStyle(r);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:o,data:Zo};let f=await i.getOffsetParent?.(r),p={width:0,height:0};if(s==="fixed"&&d?.visualViewport)p={width:d.visualViewport.width,height:d.visualViewport.height};else if(f===d){let w=xe(r);p={width:w.documentElement.clientWidth,height:w.documentElement.clientHeight}}else await i.isElement?.(f)&&(p=await i.getDimensions(f));let m=Ee(a),u=t,g=o;m==="left"&&(u=p.width-(t+n.width)),m==="top"&&(g=p.height-(o+n.height));let v=m==="left"?"right":Zo.sideX,_=m==="top"?"bottom":Zo.sideY;return{x:u,y:g,data:{sideX:v,sideY:_}}}};function _l(e,t,o){let n=e==="inline-start"||e==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[t]}function wl(e,t,o){let{rects:n,placement:r}=e;return{side:_l(t,Ee(r),o),align:ct(r)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function yl(e){let{anchor:t,positionMethod:o="absolute",side:n="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:d=5,sticky:c=!1,arrowPadding:l=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:u,mounted:g,collisionAvoidance:v,shiftCrossAxis:_=!1,nodeId:w,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:S}=e,[x,E]=Ge.useState(null);!g&&x!==null&&E(null);let T=v.side||"flip",k=v.align||"flip",C=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,A=Y(j),L=j?A:t,I=ze(t),R=ze(g),H=so()==="rtl",P=x||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":H?"left":"right","inline-start":H?"right":"left"}[n],O=i==="center"?P:`${P}-${i}`,M=d,Z=1,W=n==="bottom"?Z:0,oe=n==="top"?Z:0,te=n==="right"?Z:0,se=n==="left"?Z:0;typeof M=="number"?M={top:M+W,right:M+se,bottom:M+oe,left:M+te}:M&&(M={top:(M.top||0)+W,right:(M.right||0)+se,bottom:(M.bottom||0)+oe,left:(M.left||0)+te});let G={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:M},K=Ge.useRef(null),J=ze(r),ne=ze(s),me=typeof r!="function"?r:0,le=typeof s!="function"?s:0,X=[];p&&X.push(p),X.push(Jr(ae=>{let Ie=wl(ae,n,H),ut=typeof J.current=="function"?J.current(Ie):J.current,qe=typeof ne.current=="function"?ne.current(Ie):ne.current;return{mainAxis:ut,crossAxis:qe,alignmentAxis:qe}},[me,le,H,n]));let pe=k==="none"&&T!=="shift",ue=!pe&&(c||_||T==="shift"),vt=T==="none"?null:ti({...G,padding:{top:M.top+Z,right:M.right+Z,bottom:M.bottom+Z,left:M.left+Z},mainAxis:!_&&T==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:C}),Te=pe?null:$r(ae=>{let Ie=xe(ae.elements.floating).documentElement;return{...G,rootBoundary:_?{x:0,y:0,width:Ie.clientWidth,height:Ie.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:ue,limiter:c||_?void 0:ei(ut=>{if(!K.current)return{};let{width:qe,height:yt}=K.current.getBoundingClientRect(),et=De(Ee(ut.placement)),Vt=et==="y"?qe:yt,io=et==="y"?M.left+M.right:M.top+M.bottom;return{offset:Vt/2+io/2}})}},[G,c,_,M,k]);T==="shift"||k==="shift"||i==="center"?X.push(Te,vt):X.push(vt,Te),X.push(oi({...G,apply({elements:{floating:ae},availableWidth:Ie,availableHeight:ut,rects:qe}){if(!R.current)return;let yt=ae.style;yt.setProperty("--available-width",`${Ie}px`),yt.setProperty("--available-height",`${ut}px`);let et=ge(ae).devicePixelRatio||1,{x:Vt,y:io,width:bn,height:br}=qe.reference,hr=(Math.round((Vt+bn)*et)-Math.round(Vt*et))/et,wr=(Math.round((io+br)*et)-Math.round(io*et))/et;yt.setProperty("--anchor-width",`${hr}px`),yt.setProperty("--anchor-height",`${wr}px`)}}),gl(ae=>({element:K.current||xe(ae.elements.floating).createElement("div"),padding:l,offsetParent:"floating"}),[l]),{name:"transformOrigin",fn(ae){let{elements:Ie,middlewareData:ut,placement:qe,rects:yt,y:et}=ae,Vt=Ee(qe),io=De(Vt),bn=K.current,br=ut.arrow?.x||0,hr=ut.arrow?.y||0,wr=bn?.clientWidth||0,ff=bn?.clientHeight||0,vr=br+wr/2,Us=hr+ff/2,pf=Math.abs(ut.shift?.y||0),mf=yt.reference.height/2,Io=typeof r=="function"?r(wl(ae,n,H)):r,gf=pf>Io,bf={top:`${vr}px calc(100% + ${Io}px)`,bottom:`${vr}px ${-Io}px`,left:`calc(100% + ${Io}px) ${Us}px`,right:`${-Io}px ${Us}px`}[Vt],hf=`${vr}px ${yt.reference.y+mf-et}px`;return Ie.floating.style.setProperty("--transform-origin",ue&&io==="y"&&gf?hf:bf),{}}},bl,y),D(()=>{!g&&u&&u.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,u]);let Ve=Ge.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:Ke,elements:He,x:no,y:dn,middlewareData:_e,update:ro,placement:B,context:F,isPositioned:he,floatingStyles:ke}=ui({rootContext:u,open:m?g:void 0,placement:O,middleware:X,strategy:o,whileElementsMounted:m?void 0:(...ae)=>Xo(...ae,Ve),nodeId:w,externalTree:S}),{sideX:kt,sideY:Lo}=_e.adaptiveOrigin||Zo,_t=he?o:"fixed",We=Ge.useMemo(()=>{let ae=y?{position:_t,[kt]:no,[Lo]:dn}:{position:_t,...ke};return he||(ae.opacity=0),ae},[y,_t,kt,no,Lo,dn,ke,he]),Pt=Ge.useRef(null);D(()=>{if(!g)return;let ae=I.current,Ie=typeof ae=="function"?ae():ae,qe=(vl(Ie)?Ie.current:Ie)||null||null;qe!==Pt.current&&(Ke.setPositionReference(qe),Pt.current=qe)},[g,Ke,L,I]),Ge.useEffect(()=>{if(!g)return;let ae=I.current;typeof ae!="function"&&vl(ae)&&ae.current!==Pt.current&&(Ke.setPositionReference(ae.current),Pt.current=ae.current)},[g,Ke,L,I]),Ge.useEffect(()=>{if(m&&g&&He.reference&&He.floating)return Xo(He.reference,He.floating,ro,Ve)},[m,g,He,ro,Ve]);let Ct=Ee(B),un=_l(n,Ct,H),fn=ct(B)||"center",pn=!!_e.hide?.referenceHidden;D(()=>{b&&g&&he&&E(Ct)},[b,g,he,Ct]);let mn=Ge.useMemo(()=>({position:"absolute",top:_e.arrow?.y,left:_e.arrow?.x}),[_e.arrow]),gn=_e.arrow?.centerOffset!==0;return Ge.useMemo(()=>({positionerStyles:We,arrowStyles:mn,arrowRef:K,arrowUncentered:gn,side:un,align:fn,physicalSide:Ct,anchorHidden:pn,refs:Ke,context:F,isPositioned:he,update:ro}),[We,mn,K,gn,un,fn,Ct,pn,Ke,F,he,ro])}function vl(e){return e!=null&&"current"in e}function Xn(e){return e==="starting"?Za:be}function xl(e,t,{styles:o,transitionStatus:n,props:r,refs:i,hidden:s,inert:a=!1}){let d={...o};return a&&(d.pointerEvents="none"),Ce("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:d},Xn(n),r],stateAttributesMapping:Ro})}var Rl=h(z(),1);var _i=Rl.forwardRef(function(t,o){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:s=!1,nativeButton:a=!0,style:d,...c}=t,{getButtonProps:l,buttonRef:f}=Ea({disabled:i,focusableWhenDisabled:s,native:a});return Ce("button",t,{state:{disabled:i},ref:[o,f],props:[c,l]})});var Le=h(z(),1),Cl=h(Mt(),1);var Sl=h(z(),1);function El(e){let[t,o]=Sl.useState({current:e,previous:null});return e!==t.current&&o({current:e,previous:t.current}),t.previous}var So=h(z(),1);function yi(e){let t=Ae(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=we(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n;return(zt(o)!==i||zt(n)!==s)&&(o=i,n=s),{width:o,height:n}}function kl(e){let{popupElement:t,positionerElement:o,content:n,mounted:r,onMeasureLayout:i,onMeasureLayoutComplete:s,side:a,direction:d}=e,c=mo(t,!0,!1),l=lo(),f=So.useRef(null),p=So.useRef(!0),m=So.useRef(Nt),u=Y(i),g=Y(s),v=So.useMemo(()=>{let _=a==="top",w=a==="left";return d==="rtl"?(_=_||a==="inline-end",w=w||a==="inline-end"):(_=_||a==="inline-start",w=w||a==="inline-start"),_?{position:"absolute",[a==="top"?"bottom":"top"]:"0",[w?"right":"left"]:"0"}:be},[a,d]);D(()=>{if(!r){m.current=Nt,p.current=!0,f.current=null;return}if(!t||!o)return;m.current=Tl(t,v),xi(t,"auto");let _=qn(t,"position","static"),w=qn(t,"transform","none"),y=qn(t,"scale","1"),b=Tl(o,{"--available-width":"max-content","--available-height":"max-content"});function S(){_(),w(),b()}function x(){S(),y()}if(u?.(),p.current||f.current===null){Kn(o,"max-content");let C=yi(t);return f.current=C,Kn(o,C),x(),g?.(null,C),p.current=!1,()=>{m.current(),m.current=Nt}}Kn(o,"max-content");let E=f.current,T=yi(t);f.current=T,xi(t,E),x(),g?.(E,T),Kn(o,T);let k=new AbortController;return l.request(()=>{xi(t,T),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},k.signal)}),()=>{k.abort(),l.cancel(),m.current(),m.current=Nt}},[n,t,o,c,l,r,u,g,v])}function qn(e,t,o){let n=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,n)}}function Tl(e,t){let o=[];for(let[n,r]of Object.entries(t))o.push(qn(e,n,r));return o.length?()=>{o.forEach(n=>n())}:Nt}function xi(e,t){let o=t==="auto"?"auto":`${t.width}px`,n=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",o),e.style.setProperty("--popup-height",n)}function Kn(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,n=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",o),e.style.setProperty("--positioner-height",n)}var Eo=h(Q(),1);function Al(e){let{store:t,side:o,cssVars:n,children:r}=e,i=so(),s=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),d=t.useState("open"),c=t.useState("payload"),l=t.useState("mounted"),f=t.useState("popupElement"),p=t.useState("positionerElement"),m=El(d?s:null),u=ug(a,c),g=Le.useRef(null),[v,_]=Le.useState(null),[w,y]=Le.useState(null),b=Le.useRef(null),S=Le.useRef(null),x=mo(b,!0,!1),E=lo(),[T,k]=Le.useState(null),[C,j]=Le.useState(!1);D(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let A=Y(()=>{b.current?.style.setProperty("animation","none"),b.current?.style.setProperty("transition","none"),S.current?.style.setProperty("display","none")}),L=Y(P=>{b.current?.style.removeProperty("animation"),b.current?.style.removeProperty("transition"),S.current?.style.removeProperty("display"),P&&k(P)}),I=Le.useRef(null);D(()=>{(!d||!l)&&(I.current=null)},[d,l]),D(()=>{if(s&&m&&s!==m&&I.current!==s&&g.current){_(g.current),j(!0);let P=dg(m,s);y(P),E.request(()=>{Cl.flushSync(()=>{j(!1)}),x(()=>{_(null),k(null),g.current=null})}),I.current=s}},[s,m,v,x,E]),D(()=>{let P=b.current;if(!P)return;let O=xe(P).createElement("div");for(let M of Array.from(P.childNodes))O.appendChild(M.cloneNode(!0));g.current=O});let R=v!=null,N;R?N=(0,Eo.jsxs)(Le.Fragment,{children:[(0,Eo.jsx)("div",{"data-previous":!0,inert:ml(!0),ref:S,style:{...T?{[n.popupWidth]:`${T.width}px`,[n.popupHeight]:`${T.height}px`}:null,position:"absolute"},"data-ending-style":C?void 0:""},"previous"),(0,Eo.jsx)("div",{"data-current":!0,ref:b,"data-starting-style":C?"":void 0,children:r},u)]}):N=(0,Eo.jsx)("div",{"data-current":!0,ref:b,children:r},u),D(()=>{let P=S.current;!P||!v||P.replaceChildren(...Array.from(v.childNodes))},[v]),kl({popupElement:f,positionerElement:p,mounted:l,content:c,onMeasureLayout:A,onMeasureLayoutComplete:L,side:o,direction:i});let H={activationDirection:lg(w),transitioning:R};return{children:N,state:H}}function lg(e){if(e)return`${Pl(e.horizontal,5,"right","left")} ${Pl(e.vertical,5,"down","up")}`}function Pl(e,t,o,n){return e>t?o:e<-t?n:""}function dg(e,t){let o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r={x:o.left+o.width/2,y:o.top+o.height/2},i={x:n.left+n.width/2,y:n.top+n.height/2};return{horizontal:i.x-r.x,vertical:i.y-r.y}}function ug(e,t){let[o,n]=Le.useState(0),r=Le.useRef(e),i=Le.useRef(t),s=Le.useRef(!1);return D(()=>{let a=r.current,d=i.current,c=e!==a,l=t!==d;c?(n(f=>f+1),s.current=!l):s.current&&l&&(n(f=>f+1),s.current=!1),r.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}var Zn=h(z(),1),Ol=h(Mt(),1);var Nl=h(Q(),1),Ll=Zn.forwardRef(function(t,o){let{children:n,container:r,className:i,render:s,style:a,...d}=t,{portalNode:c,portalSubtree:l}=Ur({container:r,ref:o,componentProps:t,elementProps:d});return!l&&!c?null:(0,Nl.jsxs)(Zn.Fragment,{children:[l,c&&Ol.createPortal(n,c)]})});var Qe={};At(Qe,{Arrow:()=>ql,Handle:()=>Qo,Popup:()=>Xl,Portal:()=>Wl,Positioner:()=>Ul,Provider:()=>Zl,Root:()=>Ml,Trigger:()=>jl,Viewport:()=>$l,createHandle:()=>ed});var gt=h(z(),1);var Qn=h(z(),1),Ri=Qn.createContext(void 0);function Ze(e){let t=Qn.useContext(Ri);if(t===void 0&&!e)throw new Error(Pe(72));return t}var Il=h(z(),1);var fg={...ll,disabled:q(e=>e.disabled),instantType:q(e=>e.instantType),isInstantPhase:q(e=>e.isInstantPhase),trackCursorAxis:q(e=>e.trackCursorAxis),disableHoverablePopup:q(e=>e.disableHoverablePopup),lastOpenChangeReason:q(e=>e.openChangeReason),closeOnClick:q(e=>e.closeOnClick),closeDelay:q(e=>e.closeDelay),hasViewport:q(e=>e.hasViewport)},To=class e extends vo{constructor(t,o,n=!1){let r=new jt,i={...pg(),...t};i.floatingRootContext=al(r,o,n),super(i,{popupRef:Il.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},fg)}setOpen=(t,o)=>{Jc(this,t,o,{extraState:{openChangeReason:o.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,ee(U.triggerPress,t))}static useStore(t,o){return Qc(t,(r,i)=>new e(o,r,i)).store}};function pg(){return{...sl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Jn=h(Q(),1),Ml=ci(function(t){let{disabled:o=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:a,onOpenChange:d,onOpenChangeComplete:c,handle:l,triggerId:f,defaultTriggerId:p=null,children:m}=t,u=To.useStore(l?.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:f});$c(u,r,n,p),u.useControlledProp("openProp",r),u.useControlledProp("triggerIdProp",f),u.useContextCallback("onOpenChange",d),u.useContextCallback("onOpenChangeComplete",c);let g=u.useState("open"),v=!o&&g,_=u.useState("activeTriggerId"),w=u.useState("mounted"),y=u.useState("payload");u.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),u.useSyncedValue("disabled",o),tl(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:S}=ol(v,u),x=u.useState("isInstantPhase"),E=u.useState("instantType"),T=u.useState("lastOpenChangeReason"),k=gt.useRef(null);D(()=>{g&&o&&u.setOpen(!1,ee(U.disabled))},[g,o,u]),D(()=>{S==="ending"&&T===U.none||S!=="ending"&&x?(E!=="delay"&&(k.current=E),u.set("instantType","delay")):k.current!==null&&(u.set("instantType",k.current),k.current=null)},[S,x,T,E,u]),D(()=>{v&&_==null&&u.set("payload",void 0)},[u,_,v]);let C=gt.useCallback(()=>{u.setOpen(!1,ee(U.imperativeAction))},[u]);gt.useImperativeHandle(a,()=>({unmount:b,close:C}),[b,C]);let j=v||w||!o&&s!=="none";return(0,Jn.jsxs)(Ri.Provider,{value:u,children:[j&&(0,Jn.jsx)(mg,{store:u,disabled:o,trackCursorAxis:s}),typeof m=="function"?m({payload:y}):m]})});function mg({store:e,disabled:t,trackCursorAxis:o}){let n=e.useState("floatingRootContext"),r=Xr(n,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=Gr(n,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),s=gt.useMemo(()=>ye(i.reference,r.reference),[i.reference,r.reference]),a=gt.useMemo(()=>ye(i.trigger,r.trigger),[i.trigger,r.trigger]),d=gt.useMemo(()=>ye(Zc,i.floating,r.floating),[i.floating,r.floating]);return nl(e,{activeTriggerProps:s,inactiveTriggerProps:a,popupProps:d}),null}var er=h(z(),1);var $n=h(z(),1),Si=$n.createContext(void 0);function Bl(){return $n.useContext(Si)}var Hl=(function(e){return e[e.popupOpen=qo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var Dl="data-base-ui-tooltip-trigger";function zl(e){if("composedPath"in e){let o=e.composedPath();for(let n=0;ng.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),G=pi(y,{enabled:!R}).reference,K=X=>{let pe=O.current,ue=zl(X),vt=te(ue),Te=b.current,Ve=Te&&ue&&ie(Te,ue);if(vt&&g.select("open")&&g.select("lastOpenChangeReason")===U.triggerHover){g.setOpen(!1,ee(U.triggerHover,X));return}if(pe&&!vt&&Ve&&!N.current&&!g.select("open")&&Te&&Rt(Z.current)){let Ke=()=>{!O.current&&!N.current&&!g.select("open")&&g.setOpen(!0,ee(U.triggerHover,X,Te))},He=W();He===0?(M.clear(),Ke()):M.start(He,Ke)}},J=g.useState("triggerProps",T);return Ce("button",t,{state:{open:w},ref:[o,E,b],props:[se,G,T||H!=="none"?J:void 0,{onMouseOver(X){K(X.nativeEvent)},onFocus(X){oe(zl(X.nativeEvent))&&X.preventBaseUIHandler()},onMouseLeave(){O.current=!1,M.clear(),Z.current=void 0},onPointerEnter(X){Z.current=X.pointerType},onPointerDown(X){Z.current=X.pointerType,g.set("closeOnClick",l),l&&!g.select("open")&&g.cancelPendingOpen(X.nativeEvent)},onClick(X){l&&!g.select("open")&&g.cancelPendingOpen(X.nativeEvent)},id:v,[Hl.triggerDisabled]:R?"":void 0,[Dl]:R?void 0:""},m],stateAttributesMapping:pl})});var Vl=h(z(),1);var tr=h(z(),1),Ei=tr.createContext(void 0);function Fl(){let e=tr.useContext(Ei);if(e===void 0)throw new Error(Pe(70));return e}var Ti=h(Q(),1),Wl=Vl.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t;return Ze().useState("mounted")||n?(0,Ti.jsx)(Ei.Provider,{value:n,children:(0,Ti.jsx)(Ll,{ref:o,...r})}):null});var nr=h(z(),1);var or=h(z(),1),ki=or.createContext(void 0);function ko(){let e=or.useContext(ki);if(e===void 0)throw new Error(Pe(71));return e}var Yl=h(Q(),1),Ul=nr.forwardRef(function(t,o){let{render:n,className:r,anchor:i,positionMethod:s="absolute",side:a="top",align:d="center",sideOffset:c=0,alignOffset:l=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:u=!1,disableAnchorTracking:g=!1,collisionAvoidance:v=Qa,style:_,...w}=t,y=Ze(),b=Fl(),S=y.useState("open"),x=y.useState("mounted"),E=y.useState("trackCursorAxis"),T=y.useState("disableHoverablePopup"),k=y.useState("floatingRootContext"),C=y.useState("instantType"),j=y.useState("transitionStatus"),A=y.useState("hasViewport"),L=yl({anchor:i,positionMethod:s,floatingRootContext:k,mounted:x,side:a,sideOffset:c,align:d,alignOffset:l,collisionBoundary:f,collisionPadding:p,sticky:u,arrowPadding:m,disableAnchorTracking:g,keepMounted:b,collisionAvoidance:v,adaptiveOrigin:A?hl:void 0}),I=nr.useMemo(()=>({open:S,side:L.side,align:L.align,anchorHidden:L.anchorHidden,instant:E!=="none"?"tracking-cursor":C}),[S,L.side,L.align,L.anchorHidden,E,C]),R=xl(t,I,{styles:L.positionerStyles,transitionStatus:j,props:w,refs:[o,y.useStateSetter("positionerElement")],hidden:!x,inert:!S||E==="both"||T});return(0,Yl.jsx)(ki.Provider,{value:L,children:R})});var Gl=h(z(),1);var bg={...Ro,...wa},Xl=Gl.forwardRef(function(t,o){let{render:n,className:r,style:i,...s}=t,a=Ze(),{side:d,align:c}=ko(),l=a.useState("open"),f=a.useState("instantType"),p=a.useState("transitionStatus"),m=a.useState("popupProps"),u=a.useState("floatingRootContext"),g=a.useState("disabled"),v=a.useState("closeDelay");Pn({open:l,ref:a.context.popupRef,onComplete(){l&&a.context.onOpenChangeComplete?.(!0)}}),bi(u,{enabled:!g,closeDelay:v});let _=a.useStateSetter("popupElement");return Ce("div",t,{state:{open:l,side:d,align:c,instant:f,transitionStatus:p},ref:[o,a.context.popupRef,_],props:[m,Xn(p),s],stateAttributesMapping:bg})});var Kl=h(z(),1);var ql=Kl.forwardRef(function(t,o){let{render:n,className:r,style:i,...s}=t,a=Ze(),{arrowRef:d,side:c,align:l,arrowUncentered:f,arrowStyles:p}=ko(),m=a.useState("open"),u=a.useState("instantType");return Ce("div",t,{state:{open:m,side:c,align:l,uncentered:f,instant:u},ref:[o,d],props:[{style:p,"aria-hidden":!0},s],stateAttributesMapping:Ro})});var Pi=h(z(),1);var Ci=h(Q(),1),Zl=function(t){let{delay:o,closeDelay:n,timeout:r=400}=t,i=Pi.useMemo(()=>({delay:o,closeDelay:n}),[o,n]),s=Pi.useMemo(()=>({open:o,close:n}),[o,n]);return(0,Ci.jsx)(Si.Provider,{value:i,children:(0,Ci.jsx)(Wr,{delay:s,timeoutMs:r,children:t.children})})};var Jl=h(z(),1);var Ql=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var hg={activationDirection:e=>e?{"data-activation-direction":e}:null},$l=Jl.forwardRef(function(t,o){let{render:n,className:r,style:i,children:s,...a}=t,d=Ze(),c=ko(),l=d.useState("instantType"),{children:f,state:p}=Al({store:d,side:c.side,cssVars:Ql,children:s}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return Ce("div",t,{state:m,ref:o,props:[a,{children:f}],stateAttributesMapping:hg})});var Qo=class{constructor(){this.store=new To}open(t){let o=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!o)throw new Error(Pe(81,t));this.store.setOpen(!0,ee(U.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,ee(U.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ed(){return new Qo}function bt(e){return Ce(e.defaultTagName??"div",e,e)}var nd=h(de(),1),Ai="data-wp-hash";function Oi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&vg(document)),e.__wpStyleRuntime}function wg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ai}]`))if(o.getAttribute(Ai)===t)return!0;return!1}function rd(e,t,o){if(!e.head)return;let n=Oi(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(wg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ai,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function vg(e){let t=Oi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)rd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function id(e,t){let o=Oi();o.styles.set(e,t);for(let n of o.documents.keys())rd(n,e,t)}typeof process>"u",id("a495f9d138",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var td={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",id("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var od={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Je=(0,nd.forwardRef)(function({variant:t="body-md",render:o,className:n,...r},i){return bt({render:o,defaultTagName:"span",ref:i,props:ye(r,{className:$(td.text,od.heading,od.p,td[t],n)})})});var ld=h(Q(),1),Ni="data-wp-hash";function Li(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&yg(document)),e.__wpStyleRuntime}function _g(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ni}]`))if(o.getAttribute(Ni)===t)return!0;return!1}function cd(e,t,o){if(!e.head)return;let n=Li(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(_g(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ni,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function yg(e){let t=Li();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)cd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function xg(e,t){let o=Li();o.styles.set(e,t);for(let n of o.documents.keys())cd(n,e,t)}typeof process>"u",xg("9db2873e7f","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");var sd={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},Ii=(0,ad.forwardRef)(function({intent:t="none",className:o,...n},r){return(0,ld.jsx)(Je,{ref:r,className:$(sd.badge,sd[`is-${t}-intent`],o),...n,variant:"body-sm"})});var rr=h(de(),1),dd=h(Ot(),1),fd=h(Q(),1);import{speak as Rg}from"@wordpress/a11y";var Mi="data-wp-hash";function Bi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Eg(document)),e.__wpStyleRuntime}function Sg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Mi}]`))if(o.getAttribute(Mi)===t)return!0;return!1}function ud(e,t,o){if(!e.head)return;let n=Bi(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Sg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Mi,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Eg(e){let t=Bi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)ud(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function ir(e,t){let o=Bi();o.styles.set(e,t);for(let n of o.documents.keys())ud(n,e,t)}typeof process>"u",ir("b74f1ac304",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var Jo={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"};typeof process>"u",ir("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var Tg={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",ir("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var kg={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"};typeof process>"u",ir("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var Pg={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},pd=(0,rr.forwardRef)(function({tone:t="brand",variant:o="solid",size:n="default",className:r,focusableWhenDisabled:i=!0,disabled:s,loading:a,loadingAnnouncement:d=(0,dd.__)("Loading"),children:c,...l},f){let p=$(Pg.button,Tg["box-sizing"],kg["outset-ring--focus-except-active"],o!=="unstyled"&&Jo.button,Jo[`is-${t}`],Jo[`is-${o}`],Jo[`is-${n}`],a&&Jo["is-loading"],r);return(0,rr.useEffect)(()=>{a&&d&&Rg(d)},[a,d]),(0,fd.jsx)(_i,{ref:f,className:p,focusableWhenDisabled:i,disabled:s??a,...l,children:c})});var wd=h(de(),1);var gd=h(de(),1),bd=h($t(),1),hd=h(Q(),1),eo=(0,gd.forwardRef)(function({icon:t,size:o=24,...n},r){return(0,hd.jsx)(bd.SVG,{ref:r,...t.props,...n,width:o,height:o})});var _d=h(Q(),1),Hi="data-wp-hash";function zi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ag(document)),e.__wpStyleRuntime}function Cg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Hi}]`))if(o.getAttribute(Hi)===t)return!0;return!1}function vd(e,t,o){if(!e.head)return;let n=zi(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Cg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Hi,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Ag(e){let t=zi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)vd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Og(e,t){let o=zi();o.styles.set(e,t);for(let n of o.documents.keys())vd(n,e,t)}typeof process>"u",Og("b74f1ac304",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var Ng={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"},Di=(0,wd.forwardRef)(function({className:t,icon:o,...n},r){return(0,_d.jsx)(eo,{ref:r,icon:o,className:$(Ng.icon,t),size:24,...n})});Di.displayName="Button.Icon";var sr=Object.assign(pd,{Icon:Di});var ar=h($t(),1),ji=h(Q(),1),Fi=(0,ji.jsx)(ar.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ji.jsx)(ar.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});var cr=h($t(),1),Vi=h(Q(),1),Wi=(0,Vi.jsx)(cr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Vi.jsx)(cr.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});var lr=h($t(),1),Yi=h(Q(),1),Ui=(0,Yi.jsx)(lr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Yi.jsx)(lr.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var dr=h($t(),1),Gi=h(Q(),1),Xi=(0,Gi.jsx)(dr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Gi.jsx)(dr.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var ur=h($t(),1),Ki=h(Q(),1),qi=(0,Ki.jsx)(ur.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Ki.jsx)(ur.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var yd=h(de(),1);function Zi(e,t,o){return(0,yd.cloneElement)(e??t,{children:o})}var Lg=h(Rd(),1);var Ed=h(Qi(),1),{lock:h4,unlock:Td}=(0,Ed.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/ui");function Ig(){let e=Lg;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return Td(e.privateApis).ThemeProvider}var kd=Ig();var Pd=h(de(),1),Ji="data-wp-hash";function $i(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Bg(document)),e.__wpStyleRuntime}function Mg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ji}]`))if(o.getAttribute(Ji)===t)return!0;return!1}function Cd(e,t,o){if(!e.head)return;let n=$i(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Mg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ji,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Bg(e){let t=$i();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Cd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Hg(e,t){let o=$i();o.styles.set(e,t);for(let n of o.documents.keys())Cd(n,e,t)}typeof process>"u",Hg("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var zg={stack:"_19ce0419607e1896__stack"},Dg={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Po=(0,Pd.forwardRef)(function({direction:t,gap:o,align:n,justify:r,wrap:i,render:s,...a},d){let c={gap:o&&Dg[o],alignItems:n,justifyContent:r,flexDirection:t,flexWrap:i};return bt({render:s,ref:d,props:ye(a,{style:c,className:zg.stack})})});var Kd=h(de(),1);var Vd=h(de(),1);var Id=h(de(),1);var ts="data-wp-hash";function os(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Fg(document)),e.__wpStyleRuntime}function jg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ts}]`))if(o.getAttribute(ts)===t)return!0;return!1}function Od(e,t,o){if(!e.head)return;let n=os(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(jg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ts,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Fg(e){let t=os();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Od(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Vg(e,t){let o=os();o.styles.set(e,t);for(let n of o.documents.keys())Od(n,e,t)}typeof process>"u",Vg("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var Ad={slot:"_11fc52b637ff8a7e__slot"},Nd="data-wp-compat-overlay-slot";function Wg(){return typeof document>"u"?null:document}function Yg(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var ht=null;function es(e){return e.setAttribute("aria-hidden","false"),e}function Ug(e){let t=e.createElement("div");return t.setAttribute(Nd,""),Ad.slot&&t.classList.add(Ad.slot),e.body.appendChild(t),t}function Ld(){if(typeof window>"u"||!Yg()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=Wg();if(!e||!e.body)return;if(ht&&ht.ownerDocument===e&&ht.isConnected)return es(ht);let t=e.querySelector(`[${Nd}]`);return t instanceof HTMLDivElement?(ht=es(t),ht):(ht?.isConnected&&ht.remove(),ht=es(Ug(e)),ht)}var Md=h(Q(),1),Bd=(0,Id.forwardRef)(function({container:t,...o},n){return(0,Md.jsx)(Qe.Portal,{container:t??Ld(),...o,ref:n})});var Hd=h(de(),1),jd=h(Q(),1),ns="data-wp-hash";function rs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Xg(document)),e.__wpStyleRuntime}function Gg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ns}]`))if(o.getAttribute(ns)===t)return!0;return!1}function zd(e,t,o){if(!e.head)return;let n=rs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Gg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ns,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Xg(e){let t=rs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)zd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Dd(e,t){let o=rs();o.styles.set(e,t);for(let n of o.documents.keys())zd(n,e,t)}typeof process>"u",Dd("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var Kg={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Dd("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var qg={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},Fd=(0,Hd.forwardRef)(function({align:t="center",className:o,side:n="top",sideOffset:r=4,...i},s){return(0,jd.jsx)(Qe.Positioner,{ref:s,align:t,side:n,sideOffset:r,...i,className:$(Kg["box-sizing"],qg.positioner,o)})});var $o=h(Q(),1),is="data-wp-hash";function ss(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Qg(document)),e.__wpStyleRuntime}function Zg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${is}]`))if(o.getAttribute(is)===t)return!0;return!1}function Wd(e,t,o){if(!e.head)return;let n=ss(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Zg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(is,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Qg(e){let t=ss();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Wd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Jg(e,t){let o=ss();o.styles.set(e,t);for(let n of o.documents.keys())Wd(n,e,t)}typeof process>"u",Jg("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var $g={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},eb={background:"#1e1e1e"},as=(0,Vd.forwardRef)(function({portal:t,positioner:o,children:n,className:r,...i},s){let a=(0,$o.jsx)(kd,{color:eb,children:(0,$o.jsx)(Qe.Popup,{ref:s,className:$($g.popup,r),...i,children:n})}),d=Zi(o,(0,$o.jsx)(Fd,{}),a);return Zi(t,(0,$o.jsx)(Bd,{}),d)});var Yd=h(de(),1),Ud=h(Q(),1),cs=(0,Yd.forwardRef)(function(t,o){return(0,Ud.jsx)(Qe.Trigger,{ref:o,...t})});var Gd=h(Q(),1);function ls(e){return(0,Gd.jsx)(Qe.Root,{...e})}var lt=h(Q(),1),ds="data-wp-hash";function us(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&nb(document)),e.__wpStyleRuntime}function ob(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ds}]`))if(o.getAttribute(ds)===t)return!0;return!1}function qd(e,t,o){if(!e.head)return;let n=us(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(ob(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ds,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function nb(e){let t=us();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)qd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function rb(e,t){let o=us();o.styles.set(e,t);for(let n of o.documents.keys())qd(n,e,t)}typeof process>"u",rb("c5cdafb1bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}");var Xd={"icon-button":"_28cfdc260e755391__icon-button",icon:"f1c70d719989a85a__icon"},fs=(0,Kd.forwardRef)(function({label:t,className:o,children:n,disabled:r,focusableWhenDisabled:i=!0,icon:s,size:a,shortcut:d,positioner:c,...l},f){let p=$(Xd["icon-button"],o);return(0,lt.jsxs)(ls,{children:[(0,lt.jsx)(cs,{ref:f,disabled:r&&!i,render:(0,lt.jsx)(sr,{...l,size:a,"aria-label":t,"aria-keyshortcuts":d?.ariaKeyShortcut,disabled:r,focusableWhenDisabled:i}),className:p,children:(0,lt.jsx)(eo,{icon:s,size:24,className:Xd.icon})}),(0,lt.jsxs)(as,{positioner:c,children:[t,d&&(0,lt.jsxs)(lt.Fragment,{children:[" ",(0,lt.jsx)("span",{"aria-hidden":"true",children:d.displayShortcut})]})]})]})});var Zd=h(de(),1),Qd=h(Ot(),1),Co=h(Q(),1),ps="data-wp-hash";function ms(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&sb(document)),e.__wpStyleRuntime}function ib(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ps}]`))if(o.getAttribute(ps)===t)return!0;return!1}function Jd(e,t,o){if(!e.head)return;let n=ms(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(ib(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ps,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function sb(e){let t=ms();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Jd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function pr(e,t){let o=ms();o.styles.set(e,t);for(let n of o.documents.keys())Jd(n,e,t)}typeof process>"u",pr("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var ab={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",pr("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var cb={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"};typeof process>"u",pr("e8e6a9be37",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');var fr={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};typeof process>"u",pr("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var lb={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},en=(0,Zd.forwardRef)(function({children:t,variant:o="default",tone:n="brand",openInNewTab:r=!1,render:i,className:s,...a},d){return bt({render:i,defaultTagName:"a",ref:d,props:ye(a,{className:$(lb.a,ab["box-sizing"],cb["outset-ring--focus-except-active"],o!=="unstyled"&&fr.link,o!=="unstyled"&&fr[`is-${n}`],o==="unstyled"&&fr["is-unstyled"],s),target:r?"_blank":void 0,children:(0,Co.jsxs)(Co.Fragment,{children:[t,r&&(0,Co.jsx)("span",{className:fr["link-icon"],role:"img","aria-label":(0,Qd.__)("(opens in a new tab)")})]})})})});var tn={};At(tn,{ActionButton:()=>xu,ActionLink:()=>Eu,Actions:()=>fu,CloseIcon:()=>hu,Description:()=>lu,Root:()=>tu,Title:()=>iu});var Ao=h(de(),1);import{speak as db}from"@wordpress/a11y";var Oo=h(Q(),1),bs="data-wp-hash";function hs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&fb(document)),e.__wpStyleRuntime}function ub(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${bs}]`))if(o.getAttribute(bs)===t)return!0;return!1}function $d(e,t,o){if(!e.head)return;let n=hs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(ub(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(bs,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function fb(e){let t=hs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)$d(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function eu(e,t){let o=hs();o.styles.set(e,t);for(let n of o.documents.keys())$d(n,e,t)}typeof process>"u",eu("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var pb={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",eu("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var gs={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},mb={neutral:null,info:Xi,warning:Fi,success:qi,error:Ui};function gb(e){return e==="error"?"assertive":"polite"}function bb(e){if(e){if(typeof e=="string")return e;try{return(0,Ao.renderToString)(e)}catch{return}}}function hb(e,t){let o=bb(e);(0,Ao.useEffect)(()=>{o&&db(o,t)},[o,t])}var tu=(0,Ao.forwardRef)(function({intent:t="neutral",children:o,icon:n,spokenMessage:r=o,politeness:i=gb(t),render:s,...a},d){hb(r,i);let c=n===null?null:n??mb[t],l=$(gs.notice,gs[`is-${t}`],pb["box-sizing"]);return bt({defaultTagName:"div",render:s,ref:d,props:ye({className:l,children:(0,Oo.jsxs)(Oo.Fragment,{children:[o,c&&(0,Oo.jsx)(eo,{className:gs.icon,icon:c})]})},a)})});var ou=h(de(),1);var ru=h(Q(),1),ws="data-wp-hash";function vs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&vb(document)),e.__wpStyleRuntime}function wb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ws}]`))if(o.getAttribute(ws)===t)return!0;return!1}function nu(e,t,o){if(!e.head)return;let n=vs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(wb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ws,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function vb(e){let t=vs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)nu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function _b(e,t){let o=vs();o.styles.set(e,t);for(let n of o.documents.keys())nu(n,e,t)}typeof process>"u",_b("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var yb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},iu=(0,ou.forwardRef)(function({className:t,...o},n){return(0,ru.jsx)(Je,{ref:n,variant:"heading-md",className:$(yb.title,t),...o})});var su=h(de(),1);var cu=h(Q(),1),_s="data-wp-hash";function ys(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Rb(document)),e.__wpStyleRuntime}function xb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${_s}]`))if(o.getAttribute(_s)===t)return!0;return!1}function au(e,t,o){if(!e.head)return;let n=ys(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(xb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(_s,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Rb(e){let t=ys();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)au(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Sb(e,t){let o=ys();o.styles.set(e,t);for(let n of o.documents.keys())au(n,e,t)}typeof process>"u",Sb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Eb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},lu=(0,su.forwardRef)(function({className:t,...o},n){return(0,cu.jsx)(Je,{ref:n,variant:"body-md",className:$(Eb.description,t),...o})});var du=h(de(),1);var xs="data-wp-hash";function Rs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&kb(document)),e.__wpStyleRuntime}function Tb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${xs}]`))if(o.getAttribute(xs)===t)return!0;return!1}function uu(e,t,o){if(!e.head)return;let n=Rs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Tb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(xs,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function kb(e){let t=Rs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)uu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Pb(e,t){let o=Rs();o.styles.set(e,t);for(let n of o.documents.keys())uu(n,e,t)}typeof process>"u",Pb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Cb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},fu=(0,du.forwardRef)(function({render:t,...o},n){return bt({defaultTagName:"div",render:t,ref:n,props:ye({className:Cb.actions},o)})});var pu=h(de(),1),mu=h(Ot(),1);var bu=h(Q(),1),Ss="data-wp-hash";function Es(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ob(document)),e.__wpStyleRuntime}function Ab(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ss}]`))if(o.getAttribute(Ss)===t)return!0;return!1}function gu(e,t,o){if(!e.head)return;let n=Es(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Ab(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ss,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Ob(e){let t=Es();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)gu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Nb(e,t){let o=Es();o.styles.set(e,t);for(let n of o.documents.keys())gu(n,e,t)}typeof process>"u",Nb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Lb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},hu=(0,pu.forwardRef)(function({className:t,icon:o=Wi,label:n=(0,mu.__)("Dismiss"),...r},i){return(0,bu.jsx)(fs,{...r,ref:i,className:$(Lb["close-icon"],t),variant:"minimal",size:"small",tone:"neutral",icon:o,label:n})});var vu=h(de(),1);var yu=h(Q(),1),Ts="data-wp-hash";function ks(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Mb(document)),e.__wpStyleRuntime}function Ib(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ts}]`))if(o.getAttribute(Ts)===t)return!0;return!1}function _u(e,t,o){if(!e.head)return;let n=ks(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Ib(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ts,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Mb(e){let t=ks();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)_u(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Bb(e,t){let o=ks();o.styles.set(e,t);for(let n of o.documents.keys())_u(n,e,t)}typeof process>"u",Bb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var wu={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},xu=(0,vu.forwardRef)(function({className:t,loading:o,loadingAnnouncement:n,variant:r,...i},s){return(0,yu.jsx)(sr,{...i,...o!==void 0?{loading:o,loadingAnnouncement:n??""}:{},ref:s,size:"compact",tone:"neutral",variant:r,className:$(wu["action-button"],wu[`is-action-button-${r}`],t)})});var Ru=h(de(),1);var Cs=h(Q(),1),Ps="data-wp-hash";function As(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&zb(document)),e.__wpStyleRuntime}function Hb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ps}]`))if(o.getAttribute(Ps)===t)return!0;return!1}function Su(e,t,o){if(!e.head)return;let n=As(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Hb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ps,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function zb(e){let t=As();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Su(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Db(e,t){let o=As();o.styles.set(e,t);for(let n of o.documents.keys())Su(n,e,t)}typeof process>"u",Db("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var jb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},Eu=(0,Ru.forwardRef)(function({className:t,render:o,...n},r){return(0,Cs.jsx)(Je,{ref:r,className:$(jb["action-link"],t),...n,variant:"body-md",render:(0,Cs.jsx)(en,{tone:"neutral",variant:"default",render:o})})});var Tu=h(de(),1),ku=h(Q(),1),Pu=(0,Tu.forwardRef)(({children:e,className:t,ariaLabel:o,as:n="div",...r},i)=>(0,ku.jsx)(n,{ref:i,className:$("admin-ui-navigable-region",t),"aria-label":o,role:"region",tabIndex:"-1",...r,children:e}));Pu.displayName="NavigableRegion";var Cu=Pu;var Ou=h(on(),1),{Fill:Nu,Slot:Lu}=(0,Ou.createSlotFill)("SidebarToggle");var $e=h(Q(),1),Os="data-wp-hash";function Ns(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Vb(document)),e.__wpStyleRuntime}function Fb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Os}]`))if(o.getAttribute(Os)===t)return!0;return!1}function Iu(e,t,o){if(!e.head)return;let n=Ns(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Fb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Os,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Vb(e){let t=Ns();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Iu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Wb(e,t){let o=Ns();o.styles.set(e,t);for(let n of o.documents.keys())Iu(n,e,t)}typeof process>"u",Wb("ddd9aab364","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var to={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function Mu({headingLevel:e=1,breadcrumbs:t,badges:o,visual:n,title:r,subTitle:i,actions:s,showSidebarToggle:a=!0}){let d=`h${e}`;return(0,$e.jsxs)(Po,{direction:"column",className:to.header,children:[(0,$e.jsxs)(Po,{className:to["header-content"],direction:"row",gap:"sm",justify:"space-between",children:[(0,$e.jsxs)(Po,{direction:"row",gap:"sm",align:"center",justify:"start",children:[a&&(0,$e.jsx)(Lu,{bubblesVirtually:!0,className:to["sidebar-toggle-slot"]}),n&&(0,$e.jsx)("div",{className:to["header-visual"],"aria-hidden":"true",children:n}),r&&(0,$e.jsx)(Je,{className:to["header-title"],render:(0,$e.jsx)(d,{}),variant:"heading-lg",children:r}),t,o]}),s&&(0,$e.jsx)(Po,{align:"center",className:to["header-actions"],direction:"row",gap:"sm",children:s})]}),i&&(0,$e.jsx)(Je,{render:(0,$e.jsx)("p",{}),variant:"body-md",className:to["header-subtitle"],children:i})]})}var nn=h(Q(),1),Is="data-wp-hash";function Ms(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ub(document)),e.__wpStyleRuntime}function Yb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Is}]`))if(o.getAttribute(Is)===t)return!0;return!1}function Bu(e,t,o){if(!e.head)return;let n=Ms(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Yb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Is,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Ub(e){let t=Ms();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Bu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Gb(e,t){let o=Ms();o.styles.set(e,t);for(let n of o.documents.keys())Bu(n,e,t)}typeof process>"u",Gb("ddd9aab364","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var Ls={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function Hu({headingLevel:e,breadcrumbs:t,badges:o,visual:n,title:r,subTitle:i,children:s,className:a,actions:d,ariaLabel:c,hasPadding:l=!1,showSidebarToggle:f=!0}){let p=$(Ls.page,a);return(0,nn.jsxs)(Cu,{className:p,ariaLabel:c??(typeof r=="string"?r:""),children:[(r||t||o||d||n)&&(0,nn.jsx)(Mu,{headingLevel:e,breadcrumbs:t,badges:o,visual:n,title:r,subTitle:i,actions:d,showSidebarToggle:f}),l?(0,nn.jsx)("div",{className:$(Ls.content,Ls["has-padding"]),children:s}):s]})}Hu.SidebarToggleFill=Nu;var Bs=Hu;var dt=h(on()),lf=h(rn()),df=h(de()),Tt=h(Ot()),uf=h(mr());import{privateApis as l0}from"@wordpress/connectors";var ju=h(Qi()),{lock:l3,unlock:No}=(0,ju.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/routes");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='09e9b056ea']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","09e9b056ea"),e.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 92% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 58% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 8% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 42% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page>p{color:#949494}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")),document.head.appendChild(e)}var cn=h(on()),Ws=h(mr()),ln=h(rn()),wt=h(de()),Xe=h(Ot()),rf=h(Hs()),sf=h(Wu());var gr=h(on()),js=h(de()),Qu=h(rn()),oo=h(Ot());import{__experimentalRegisterConnector as Xb,__experimentalConnectorItem as Zu,__experimentalDefaultConnectorSettings as Kb,__experimentalApplicationPasswordConnectorSettings as qb,privateApis as Zb}from"@wordpress/connectors";var zs=h(mr()),an=h(rn()),sn=h(de()),fe=h(Ot()),Yu=h(Hs());function Ds({file:e,settingName:t,connectorName:o,isInstalled:n,isActivated:r,keySource:i="none",initialIsConnected:s=!1}){let[a,d]=(0,sn.useState)(!1),[c,l]=(0,sn.useState)(!1),[f,p]=(0,sn.useState)(s),[m,u]=(0,sn.useState)(null),g=e?.replace(/\.php$/,""),v=g?.includes("/")?g.split("/")[0]:g,{derivedPluginStatus:_,canManagePlugins:w,currentApiKey:y,currentUsername:b,hasStoredCredentials:S,hasResolvedSettings:x,canInstallPlugins:E}=(0,an.useSelect)(K=>{let J=K(zs.store),me=J.getEntityRecord("root","site")?.[t],le=typeof me=="string"?me:"",X=typeof me=="object"&&me!==null?me:void 0,pe=X!==void 0?!!X.username&&!!X.password:!!le,ue=J.hasFinishedResolution("getEntityRecord",["root","site"]),vt=!!J.canUser("create",{kind:"root",name:"plugin"}),Te={currentApiKey:le,currentUsername:X?.username??"",hasStoredCredentials:pe,hasResolvedSettings:ue,canInstallPlugins:vt};if(!e)return{...Te,derivedPluginStatus:ue?"active":"checking",canManagePlugins:void 0};let Ve=J.getEntityRecord("root","plugin",g);if(!J.hasFinishedResolution("getEntityRecord",["root","plugin",g]))return{...Te,derivedPluginStatus:"checking",canManagePlugins:void 0};if(Ve){let no=Ve.status==="active"||Ve.status==="network-active";return{...Te,derivedPluginStatus:no?"active":"inactive",canManagePlugins:!0}}let He="not-installed";return r?He="active":n&&(He="inactive"),{...Te,derivedPluginStatus:He,canManagePlugins:!1}},[e,g,t,n,r]),T=m??_,k=w,C=T==="active"&&f||m==="active"&&S,{saveEntityRecord:j,invalidateResolution:A}=(0,an.useDispatch)(zs.store),{createSuccessNotice:L,createErrorNotice:I}=(0,an.useDispatch)(Yu.store),R=K=>j("root","site",{[t]:K},{throwOnError:!0}),N=()=>{L((0,fe.sprintf)((0,fe.__)("%s connected successfully."),o),{id:"connector-connect-success",type:"snackbar"})},H=()=>{L((0,fe.sprintf)((0,fe.__)("%s disconnected."),o),{id:"connector-disconnect-success",type:"snackbar"})},P=()=>{I((0,fe.sprintf)((0,fe.__)("Failed to disconnect %s."),o),{id:"connector-disconnect-error",type:"snackbar"})},O=async()=>{if(v){l(!0);try{await j("root","plugin",{slug:v,status:"active"},{throwOnError:!0}),u("active"),A("getEntityRecord",["root","site"]),d(!0),L((0,fe.sprintf)((0,fe.__)("Plugin for %s installed and activated successfully."),o),{id:"connector-plugin-install-success",type:"snackbar"})}catch{I((0,fe.sprintf)((0,fe.__)("Failed to install plugin for %s."),o),{id:"connector-plugin-install-error",type:"snackbar"})}finally{l(!1)}}},M=async()=>{if(e){l(!0);try{await j("root","plugin",{plugin:g,status:"active"},{throwOnError:!0}),u("active"),A("getEntityRecord",["root","site"]),d(!0),L((0,fe.sprintf)((0,fe.__)("Plugin for %s activated successfully."),o),{id:"connector-plugin-activate-success",type:"snackbar"})}catch{I((0,fe.sprintf)((0,fe.__)("Failed to activate plugin for %s."),o),{id:"connector-plugin-activate-error",type:"snackbar"})}finally{l(!1)}}};return{pluginStatus:T,canInstallPlugins:E,canActivatePlugins:k,isExpanded:a,setIsExpanded:d,isBusy:c,isConnected:C,currentApiKey:y,currentUsername:b,hasResolvedSettings:x,keySource:i,handleButtonClick:()=>{if(T==="not-installed"){if(E===!1)return;O()}else if(T==="inactive"){if(k===!1)return;M()}else d(!a)},getButtonLabel:()=>{if(c)return T==="not-installed"?(0,fe.__)("Installing\u2026"):(0,fe.__)("Activating\u2026");if(a)return(0,fe.__)("Cancel");if(C)return(0,fe.__)("Edit");switch(T){case"checking":return(0,fe.__)("Checking\u2026");case"not-installed":return(0,fe.__)("Install");case"inactive":return(0,fe.__)("Activate");case"active":return(0,fe.__)("Set up")}},saveApiKey:async K=>{let J=y;try{let le=(await R(K))?.[t];if(K&&(le===J||!le))throw new Error("It was not possible to connect to the provider using this key.");p(!0),N()}catch(ne){throw console.error("Failed to save API key:",ne),ne}},removeApiKey:async()=>{try{await R(""),p(!1),H()}catch(K){console.error("Failed to remove API key:",K),P()}},saveCredentials:async({username:K,applicationPassword:J})=>{try{let le=(await R({username:K,password:J}))?.[t];if(!le?.username||!le?.password)throw new Error((0,fe.__)("It was not possible to save these credentials."));p(!0),N()}catch(ne){throw console.error("Failed to save credentials:",ne),ne}},removeCredentials:async()=>{try{await R({username:"",password:""}),p(!1),H()}catch(K){console.error("Failed to remove credentials:",K),P()}}}}var Uu=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})),Gu=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",fill:"#D97757"})),Xu=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",fill:"#F0F0F0"}),React.createElement("path",{d:"M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",fill:"#949494"})),Ku=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("rect",{width:"44",height:"44",fill:"#357B49",rx:"6"}),React.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",clipRule:"evenodd"})),qu=()=>React.createElement("svg",{width:"40",height:"40",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-0)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-1)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-2)"}),React.createElement("defs",null,React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},React.createElement("stop",{stopColor:"#08B962"}),React.createElement("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},React.createElement("stop",{stopColor:"#F94543"}),React.createElement("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},React.createElement("stop",{stopColor:"#FABC12"}),React.createElement("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"}))));var{store:Qb}=No(Zb);function Ju(){try{return JSON.parse(document.getElementById("wp-script-module-data-options-connectors-wp-admin")?.textContent??"{}")}catch{return{}}}function Fs(){return Ju().connectors??{}}function $u(){return!!Ju().isFileModDisabled}var Jb={google:qu,openai:Uu,anthropic:Gu,akismet:Ku};function $b(e,t){if(t)return React.createElement("img",{src:t,alt:"",width:40,height:40});let o=Jb[e];return React.createElement(o||Xu,null)}var e0=()=>React.createElement("span",{style:{color:"#345b37",backgroundColor:"#eff8f0",padding:"4px 12px",borderRadius:"2px",fontSize:"13px",fontWeight:"var(--wpds-typography-font-weight-emphasis)",whiteSpace:"nowrap"}},(0,oo.__)("Connected")),t0=({slug:e})=>React.createElement(en,{href:(0,oo.sprintf)((0,oo.__)("https://wordpress.org/plugins/%s/"),e),openInNewTab:!0},(0,oo.__)("Learn more")),o0=()=>React.createElement(Ii,null,(0,oo.__)("Not available"));function ef({isConnected:e,showUnavailableBadge:t,pluginSlug:o,isExpanded:n,isBusy:r,pluginStatus:i,actionButtonRef:s,handleButtonClick:a,getButtonLabel:d}){return React.createElement(gr.__experimentalHStack,{spacing:3,expanded:!1},e&&React.createElement(e0,null),t&&(o?React.createElement(t0,{slug:o}):React.createElement(o0,null)),!t&&React.createElement(gr.Button,{ref:s,variant:n||e?"tertiary":"secondary",size:"compact",onClick:a,disabled:i==="checking"||r,isBusy:r,accessibleWhenDisabled:!0},d()))}function tf(e){let t=e?.replace(/\.php$/,"");return t?.includes("/")?t.split("/")[0]:t}function n0({name:e,description:t,logo:o,authentication:n,plugin:r}){let i=n?.method==="api_key"?n:void 0,s=i?.settingName??"",a=i?.credentialsUrl??void 0,d=tf(r?.file),{pluginStatus:c,canInstallPlugins:l,canActivatePlugins:f,isExpanded:p,setIsExpanded:m,isBusy:u,isConnected:g,currentApiKey:v,hasResolvedSettings:_,keySource:w,handleButtonClick:y,getButtonLabel:b,saveApiKey:S,removeApiKey:x}=Ds({file:r?.file,settingName:s,connectorName:e,isInstalled:r?.isInstalled,isActivated:r?.isActivated,keySource:i?.keySource,initialIsConnected:i?.isConnected}),E=w==="env"||w==="constant",T=c==="not-installed"&&l===!1||c==="inactive"&&f===!1,k=(0,js.useRef)(null);return React.createElement(Zu,{className:d?`connector-item--${d}`:void 0,logo:o,name:e,description:t,actionArea:React.createElement(ef,{isConnected:g,showUnavailableBadge:T,pluginSlug:d,isExpanded:p,isBusy:u,pluginStatus:c,actionButtonRef:k,handleButtonClick:y,getButtonLabel:b})},p&&c==="active"&&_&&React.createElement(Kb,{key:g?"connected":"setup",initialValue:E?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":v,helpUrl:a,readOnly:g||E,keySource:w,onRemove:E?void 0:async()=>{await x(),k.current?.focus()},onSave:async C=>{await S(C),m(!1),k.current?.focus()}}))}function r0({name:e,description:t,logo:o,authentication:n,plugin:r}){let i=n?.method==="application_password"?n:void 0,s=i?.settingName??"",a=i?.credentialsUrl??void 0,d=tf(r?.file),{pluginStatus:c,canInstallPlugins:l,canActivatePlugins:f,isExpanded:p,setIsExpanded:m,isBusy:u,isConnected:g,currentUsername:v,hasResolvedSettings:_,keySource:w,handleButtonClick:y,getButtonLabel:b,saveCredentials:S,removeCredentials:x}=Ds({file:r?.file,settingName:s,connectorName:e,isInstalled:r?.isInstalled,isActivated:r?.isActivated,keySource:i?.keySource,initialIsConnected:i?.isConnected}),E=w==="env"||w==="constant",T=(0,js.useRef)(null),k=c==="not-installed"&&l===!1||c==="inactive"&&f===!1;return React.createElement(Zu,{className:d?`connector-item--${d}`:void 0,logo:o,name:e,description:t,actionArea:React.createElement(ef,{isConnected:g,showUnavailableBadge:k,pluginSlug:d,isExpanded:p,isBusy:u,pluginStatus:c,actionButtonRef:T,handleButtonClick:y,getButtonLabel:b})},p&&c==="active"&&_&&React.createElement(qb,{key:g?"connected":"setup",initialUsername:E?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":v,helpUrl:a,readOnly:g||E,keySource:w,onRemove:E?void 0:async()=>{await x(),T.current?.focus()},onSave:async C=>{await S(C),m(!1),T.current?.focus()}}))}function of(){let e=Fs(),t=o=>o.replace(/[^a-z0-9-_]/gi,"-");for(let[o,n]of Object.entries(e)){if(o==="akismet"&&!n.plugin?.isInstalled)continue;let{authentication:r}=n,i=t(o),s={name:n.name,description:n.description,type:n.type,logo:$b(o,n.logoUrl),authentication:r,plugin:n.plugin},a=No((0,Qu.select)(Qb)).getConnector(i);r.method==="api_key"&&!a?.render?s.render=n0:r.method==="application_password"&&!a?.render&&(s.render=r0),Xb(i,s)}}function nf(){return React.createElement("div",{className:"ai-plugin-callout__decoration","aria-hidden":"true"},React.createElement("svg",{viewBox:"0 0 248 248",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",focusable:"false",style:{width:"100%",height:"100%"}},React.createElement("image",{href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQAElEQVR4AezdC3ojWW5tYflOzPbIbI/M9sh8+WdrdZ+KpiiKL5FB5KedwN7AeSFIpHRYmfX/PubXVGAqMBV4kQpMw3qRBzXbnApMBT4+pmHNq2AqMBV4mQpMw3qZR3X9RmeGqcCrV2Aa1qs/wdn/VOCNKjAN640e9hx1KvDqFZiG9epPcPY/FThWgZ1q07B2+mDnWFOBPVZgGtYen+qcaSqw0wpMw9rpg51jTQX2WIFpWMee6mhTganAU1ZgGtZTPpbZ1FRgKnCsAtOwjlVltKnAVOApKzAN6ykfy2zqcRWYlV6pAtOwXulpzV6nAm9egWlYb/4CmONPBV6pAtOwXulpve9e//Nw9P/7xL8d7Hy9aQWubFhvWrU59qMr8D+HBcPBna93rcA0rHd98q91bs3q3w9bBv7Bna93rMA0rHd86nPmqcCLVmAa1os+uF/Y9m8u6Q7rvw8bgLnDOhTiXb+mYb3rk3+tc//rYbsaVTjQP18amct4+h9hftt3BaZh7fv57v107rNg7+ec831WYBrWZyHGPHUF/vewu//6xNqg+HMRfyjMrb+edb5pWM/6ZGZfawX86Bc0qTU2/htVYBrWGz3sOepU4NUrMA3r1Z/g7H8q8EYVmIZ1h4c9U04FpgL3qcA0rPvUdWadCkwF7lCBaVh3KOpMORWYCtynAtOw7lPXmfVdKjDnfGgFpmE9tNyz2FRgKnBNBaZhXVO9GTsVmAo8tALTsB5a7llsKjAVuKYCv9uwrtn5jJ0KTAXergLTsN7ukc+BpwKvW4FpWK/77GbnU4G3q8A0rLd75L914Fl3KnB9BaZhXV/DmWEqMBV4UAWmYT2o0LPMVGAqcH0FpmFdX8OZYSowFfhrBe7GpmHdrbQz8VRgKnDrCkzDunVFZ76pwFTgbhWYhnW30s7EU4GpwK0rMA3r1hW9fr6ZYSowFfiiAtOwvijMyFOBqcDzVWAa1vM9k9nRVGAq8EUFpmF9UZiRpwKPqMCs8bMKTMP6Wb0meyowFfjFCkzD+sXiz9JTganAzyowDetn9ZrsqcBU4Bcr8NIN6xfrNktPBaYCv1CBaVi/UPRZciowFbisAtOwLqvbjJoKTAV+oQLTsH6h6LPkBRWYIVOBQwWmYR2KMF9TganAa1RgGtZrPKfZ5VRgKnCowDSsQxHmayowFXimCny9l2lYX9dmIlOBqcCTVWAa1pM9kNnOVGAq8HUFpmF9XZuJTAWmAk9WgWlYT/ZArt/OzDAV2G8FpmHt99nOyaYCu6vANKzdPdK7HOjfDrP+9yf4B/fP138efoeDma+pwP0rMA3r/jXewwqaVFjP8x8HAmIHd74eXIG3W24a1ts98pse+H8Os8HBzNdU4P4VmIZ1/xrvYQU/9v3L4SCwNqh/P2iwagdpvqYC96nANKz71HVmnQpMBe5QgXduWHco526n9B3W9tJ91fi7Pfwc7HkqMA3reZ7FM+/kXw+bc7EeDvTPV1z8jzC/TQXuWYFpWPes7sw9FZgK3LQC07BuWs7dTva/h5P91ye6YGfT2EP4eb9mZ/uowDSsfTzHe5/CHVXQqKzHbjX6YCpwtwpMw7pbaX808f8dsoN7oQOdr6nAVGBbgWlY24o8hvvEzXcnp1YTl3cq51ExTdRe7GldE6ev2vhTgbtV4KyGdbfV33diDeC7T9bE5T1LlezFntb94PRVG38qcLcKTMO6W2lPTuy/GPdfiJfED+6G6Lg8/m/Dnuxne7lOe5Y9/naNZv0HVGAa1gOKfMYSGkI4I/1XUp59f79SlFn0sRWYhvXYereaex/3PyunQT9iiePlPMbOKlOBJ67ANKzfeTiakvufVsdDmjgtPnYq8PYVmIb1Oy8B9z7uf06tLi7vVM7EpgJvVYFpWM/xuF1mB3dFz7Gr2cXOK/B6x5uG9RzPzH1VeI4dzS6mAk9YgWlYT/hQZktTganA8QpMwzpel1GnAlOBJ6zANKyLH8oMnApMBR5dgWlYj674rDcVmApcXIFpWBeXbgZOBaYCj67ANKxHV3zWe8UKzJ6fpALTsJ7kQcw2pgJTge8rMA3r+xpNxlRgKvAkFZiG9SQPYrYxFZgKfF+BRzSs73cxGVOBqcBU4IwKTMM6o0iTMhWYCjxHBaZhPcdzmF1MBaYCZ1RgGtYZRXrSFP9Wln/gD/htEwd/mTqNT4Nyj2ny+7/3sDgYh4NxNBYHcdrH4Tc8HOifL/E044hsmjgN0tj2Ko6DcfLE8EADcfmAg1w64IMXrcA0rNd5cN6Y3njrjnE4pvkHANP58iCNxQO+B3x11v84HA6c9+DO1ytWYBrW6zw1/6Df/FtZlz8vtYPLZ5iRv16BaVi//gjO3sD2zYb7F0mB30Q4aHBpfBqU68cjHPjl4iHNPy5oDljH4yBeLh7SxNN+Mr7cY+PFmpNtLf52/2suv9yx11TgF8ZOw/qFor/gkt7kKzrCJZox9xzf3GN3WIFpWK/xUN27hHbsuyIXyyBGZ/FAgzgrh7aO59PE5AQaiKfJ2WriNCiPPZabxsqBa8ebw9rAD9agmX+r0QcvVoFpWK/xwLzxvOFcGq87pof0OHtKE5MDLqpxwAMO4mksDfggjgMecBBPY2lsEKdBGouDOB5oEGdx4Ac8pLFpY1+sAtOwfuuBXb+uN/H1s9x2hm0zWH/8u+1KM9tbVmAa1ms8dj/SuEh2odyOXUSHtTGksadyjZETjuWm/e/BKc+4A/1g09iPw69j2kH+OHe8XHMF89GOjaeXx+LAD41nt5rcwYtVYBrWiz2wZbvehBoZ8IVYPNAgzuKw5vK32prLD8dy08xRHosDP5TLbrVtLg7lscbRWDzQIM7isObyaYMXrMA0rBd8aN9s2Y9lodQ4m/ZK1r7Duu80Np0f0n7ZzvK3qsA0rFtV8vHzeFP6r9+Bbwesy/lAgzgrh8YaC+t3I3SclRdoEGflbDU6TYwfaBBn5Ww1fN2nPB820ECcZiweaLDmyqGBcSunDV6sAtOwXuyBPWC73tTe9NulaNuLfhqsuY1nV13eOeONMRb4t4Q93HK+mevBFZiG9eCC33i5ay+S3efAui3fibjc3+o06625OH3VjKOZZ9V9aCB/1XC5q2YczTyrfq7vgt5YWMc076qN/2IVeIGG9WIVfdx2vSG9CaFVaRpDSI+zcuisxgDrHMXYFfLhO018m0eDrY6D2AoapNmjvUN7FcdDueLyQU762B1UYBrWDh7iHGEq8C4VmIa1vyfdJbTvNDqdi/Ww3g3JgfKe1TpT+2+/zpHGtne6HEgbu5MKTMPayYNcjuENC9sL7iXl765LaPi78MvOLZZ3dmc65/y3WG/meGAFpmE9sNhPuJQ7HhffT7i1i7fkTODy/eJJZuBzVmAa1nM+l2t21SW0S+fm4Qdv5lV/hR+dNNXt/p0jje1M6a9wrvY89swKTMM6s1AvnuZNHF7xKO092xnibNrYF6nAJduchnVJ1Z57jO8sQjt1aR3c8aS/inWe7f6dI43tLPSQNnYnFZiGtZMHuRzDhTOsl869gdkl9cOna7Bqz+g7i72H9hhnV00DU4O0sTupwDSsnTzIOcZU4B0qMA3rRZ/yiW27gAYX1aXxw3rf0wV9ec9qfeJ3bP9pbHv346NzqUHa2J1UYBrWTh7kcgwNKSR7E4e0V7LtnXU2e2fxQBvsvALTsHb+gD+P544nfEovZdo7u24cD6s+/k4rMA1rfw/WJTq4eO50/OANvtXjz2pdoLd/31HZp3OksTQQx1n89TEn+HsFpmH9vRRv6XjTw94O70w+Wdzbud7+PNOw9vcScLcDLqq/O52Lafgu75Xizu5M60X8K+1/9nqiAtOwThTnRUPerLD+SORTs+AN3dH4EH9W6zztv3PZdxrb3ukhbexOKrD/hrWTBzXHmApMBT4+pmHt71Xgwhn6TsQJXcIH9zs04AP/meE87b9z2Xca2/7pciBt7E4qMA1rJw9yOYY3LJxz6awRwDL85V1n96niOed/+cO+2wGmYb3bE//reXd21/PncJ3pnA8d/gyY316nAtOwXudZnbvTfzkkgovqg/vnix+8of+Ih9/SDu5Tf/nEr722fzaN7QDp8yNhFdmRnYa1o4d54ijexOFE2tOG2nu2jcbZtLE7rsA0rP09XN9ZhE7nniq440l/Fes82/07Rxr7KmeZfV5RgaVhXTHLDH2mCrhwhvXS2Zs7rHutEazaM/rO0v7Z9sgPac7kU8NpYlVkR3Ya1o4e5hzlLxWYS/e/lGMfZBrWPp7jeoouqNl0fljve3w3sl5Yl/9sVvM5tv80tj07kw8d2LSxO6nANKydPMjlGN6omhIk0wLt1dDe2c7F4uHVzjT7vaAC07AuKNoLDumeh33B7X/Yd/hYfqWxizzuXiswDWt/T9aFM6yXzvywvrnTnr0KPkRor76jsl/nSGNpII6z+GBHFZiGtaOHecFRvOnhgqFPPcSZfLL41Jt81Ob2tM40rD09zb+dxd0OuKj+m/L17y7c4euM14v4zsqZ1ov41zvF7PhoBaZhHS3LS4verOCN20F8ahY0s3Q+xJ/VOk/771z2ncauexeDVRt/BxWYhrWDhzhHmAq8SwWmYX3zpF8w7MIZ+k7EEVzCB/c7NOAD/5nhPO2/c9l3Gtv+6XIgbexOKjANaycPcjmGNyycc+msEcAy/OVdZ/ep4jnnf/nDvtsBpmG92xP/63nd88Bf1ddmzgPnfOjw2id9w91Pw9rfQ3cBDS6qOx0/eDNv9fizWp/4bffvHGlse0//+Y+EzTD2aSswDetpH81NN+ZNHG468YMma+/Zlo2zaWN3XIFpWPt7uL6zCJ0uzrrjSX+Utaa1gW9dFg+0r7Dm8strLJs2dscVmIa1v4frwhnWS2c8rCf26Rqs2j381mZrOCwO617pPghg24uckM6mseVqXs5kjrSxO6nA7RrWTgoyx3iaCmhIT7OZ2chzVGAa1nM8h1vuwgV1aN44u973uJyH8u5lfWJnbWh9Fg+tTXeJ7jultGPjxRrL4mCcM5kDH+yoAtOwdvQwP4/iDQve+J/SBx4+fuFXa7Pti8WBf2pbckK5bBp7avzEdlKBaVg7eZDfHMOPV+Gb1HPCP85pbbbB/BXpx+xXeV/px+YYbQcVmIa1g4e4OYILZ1gvnfnBm7wh8mDVil1jfcezzulSvPXFzC2eJk4DcTqLgzgN0tfxdHkgjrP4YEcVmIa1o4f5w6N4w/9wyFnp5tVgzkr+Iskc6yeHX6R9KV87/suJJ/C7FZiG9bv1v8fq7nbARfWp+eW4rIZTeT+NmdeFN/vTsfKNsyfAf4prx/90vb3nP9X5pmE91eO4yWY0C1h/JPKpWfCGbiE5sGrFrrHb+eyn9a1nbjZNnAbGirE4iJcrRhNPY2lAl8Pigx1VYBrWjh7mHGUqsPcKTMPa3xN24Qy+y+h0LtaD+x06Kwfwe8Ia9gTWtRaLgzjtK8hpoPtu7gAAEABJREFU/+Uan8Y2li4H0sbupALTsO77IH9jdm9YOOfS2uU4yL/3Xq0B6zo4nLPXddwp33zOdMs5T603sQdWYBrWA4s9Sz2kAu6u4LsPHR6ymVnkthWYhnXbej7DbC6gwUV1++EHb2Y6Kw/4tHvBj2fWgdZi29N3nwiKl2ucfbJpLA3SrYkPdlSBaVg7epgnjuJNHE6kPTzUnthTi4uvKPeYVuzhdha8fwWmYd2/xo9ewR0OrN9h8INYe+JD/FmtPR7bfxr7rHuffd2wAtOwbljMJ5nKJ2qwXjq7hA5tUxOQB/z0Z7TtnW2vLB7at+blU0PnShu7kwpMw9rJg5xjTAXeoQJP07DeodgPOqML6tCSx+56aC6rgV/uM1qf+NkjrPvDQ7rvsJxJDdLG7qQC07B28iCXY3jDgjdysjdwWHU+lPes1nnaP98+7TuNpQUxiI/dSQWmYe3kQX5zDPc94ZvUpwy3d3bdIB5WffydVmAa1v4erAtnWC+d+cEb3KlZecCnPQY/X8XFevvvOyx7TmObVRxn08bupALTsHbyIOcYf6mAZrZ+SvqX4JDXrcA0rNd9dl/t3N0NuKj+Kocux8U04HvBXs+1l+dz1TmmYV1Vvqcc7AIa1h+J/JWY4A3dxuXAqhV7Jus87d9+7c2e01ga0OWw+OBXK3Dbxadh3baeM9tUYCpwxwpMw7pjcR8wtbsaaCm+S/SQHmflpL+K9R2Ti3Ro/6zzhM4iJ8hJH7uDCkzDeu2H2Bvz0lNoBHDp+EeO03zCqXXLYU/lTewFKzAN66kf2rebc08D3yZ+kaBZXTP+i2lHngrcpwLTsO5T10fN6jIaWk/zwUN6nJWTzm457dmgsdo7tF8WD+05zspJH7uDCkzD2sFD3BzBmzQUirNpr2btPbT3OHtKKzb2xSswDet1H6A7Gt95AL+T4CFNPKTtwXZOtvPwgzNv9VUr9gx29nBGBaZhnVGkJ03xxvNXVoBvmyweaEC/9oLePM8EZ+qc63/Vnsa2Xw0MB+PSx75YBaZhvdgDm+1OBd65AtOwXvfpu7cJ6ynS2HTfYbiEhrQ9WH+tKHQe515Bx8vj0wYvWIG9NKwXLP3VW/bG04BAQzLhqtFpQQzir26dxbmB33mcO6SJywN++tgXq8A0rBd7YMt23cWERf5IYz/u+Mv8K1rqmFbsEfbY+se0R+xl1rhxBaZh3bigd5rOhfn2r6B4E9LBdw6WXjU67RZo3tYxZ5p1XGbTAA84GNf+jaMBH/iXwFhzs41vbTadxUF+uXScTRv7xBWYhvXED+fJtuZNvX4ad4vtmVMT+dFcS7Lxa7NcQme5144/a5FJul0FpmHdrpb3nMm/beXuBe65zqm5u7Q+lXMqZu+w5vjuZv2nYdbYOb753Fex5+Rvc6x/zfjtfMPvXIFpWHcu8I2m743lzdWUNG924NO9cfFAuwXMaw22+fDWWfeVxq65cmCdo/il1lywjrduKLbulb/ml7Nq4z9pBaZhPemDmW1NBaYCHx8fmyJMw9oU5AmoexXfBbBtpwtrNl2O+x9IK/8aay5Y57CGtcG6YiwO4jTAAw7iacbRrEGHNPq1MJc5oblop9Zfcxsz9gkrMA3r+R6KS2Twhv5ud3JCubg3aPyn1nhvYPanY3+abw245WW+ucwJ3+1HTvgud+JPUIFpWE/wEDZb6IJ9I59N3cnA2QM2ica6YGc3oaFTgd+twDSs363/sdV9d+Rymi2OhxqJ+FYr/285sZ9ZY829jtLAtmvJSRMvP41NE8fB/HQWB3HaLWAuc0LzrXu1Lp2VE2iDJ6/ANKwnf0Cf2/PmCp/SH5PG/hHu9Jv5V7TMJZoxp8YXu9SaP6xzpLHp/JA29okrMA3r+R6O7wZCu4uz7lzS+RC/hbVGaD5rpPHpbBpLA37AYc3lbzX5tHvBmtYAfuvgIU08jZ8+9gkqMA3rdx+CNwS0C74L95AeZ9PkuhwHfvq11hqhueJsa7E4uOg+lntMM47OGgvrePqtz2RO6wB/uz6dBvyAvwjeY5vTsH73OXvzwLFd+FHlmH5P7au93HPNY3PbBxyLjfbGFZiG9bsPvx891l1oVODTwnQ8rFoXxmLp11qX1qG57MUakMYP4sf0NPFy0+Ks+Kr7L9XVJu1aa43OxG8+fkizl2O5xcf+YgWmYf1i8Y8s7c1TE1rfsGmsnIbyIX6tNZd1Q/Ph1gY+XS4OaXQ84CCexqd9NV7s1rCWdYFvfrY9sTSQE/DBE1VgGtafh/FUv/lRKLSxOJt2L2uN0Bpx9pj2lX4q15gV5T7SHlv/mPbIPc1aJyowDetEce4c8qf4uX9dxCV08IZqa3yIX2vN1Tps87mExsG+6WuuOA3kBBzE04yjsWniNDA/ncVvAWtVa745WesEGsRZOTTg33JP5hz8sALTsH5YsCdL9yaCJ9vWVdvxiaEzsVdNdOPBmirceNqZ7icVmIb1k2rdNtcdSrh0Zn/iw6Xjn3GcS291YW+5P3PCpXO6iF/vui6dZ8ZdUYFpWFcU78qh3jzeAFDTofmELLREnJWTfmtrbmuE5rfHtPbKpomXm8amieNgHJ3FQZwGdJzFbwHnMifwzclaO9AgzsqhAR/4g1+qwDSsXyr8LDsVmAr8vALTsH5es0tGuJPxHQM0nu9iF8TpLB5oEGfl0G453lzmNLc1Ag3E0+RsNXEalMfiII7DT8Yfy01jzResA3FWDu3Y+mJygjyIs3Jo63g+bfALFfhpw/qFLe5iSZe1sF4k870hQgeNs6c0MTkBhziLAz/gIc1etppYmjge0uPiW00sTRwP6XHxrSaWJo6H9Dh7ShOTE3CIszjwAx7S7CVt7IMrMA3rwQWf5aYCU4HLKzAN6/La/WSky16XuGzj+tSJ1mUui4dy46wcuh9NcEhj8SAP4qwc2jreXmhicgINxNPk0I6Np5fH4nDp+NY6Nl7MGsE6EGfl0Na9prFygjyIs3Jo63h7oQ1+oQLTsH6h6J9LejOs+JQ/ztU+Dr/OzT2Wdxj+cUz/u/bxj1+rxi/CD+dq8s/NPZZ3yXjzGBdwiLM48AMe0ti0sQ+uwDSsxxTcn9DBXYhV2a1GT2Nx4AfjaOxWo6exOPCDcTQ2jaUBP+Cw5vK3mnwa8AMOxqTxaZDG4sAP5bJbbZuLQ3mscTQWBz4N8IBDnC2XxYM8iLP44M4VmIZ15wJ/Tu/CPXxKH3HWG4LO4oEGcRaHNZe/1dZcfpAHxqR1kbxqYvKAH+TQ2LTG09NYOV9p3uRy4KvxxoKc0JxsGisP+AGHNZe/1eTTgB9wMCbtu73KH9ypAtOw7lTYN53WG/tNj/7ix36R7U/DesyDcu+xwqr+6kkaHtLYn2ryjQs4xFkc+MFeaJDG4iCOAw78IL7VitHFV06Ls+I0wAMO4luNnsbiwA84xFk84OFczV7KdQEf0sbesQLTsO5Y3GVqnziFZD8SpfHp3jxpLA34QQ6NTbv3ePOfWkvcnqA8FgdxHPi0Y/unywlyaMak8WliaSwN+EEOjU271XjzmivggztXYBrWnQv8Ob0flcKn9BHPfnz+irOf0gc/fCy/0thkfjiliZXH4sAPOMSzNIizOPADDvEsDeIsDvyAQzxLgziLAz/gIY39qSbfuIBDnMUHd67ANKxbFPgfc3jh9u8u+ZO3iL/mEeTQXeJuNbE0Vh7wgxya+beaWBorD/hBDm0dby80sfJYGojjIId2bDxdTsDh0vGtdWy8WOuw1gF+kENb95rGlsfKA36QQ1vH2wtNrDyWFsTyx96wAtOwbljMmWoq8FkBDUyT+6RjblWBaVi3quQ/5nFfEv6hjvdOFfC3GrwG3unMDznrNKzbltmLtMtdfrN7AYd0eWn9aSyWxp4ab4wc4Mu9dLy9nBovbh1oLRYHceMBDziIpxlHY9PEaZDGOg9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4P/y8fFhLzSxNJa2Qnzl49+gAtOwblDEmWIqMBV4TAWmYV1XZ5er0Cz+JHZ/Afx0PJQvvtXE0thHjbcXa321vrj9gBy5q8angZyAg3jaT8Yfy01jm5O1DvCDHNqx9cXKY+UBP8ihreP5NLHyWBqI4yCHNrhRBaZhXV5IL0Yvyj41aiY6rH+FAw/liaex6fxwShMrj8WBH3CIs3jAwV62Gj1NHA/pcfGtJpYmjof0uPhWE0sTx0N6nD2lickJOMRZHPgBD2n2stXE0sRxSBt7owo8uGHdaNfPM417ivW/fH6enc1OpgI7rMA0rMsfqmblAtaPAM1C669qsOn8IIeu0W01epq5cUhjG8/iwJcHOPxkvHxjgR9wOLZXa5bHygN+wOHS8db4ajy9dVgc+KHx7Fbb5uJQHmscjcUDDeIsDny1B+NogxtVYBrWjQr5OY0XqAYG/E/5Aw8fn7/ibLksDvzP1A88fHz+Ek/jk9mtRk9jcTiWu2prLj/I+Wo8vTwWB364x3hzWwf4AQdrpvG3mhgN+AEHY9L4W02MBuIBH9ywAtOwLi+mOwovVOCbicUDDeKsHBqLA58GeMAhzpbL4sCXB3jAIc6Wy+JBHsRZHNZc/lZbc/kA8sAYHPhbjU4DfjiWm7bNxaGxbLksDnx5gAcc4my5LB7kQZzFYc3lb7U1V2zwgwpMw/pBsTapLtvD+sJMc/nakDT2mHZs/Fe5jTdGDvDpLB5oEGdxWHPb66qtufwg56vx9PJYHPjhHuPNbR3gBxysmcbfamI04AccjEm7Za3MPfhBBaZh/aBYkzoVmAr8bgWmYV1efxfJ27uKOCve7HhIE99qYmksDvyAQ5zFAx7O1ezlVK74qTnFHz3eeu2JxYEfcIizeMDDudotz9qaL28fdYBpWJdX2l2ET4KAbyYvfhzS6HiQQxNP49PE0lga8IMcGpt27/HmP7WWuD1BeSwO4jjwacf2T5cT5NCMSePTxNJYGvCDHBqbdu/x5j+1lrg9DS6owDSsC4r2OcS9xopP+eMSzZiPz1/88Cl9xNmP5RcekuPsKU1MTsAhzuLAX0GDSzRjjAV+wCHO4sBfQYNztZ/kHpvz0vHmMhb4AR9cUIFpWOcVzZ+K/qt2thEuYWnghUgXx0GcBngoV3yriaWxxgI/yKGta6Wx5bHygB/k0Nbx9kITK4+lgTgOcmjHxtPlBBwuHd9ax8aLtQ5rHeAHObR1r2lseaw84Ac5tHW8vdDEymNpII6DHNqx8fTBDyswDeu8gvlkyIuPPW/ED7Im9a0r4B98fOsC/OTw07DOq5aLVvcg7HkjJmsqcF4Fjv3TNOeNfMOsaVjnPXTf0rtIZRuBe7FBOouDeLl40Pjo4mnG0cTSWBrwgxyaMWl8mlgaSwN+kEMzJs1eaGJpLA3EcTCOxuIgTgM84CCeZhyNTROnQRprPzRxHIyjieGBBnFWDs0YHPg0MTzQIM7KoRmDg73QxPBAA/E042hsmjhtcEEFpmFdUFjYef8AAA5ZSURBVLQZMhW4uAIz8KoKTMP65/K5q4I14gI1FPOn5ilNvDnKY0+NF5MTHjW+vX61vnh7kmNfq8anQXksDuI4/GT8sdw01nzBOhBn5dCOrS8mJ8iDOCuHto7n08TkBBqIp8nZauI0KI/FB99UYBrWPxfIiwd6scngBxxcwKexNOCDOA54wEE8jaUBP+AQZ/GAh59q8htrLziksTiI44EGcXEc0lgcxPFAg7g4DmksDuJ4oEGcxYEf8JDG/lSTbxzYCw54wEE8jaUBH8RxwAM++KYC07C+KdCEpwJTgeepwGs1rMfUrctRl6qt6N84Cuk+MdxqYmnsT8fLNw7Wy1k8WEMeu9XoaSwO/GAcjU1jacAPOFx6VmPh0vH2+NV4evtkceCD+jWepQFfHuABhzhbLosHeRBncfjJWe0xGDv4pgLTsL4p0GfYvUP4lD7irBf0x+EXiwP/IP35wsMf4fBbnC2XxYF/SPvzhYc/wuE38TT+Qfpg09iPz1/88Cl9rLn8j8Mvtjz2IP354gc5RHar0dNYHPjBOBq71ehpLA78YByNTWNpwAdxHPg04G81Og34AQdj0vhbTYwG/HAsN00uP+CDbyowDeuvBXKf0IuNLcoPcujsVqOnsTjwg3E0dqvR01gc+ME4GrvV6GksDvxgHI1NY2nADzisufytJp8G/ICDMWl8GqSxOPBDuexW2+biUB5rHI3FgU8DPOAgnsbfamI04AccjEnjbzUxGvADDsYEfLBUYBrWUoyD64Xir1bAejmKh0Pan684axzRiw+HS8abx9hgToizOKy5/K225vKDPDAmrb2umpg84Ac5NDat8fQ0Fgd+MI72Ta0+5MsDfmg8m8bKA37AYc3lbzX5NOAHHIxJ66yrJiYP+EEOjU1rPD2NxUGuD30AHywVmIa1FONM17fwZ6ZO2gtWQMN4wW2/x5anYf31OWtGweVp0TQ2TRyHNH4QP6aniZebxqaxOPADDnEWD3g4V7OXU7nip+YUf/R467UnFgd+wCHO4gEP52r3Pqv9uMSH9jT2swLTsD4L8Wm8WPrUxo8sn/Kf/z15epp4Gp9+zng5co05NV5MHvBD49k0c8lbNTEa8IMcGpv23XjxU7ni5oTyWBzEceDTjq1PlxPk0IxJ49PE0lga8IMcGpt27/HmP7WWuD1BeSwO9ioH8HfA2WechvXPpfIjQSgaZ49pX+nHco9pl4w3j3EBhziLAz/gIY09V/tJ7rE5f2O8fVg34BBnceAHPKSx52o/yT025zq++Fvbd29Y/hSDXgR8l52wXoTioVzxtF5Y54wv99h4seZkW4sf5NDXtdLY8lh5wA9yaOt4e6GJlcfSQBwHObRj4+lyAg6Xjm+tY+PFWoe1DvCDHNq61zS2PFYeHFtrHS8u79rx5rBuwMH8adagDT4r8M4Ny4vBi2P91OazLGOmAlOBZ6zAOzcsz8PFJvBfFbPv21bAH2S3nXFmu1kF3rlhdbnJVlDf+vdXc9aL0DS2XHEcjKOzOIjTAA+tJ55mnDyxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaZDG2g9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4GAvNDE80EA8zTgamyZOgzQWB3EcjKMNPivwzg3rswRjpgJTgVepwDs3LH96bS83V43fcyyPTRPHoR8jVo1frpxwLDeNLY991Pj2+tX64vYDcuxr1fg0kBNwEE/7yfhjuWlsc7LWAX6QQzu2vlh5rDw4lrtqfHnXjjeHdQMO5k+zBg3o/3lwVu1A3+vrnRuWy3YPP/Tk4+JbTSxNHA/pcfGtJpYmjof0OHtKE5MTcIizOPADHtLsZauJpYnjIT0uvtXE0sTxkB4X32piaeJ4SI+zpzQxOQGHOIvDuhYe5ID4VqOnieMhPS6+1cTSxPGQ7gMioKe9nX3nhvV2D3sOfFYF3rohnFWhX0x654blr1j4hBBcoHoMLB5oEGdxuHS8Nb4aT7dGwCHONp7FgS8P8IBDnC2XxYM8iLM4XHpWY+HS8fb41Xi6PQYc4i6vG8+m8+VBGosDP5TLprHygB9wuPSsxsKx8XSX8OBHQ/wt8VYNa/OEPfjgBSnMbjV6GosDPxhHY7caPY3FgR+Mo7FpLA34AYc1l7/V5NOAH3AwJo2/1cRowA/HctO2uTg0li2XxYEvD/CAQ5wtl8WDPIiL48Df6qsmJg/4AYc1l7/V5NOAH47lpm1zcWgsu+aKvT3epWH5Nj/00HEvCuDTWTzQIM7KobE48LcanQb8cCw3bZuLQ2PZclkc+PIADzjE2XJZPMiDOIvDmsvfamsuP8gDY9L4W02MBvxwLDdtm4tDY9lyWRz48gAPOIin8beaGA34AQdj0vhbTYwG/ICDMWn8rSZGe0u8S8PqUxe2B+0CM6wvjDSXn8dyj2n3GG8fx9ZKs6Yc4NNZPNAgzuKw5nbWVVtz+UHOV+Pp5bE48MM9xpvbOsAPOFgzjb/VxGjgNYIDDsbg8Ey1sre3wrs0rLd6qHPYj4+PKcIuK/AuDauLUbYH6XLTHQGk8YP4MT1NvNy0OCt+TE8TlwdpLB5wiLM48AMe0thzNXs5lStuPjiWJ35MTxM3FtL4QfyYniZebhqbxuLADzjEWTzg4VzNXk7lip+aU/xW45vnbey7NCw/94ceLu6TJODTvdBwSKPjQQ5NPI1PE9tq9DRWDs0YHPg0MTzQIM7KobE43Hu8+a0D/K/Wp8sJOBiTxqcd2z+9PFYOzRgc+DQxPNAgzsqhsTjce7z5rQP8r9anywk4GJPGpx3bP/3t8C4N6+0e7Bx4KrDHChxvWPs7qYtU6E8sJ8T/7+BAOouD+CH85wsPLmCJ4mnG0dg0cRqksafGi8kJxkKclUNb1+LTxOQEGsRZOTRjcGivYniQB+JpxtHYNHEapLE4iONgHI3FQZwGeLAfmniacTSxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaW+Jd2lYXlzQJzxv+bDn0FOBV6/AuzQsdwCwXni++rOb/U8F3q4C79KwtpeYHjTNX3UA33LTWBzEaYAHjY8mnmYcjU0Tp0Eae2q8mJxgLMRZObR1LT5NTE6gQZyVQzPmXz4+PmjtVQwP8kA8zTgamyZOgzQWB3EcjKOxOIjTAA/2QxNPM44mlsbSgB/k0IxJ49PE0lga8IMcmjFp9kITS2NpII6DcTQWB3Ea4AEH8TTjaGyaOO0t8S4N6y0f7hx6KrC3Crxzw/KnlgtMcL/l2a4anwZywrHcNLa8a8ebx9rAD9agmX+riaWx8oAf5NDW8XyaWHksDcRxkLPVxGkgJ+AgnvaT8cdy09jmZK0D/CCHdmx9sfJYecAPcmjreD5NrDyWBuI4yNlq4jSQE3AQT2s8nQ/8t8U7NywX8F4AsL4AcBBPx0OaeBpLZ4M4DdJYHMTxQIM4iwM/4CGN/akm3ziwFxzwgIN4GksDPojjgAccxNNYGvBBHAc84CCextKAH3CIs3jAw081+Y21FxzSWBzE8UCDuDgOaSwO4niggb8WpJHR8Uvw8mPeuWG9/MObA7xVBXxg5N7srQ69Pew7Nyx/TccFJvRCYOmhesVZOXQvIBzSWDzIgzgrh3ZsPF1OwCHONp7FgS8PcHAuHPBQLpvGygN+wOHYXh8x3hpfrU9vnywO/NB4dqttc3EojzWOxuKBBnEWh3vUyrx+VPRM7QV/S7xzw/LgQw8f98IAfjoejmnlsuXxj+Ue08plG88ey01bc/l01jjg0wAPOIin8beaGA344Vhu2jYXh8ay5bI48OUBHnCIs+WyeJAHcRaHNZe/1dZcfpAHxqTxt5oYDfjhWG7aNheHxrJrrtjb450b1rGH735gRTlePEGczp7SxOQBPxhHY7caPY3FgR+Mo7FbjZ7G4sAPxtHYNJYG/IDDmsvfavJpwA84GJPG32piNOCHY7lp21wcGsuWy+LAlwd4wCHOlsviQR7EWRzWXP5WW3P5QR4YE/DBUoFpWEsxDq4XiotNcMl5kP588cMf4fBbnDXuIH2wOLg8/fj8hYdP6SPOGkdn8UCDOIvDmsvfamsuP8gDY9La66qJyQN+kENj0xpPT2Nx4AfjaGzatePNY07gBxzWtfhbTT4N+AEHY9La66qJyQN+kENj0xpPT2NxkOv1B3za4LMC07A+CzFmKjAVeP4KTMP66zNyZxBcnhZNY9PEcUjjB/Fjepp4uWlsGosDP+AQZ/GAh3M1ezmVK35qTvFHj7dee2Jx4Acc4iwe8PAX7UDoB/Pnix/ufVbruMQH/p8NzG9/q8A0rL/Vod+9QHwSA+4W0vEghy6exqeJbTV6GiuHZgwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC",width:"248",height:"248",style:{mixBlendMode:"multiply"}})))}var i0="ai",s0="ai-wp-admin",Vs="ai/ai",a0="https://wordpress.org/plugins/ai/",Ys=Object.values(Fs()),c0=Ys.some(e=>e.type==="ai_provider"),af=[];for(let e of Ys)e.type==="ai_provider"&&e.authentication.method==="api_key"&&af.push(e.authentication.settingName);function cf(){let[e,t]=(0,wt.useState)(!1),[o,n]=(0,wt.useState)(!1),r=(0,wt.useRef)(null);(0,wt.useEffect)(()=>{o&&r.current?.focus()},[o]);let i=(0,wt.useRef)(Ys.some(S=>S.type==="ai_provider"&&S.authentication.method==="api_key"&&S.authentication.isConnected)).current,{pluginStatus:s,canInstallPlugins:a,canManagePlugins:d,hasConnectedProvider:c}=(0,ln.useSelect)(S=>{let x=S(Ws.store),E=!!x.canUser("create",{kind:"root",name:"plugin"}),T=x.getEntityRecord("root","site"),k=i||af.some(A=>!!T?.[A]),C=x.getEntityRecord("root","plugin",Vs);return x.hasFinishedResolution("getEntityRecord",["root","plugin",Vs])?C?{pluginStatus:C.status==="active"?"active":"inactive",canInstallPlugins:E,canManagePlugins:!0,hasConnectedProvider:k}:{pluginStatus:"not-installed",canInstallPlugins:E,canManagePlugins:E,hasConnectedProvider:k}:{pluginStatus:"checking",canInstallPlugins:E,canManagePlugins:void 0,hasConnectedProvider:k}},[]),{saveEntityRecord:l}=(0,ln.useDispatch)(Ws.store),{createSuccessNotice:f,createErrorNotice:p}=(0,ln.useDispatch)(rf.store),m=async()=>{t(!0);try{await l("root","plugin",{slug:i0,status:"active"},{throwOnError:!0}),n(!0),f((0,Xe.__)("AI plugin installed and activated successfully."),{id:"ai-plugin-install-success",type:"snackbar"})}catch{p((0,Xe.__)("Failed to install the AI plugin."),{id:"ai-plugin-install-error",type:"snackbar"})}finally{t(!1)}},u=async()=>{t(!0);try{await l("root","plugin",{plugin:Vs,status:"active"},{throwOnError:!0}),n(!0),f((0,Xe.__)("AI plugin activated successfully."),{id:"ai-plugin-activate-success",type:"snackbar"})}catch{p((0,Xe.__)("Failed to activate the AI plugin."),{id:"ai-plugin-activate-error",type:"snackbar"})}finally{t(!1)}};if(!c0||s==="checking"||s==="active"&&i&&!o||s==="inactive"&&d===!1)return null;let g=s==="active"&&!c,v=s==="active"&&c&&(!i||o),_=s==="not-installed"||s==="inactive",w=s==="not-installed"&&a===!1,y=()=>v?(0,Xe.__)("The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. Learn more"):g?(0,Xe.__)("The AI plugin is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. Learn more"):(0,Xe.__)("The AI plugin can use your AI connectors to generate featured images, alt text, titles, excerpts and more. Learn more"),b=()=>s==="not-installed"?{label:e?(0,Xe.__)("Installing\u2026"):(0,Xe.__)("Install the AI plugin"),disabled:e,onClick:e?void 0:m}:{label:e?(0,Xe.__)("Activating\u2026"):(0,Xe.__)("Activate the AI plugin"),disabled:e,onClick:e?void 0:u};return React.createElement("div",{className:"ai-plugin-callout"},React.createElement("div",{className:"ai-plugin-callout__content"},React.createElement("p",null,(0,wt.createInterpolateElement)(y(),{strong:React.createElement("strong",null),a:React.createElement(cn.ExternalLink,{href:a0})})),!w&&(_?React.createElement(cn.Button,{variant:"primary",size:"compact",isBusy:e,disabled:b().disabled,accessibleWhenDisabled:!0,onClick:b().onClick},b().label):React.createElement(cn.Button,{ref:r,variant:"secondary",size:"compact",href:(0,sf.addQueryArgs)("options-general.php",{page:s0})},(0,Xe.__)("Control features in the AI plugin")))),React.createElement(nf,null))}var{store:d0}=No(l0);of();function u0(){let e=$u(),{connectors:t,canInstallPlugins:o,isAiPluginInstalled:n}=(0,lf.useSelect)(c=>{let l=c(uf.store),f=l.getEntityRecord("root","plugin","ai/ai");return{connectors:No(c(d0)).getConnectors(),canInstallPlugins:l.canUser("create",{kind:"root",name:"plugin"}),isAiPluginInstalled:!!f}},[]),r=t.filter(c=>c.render),i=Array.from(new Set(t.filter(c=>c.type==="ai_provider").map(c=>c.plugin?.file?.split("/")[0]).filter(c=>!!c))).sort(),s=new Set(t.filter(c=>c.plugin?.isInstalled).map(c=>c.plugin?.file?.split("/")[0]).filter(c=>!!c));n&&s.add("ai");let a=["ai",...i].filter(c=>!s.has(c)),d=r.length===0;return React.createElement(Bs,{title:(0,Tt.__)("Connectors"),subTitle:(0,Tt.__)("All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere.")},React.createElement("div",{className:`connectors-page${d?" connectors-page--empty":""}`},a.length>0&&(e||!o)&&React.createElement(tn.Root,{intent:"info",className:"connectors-page__file-mods-notice"},React.createElement(tn.Description,null,e?(0,Tt.__)("Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow."):(0,Tt.__)("You do not have permission to install plugins. Please ask a site administrator to install them for you."))),d?React.createElement(dt.__experimentalVStack,{alignment:"center",spacing:3,style:{maxWidth:480}},React.createElement(dt.__experimentalVStack,{alignment:"center",spacing:2},React.createElement(dt.__experimentalHeading,{level:2,size:15},(0,Tt.__)("No connectors yet")),React.createElement(dt.__experimentalText,{size:12},(0,Tt.__)("Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."))),React.createElement(dt.Button,{variant:"secondary",href:"plugin-install.php",__next40pxDefaultSize:!0},(0,Tt.__)("Learn more"))):React.createElement(dt.__experimentalVStack,{spacing:3},React.createElement(cf,null),React.createElement(dt.__experimentalVStack,{spacing:3,role:"list"},t.map(c=>c.render?React.createElement(c.render,{key:c.slug,slug:c.slug,name:c.name,description:c.description,type:c.type,logo:c.logo,authentication:c.authentication,plugin:c.plugin}):null))),o&&!e&&React.createElement("p",null,(0,df.createInterpolateElement)((0,Tt.__)("If the connector you need is not listed, search the plugin directory to see if a connector is available."),{a:React.createElement("a",{href:"plugin-install.php?s=connector&tab=search&type=tag"})}))))}function f0(){return React.createElement(u0,null)}var p0=f0;export{p0 as stage}; +var wf=Object.create;var _r=Object.defineProperty;var vf=Object.getOwnPropertyDescriptor;var _f=Object.getOwnPropertyNames;var yf=Object.getPrototypeOf,xf=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),At=(e,t)=>{for(var o in t)_r(e,o,{get:t[o],enumerable:!0})},Rf=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _f(t))!xf.call(e,r)&&r!==o&&_r(e,r,{get:()=>t[r],enumerable:!(n=vf(t,r))||n.enumerable});return e};var h=(e,t,o)=>(o=e!=null?wf(yf(e)):{},Rf(t||!e||!e.__esModule?_r(o,"default",{value:e,enumerable:!0}):o,e));var Ot=Re((g0,Gs)=>{Gs.exports=window.wp.i18n});var de=Re((h0,Ks)=>{Ks.exports=window.wp.element});var z=Re((w0,qs)=>{qs.exports=window.React});var Q=Re((E0,$s)=>{$s.exports=window.ReactJSXRuntime});var Mt=Re((Ah,Ta)=>{Ta.exports=window.ReactDOM});var Mc=Re(Ic=>{"use strict";var wo=z();function Tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var km=typeof Object.is=="function"?Object.is:Tm,Pm=wo.useState,Cm=wo.useEffect,Am=wo.useLayoutEffect,Om=wo.useDebugValue;function Nm(e,t){var o=t(),n=Pm({inst:{value:o,getSnapshot:t}}),r=n[0].inst,i=n[1];return Am(function(){r.value=o,r.getSnapshot=t,ri(r)&&i({inst:r})},[e,o,t]),Cm(function(){return ri(r)&&i({inst:r}),e(function(){ri(r)&&i({inst:r})})},[e]),Om(o),o}function ri(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!km(e,o)}catch{return!0}}function Lm(e,t){return t()}var Im=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Lm:Nm;Ic.useSyncExternalStore=wo.useSyncExternalStore!==void 0?wo.useSyncExternalStore:Im});var ii=Re((w1,Bc)=>{"use strict";Bc.exports=Mc()});var zc=Re(Hc=>{"use strict";var Dn=z(),Mm=ii();function Bm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hm=typeof Object.is=="function"?Object.is:Bm,zm=Mm.useSyncExternalStore,Dm=Dn.useRef,jm=Dn.useEffect,Fm=Dn.useMemo,Vm=Dn.useDebugValue;Hc.useSyncExternalStoreWithSelector=function(e,t,o,n,r){var i=Dm(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Fm(function(){function d(m){if(!c){if(c=!0,l=m,m=n(m),r!==void 0&&s.hasValue){var u=s.value;if(r(u,m))return f=u}return f=m}if(u=f,Hm(l,m))return u;var g=n(m);return r!==void 0&&r(u,g)?(l=m,u):(l=m,f=g)}var c=!1,l,f,p=o===void 0?null:o;return[function(){return d(t())},p===null?void 0:function(){return d(p())}]},[t,o,n,r]);var a=zm(e,i[0],i[1]);return jm(function(){s.hasValue=!0,s.value=a},[a]),Vm(a),a}});var jc=Re((_1,Dc)=>{"use strict";Dc.exports=zc()});var $t=Re((X2,md)=>{md.exports=window.wp.primitives});var Rd=Re((g4,xd)=>{xd.exports=window.wp.theme});var Qi=Re((b4,Sd)=>{Sd.exports=window.wp.privateApis});var on=Re((q5,Au)=>{Au.exports=window.wp.components});var rn=Re((a3,zu)=>{zu.exports=window.wp.data});var mr=Re((c3,Du)=>{Du.exports=window.wp.coreData});var Hs=Re((u3,Fu)=>{Fu.exports=window.wp.notices});var Wu=Re((f3,Vu)=>{Vu.exports=window.wp.url});function Xs(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;te();function Y(e){let t=Se(kf).current;return t.next=e,Tf(t.effect),t.trampoline}function kf(){let e={next:void 0,callback:Pf,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Pf(){}var Js=h(z(),1),Cf=()=>{},D=typeof document<"u"?Js.useLayoutEffect:Cf;var hn=h(z(),1),Af=hn.createContext(void 0);function so(){return hn.useContext(Af)?.direction??"ltr"}function Of(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set("code",n.toString()),r.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${n}; visit ${i} for the full message.`}}var Nf=Of("https://base-ui.com/production-error","Base UI"),Pe=Nf;var Wt=h(z(),1);function xr(e,t,o,n){let r=Se(ta).current;return Lf(r,e,t,o,n)&&oa(r,[e,t,o,n]),r.callback}function ea(e){let t=Se(ta).current;return If(t,e)&&oa(t,e),t.callback}function ta(){return{callback:null,cleanup:null,refs:[]}}function Lf(e,t,o,n,r){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==n||e.refs[3]!==r}function If(e,t){return e.refs.length!==t.length||e.refs.some((o,n)=>o!==t[n])}function oa(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let n=Array(t.length).fill(null);for(let r=0;r{for(let r=0;r=e}function Rr(e){if(!ra.isValidElement(e))return null;let t=e,o=t.props;return(ao(19)?o?.ref:t.ref)??null}function Bo(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Nt(){}var I0=Object.freeze([]),be=Object.freeze({});function ia(e,t){let o={};for(let n in e){let r=e[n];if(t?.hasOwnProperty(n)){let i=t[n](r);i!=null&&Object.assign(o,i);continue}r===!0?o[`data-${n.toLowerCase()}`]="":r&&(o[`data-${n.toLowerCase()}`]=r.toString())}return o}function sa(e,t){return typeof e=="function"?e(t):e}function aa(e,t){return typeof e=="function"?e(t):e}var Sr={};function ye(e,t,o,n,r){if(!o&&!n&&!r&&!e)return wn(t);let i=wn(e);return t&&(i=Ho(i,t)),o&&(i=Ho(i,o)),n&&(i=Ho(i,n)),r&&(i=Ho(i,r)),i}function ca(e){if(e.length===0)return Sr;if(e.length===1)return wn(e[0]);let t=wn(e[0]);for(let o=1;o=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Er(e){return typeof e=="function"}function da(e,t){return Er(e)?e(t):e??Sr}function zf(e,t){return t?e?(...o)=>{let n=o[0];if(fa(n)){let i=n;zo(i);let s=t(...o);return i.baseUIHandlerPrevented||e?.(...o),s}let r=t(...o);return e?.(...o),r}:ua(t):e}function ua(e){return e&&((...t)=>{let o=t[0];return fa(o)&&zo(o),e(...t)})}function zo(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Tr(e,t){return t?e?t+" "+e:t:e}function fa(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var kr=h(z(),1);function Ce(e,t,o={}){let n=t.render,r=Df(t,o);if(o.enabled===!1)return null;let i=o.state??be;return Vf(e,n,r,i)}function Df(e,t={}){let{className:o,style:n,render:r}=e,{state:i=be,ref:s,props:a,stateAttributesMapping:d,enabled:c=!0}=t,l=c?sa(o,i):void 0,f=c?aa(n,i):void 0,p=c?ia(i,d):be,m=c&&a?jf(a):void 0,u=c?Bo(p,m)??{}:be;return typeof document<"u"&&(c?Array.isArray(s)?u.ref=ea([u.ref,Rr(r),...s]):u.ref=xr(u.ref,Rr(r),s):xr(null,null)),c?(l!==void 0&&(u.className=Tr(u.className,l)),f!==void 0&&(u.style=Bo(u.style,f)),u):be}function jf(e){return Array.isArray(e)?ca(e):ye(void 0,e)}var Ff=Symbol.for("react.lazy");function Vf(e,t,o,n){if(t){if(typeof t=="function")return t(o,n);let r=ye(o,t.props);r.ref=o.ref;let i=t;return i?.$$typeof===Ff&&(i=Wt.Children.toArray(t)[0]),Wt.cloneElement(i,r)}if(e&&typeof e=="string")return Wf(e,o);throw new Error(Pe(8))}function Wf(e,t){return e==="button"?(0,kr.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,kr.createElement)("img",{alt:"",...t,key:t.key}):Wt.createElement(e,t)}var vn=h(z(),1);var pa=0;function Yf(e,t="mui"){let[o,n]=vn.useState(e),r=e||o;return vn.useEffect(()=>{o==null&&(pa+=1,n(`${t}-${pa}`))},[o,t]),r}var ma=Mo.useId;function Lt(e,t){if(ma!==void 0){let o=ma();return e??(t?`${t}-${o}`:o)}return Yf(e,t)}function ga(e){return Lt(e,"base-ui")}var U={};At(U,{cancelOpen:()=>wp,chipRemovePress:()=>ep,clearPress:()=>$f,closePress:()=>Qf,closeWatcher:()=>up,decrementPress:()=>np,disabled:()=>_p,drag:()=>gp,escapeKey:()=>dp,focusOut:()=>lp,imperativeAction:()=>Rp,incrementPress:()=>op,initial:()=>xp,inputBlur:()=>sp,inputChange:()=>rp,inputClear:()=>ip,inputPaste:()=>ap,inputPress:()=>cp,itemPress:()=>Zf,keyboard:()=>pp,linkPress:()=>Jf,listNavigation:()=>fp,missing:()=>yp,none:()=>Uf,outsidePress:()=>qf,pointer:()=>mp,scrub:()=>hp,siblingOpen:()=>vp,swipe:()=>Sp,trackPress:()=>tp,triggerFocus:()=>Kf,triggerHover:()=>Xf,triggerPress:()=>Gf,wheel:()=>bp,windowResize:()=>Ep});var Uf="none",Gf="trigger-press",Xf="trigger-hover",Kf="trigger-focus",qf="outside-press",Zf="item-press",Qf="close-press",Jf="link-press",$f="clear-press",ep="chip-remove-press",tp="track-press",op="increment-press",np="decrement-press",rp="input-change",ip="input-clear",sp="input-blur",ap="input-paste",cp="input-press",lp="focus-out",dp="escape-key",up="close-watcher",fp="list-navigation",pp="keyboard",mp="pointer",gp="drag",bp="wheel",hp="scrub",wp="cancel-open",vp="sibling-open",_p="disabled",yp="missing",xp="initial",Rp="imperative-action",Sp="swipe",Ep="window-resize";function ee(e,t,o,n){let r=!1,i=!1,s=n??be;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:o,...s}}var Cr=h(z(),1);var ba=h(z(),1),Tp=[];function co(e){ba.useEffect(e,Tp)}var _n=null,ah=globalThis.requestAnimationFrame,Pr=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let r=0;r=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},yn=new Pr,ft=class e{static create(){return new e}static request(t){return yn.request(t)}static cancel(t){return yn.cancel(t)}currentId=_n;request(t){this.cancel(),this.currentId=yn.request(()=>{this.currentId=_n,t()})}cancel=()=>{this.currentId!==_n&&(yn.cancel(this.currentId),this.currentId=_n)};disposeEffect=()=>this.cancel};function lo(){let e=Se(ft.create).current;return co(e.disposeEffect),e}function ha(e,t=!1,o=!1){let[n,r]=Cr.useState(e&&t?"idle":void 0),[i,s]=Cr.useState(e);return e&&!i&&(s(!0),r("starting")),!e&&i&&n!=="ending"&&!o&&r("ending"),!e&&!i&&n==="ending"&&r(void 0),D(()=>{if(!e&&i&&n!=="ending"&&o){let a=ft.request(()=>{r("ending")});return()=>{ft.cancel(a)}}},[e,i,n,o]),D(()=>{if(!e||t)return;let a=ft.request(()=>{r(void 0)});return()=>{ft.cancel(a)}},[t,e]),D(()=>{if(!e||!t)return;e&&i&&n!=="idle"&&r("starting");let a=ft.request(()=>{r("idle")});return()=>{ft.cancel(a)}},[t,e,i,n]),{mounted:i,setMounted:s,transitionStatus:n}}var Yt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),kp={[Yt.startingStyle]:""},Pp={[Yt.endingStyle]:""},wa={transitionStatus(e){return e==="starting"?kp:e==="ending"?Pp:null}};var po=h(z(),1);function xn(){return typeof window<"u"}function Gt(e){return Rn(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ot(e){var t;return(t=(Rn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rn(e){return xn()?e instanceof Node||e instanceof ge(e).Node:!1}function V(e){return xn()?e instanceof Element||e instanceof ge(e).Element:!1}function we(e){return xn()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function uo(e){return!xn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}function fo(e){let{overflow:t,overflowX:o,overflowY:n,display:r}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&r!=="inline"&&r!=="contents"}function va(e){return/^(table|td|th)$/.test(Gt(e))}function Do(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Cp=/transform|translate|scale|rotate|perspective|filter/,Ap=/paint|layout|strict|content/,Ut=e=>!!e&&e!=="none",Ar;function Sn(e){let t=V(e)?Ae(e):e;return Ut(t.transform)||Ut(t.translate)||Ut(t.scale)||Ut(t.rotate)||Ut(t.perspective)||!En()&&(Ut(t.backdropFilter)||Ut(t.filter))||Cp.test(t.willChange||"")||Ap.test(t.contain||"")}function _a(e){let t=tt(e);for(;we(t)&&!nt(t);){if(Sn(t))return t;if(Do(t))return null;t=tt(t)}return null}function En(){return Ar==null&&(Ar=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ar}function nt(e){return/^(html|body|#document)$/.test(Gt(e))}function Ae(e){return ge(e).getComputedStyle(e)}function jo(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(Gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||uo(e)&&e.host||ot(e);return uo(t)?t.host:t}function ya(e){let t=tt(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&fo(t)?t:ya(t)}function It(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let r=ya(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=ge(r);if(i){let a=Tn(s);return t.concat(s,s.visualViewport||[],fo(r)?r:[],a&&o?It(a):[])}else return t.concat(r,It(r,[],o))}function Tn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var kn=h(z(),1),Op=kn.createContext(void 0);function xa(e=!1){let t=kn.useContext(Op);if(t===void 0&&!e)throw new Error(Pe(16));return t}var Ra=h(z(),1);function Sa(e){let{focusableWhenDisabled:t,disabled:o,composite:n=!1,tabIndex:r=0,isNativeButton:i}=e,s=n&&t!==!1,a=n&&t===!1;return{props:Ra.useMemo(()=>{let c={onKeyDown(l){o&&t&&l.key!=="Tab"&&l.preventDefault()}};return n||(c.tabIndex=r,!i&&o&&(c.tabIndex=t?r:-1)),(i&&(t||s)||!i&&o)&&(c["aria-disabled"]=o),i&&(!t||a)&&(c.disabled=o),c},[n,o,t,s,a,i,r])}}function Ea(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:n=0,native:r=!0,composite:i}=e,s=po.useRef(null),a=xa(!0),d=i??a!==void 0,{props:c}=Sa({focusableWhenDisabled:o,disabled:t,composite:d,tabIndex:n,isNativeButton:r}),l=po.useCallback(()=>{let m=s.current;Or(m)&&d&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,d]);D(l,[l]);let f=po.useCallback((m={})=>{let{onClick:u,onMouseDown:g,onKeyUp:v,onKeyDown:_,onPointerDown:w,...y}=m;return ye({onClick(b){if(t){b.preventDefault();return}u?.(b)},onMouseDown(b){t||g?.(b)},onKeyDown(b){if(t||(zo(b),_?.(b),b.baseUIHandlerPrevented))return;let S=b.target===b.currentTarget,x=b.currentTarget,E=Or(x),T=!r&&Np(x),k=S&&(r?E:!T),C=b.key==="Enter",j=b.key===" ",A=x.getAttribute("role"),L=A?.startsWith("menuitem")||A==="option"||A==="gridcell";if(S&&d&&j){if(b.defaultPrevented&&L)return;b.preventDefault(),T||r&&E?(x.click(),b.preventBaseUIHandler()):k&&(u?.(b),b.preventBaseUIHandler());return}k&&(!r&&(j||C)&&b.preventDefault(),!r&&C&&u?.(b))},onKeyUp(b){if(!t){if(zo(b),v?.(b),b.target===b.currentTarget&&r&&d&&Or(b.currentTarget)&&b.key===" "){b.preventDefault();return}b.baseUIHandlerPrevented||b.target===b.currentTarget&&!r&&!d&&b.key===" "&&u?.(b)}},onPointerDown(b){if(t){b.preventDefault();return}w?.(b)}},r?{type:"button"}:{role:"button"},c,y)},[t,c,d,r]),p=Y(m=>{s.current=m,l()});return{getButtonProps:f,buttonRef:p}}function Or(e){return we(e)&&e.tagName==="BUTTON"}function Np(e){return!!(e?.tagName==="A"&&e?.href)}function re(e,t,o,n){return e.addEventListener(t,o,n),()=>{e.removeEventListener(t,o,n)}}function ze(e){let t=Se(Lp,e).current;return t.next=e,D(t.effect),t}function Lp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function xe(e){return e?.ownerDocument||document}var Ca=h(z(),1);var Pa=h(Mt(),1);function ka(e){return e==null?e:"current"in e?e.current:e}function mo(e,t=!1,o=!0){let n=lo();return Y((r,i=null)=>{n.cancel();let s=ka(e);if(s==null)return;let a=s,d=()=>{Pa.flushSync(r)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{i?.aborted||d()}).catch(()=>{if(o){i?.aborted||d();return}let l=a.getAnimations();!i?.aborted&&l.length>0&&l.some(f=>f.pending||f.playState!=="finished")&&c()})}if(t){let l=Yt.startingStyle;if(!a.hasAttribute(l)){n.request(c);return}let f=new MutationObserver(()=>{a.hasAttribute(l)||(f.disconnect(),c())});f.observe(a,{attributes:!0,attributeFilter:[l]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}n.request(c)})}function Pn(e){let{enabled:t=!0,open:o,ref:n,onComplete:r}=e,i=Y(r),s=mo(n,o,!1);Ca.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var Aa=h(z(),1);function Oa(e){let t=Aa.useRef(!0);t.current&&(t.current=!1,e())}var xt={};At(xt,{engine:()=>Br,env:()=>zr,os:()=>Ir,screenReader:()=>Hr});var Ir={};At(Ir,{android:()=>Ia,apple:()=>Lr,ios:()=>Nr,linux:()=>zp,mac:()=>Ma,windows:()=>Hp});function Ip(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Mp,platform:Bp,maxTouchPoints:Na}=Ip(),Xt=Mp.toLowerCase(),Kt=Bp.toLowerCase();var Nr=/^i(os$|p)/.test(Kt)||Kt==="macintel"&&Na>1,La="android",Ia=Kt===La||Xt.includes(La),Ma=!Nr&&Kt.startsWith("mac"),Hp=Kt.startsWith("win"),zp=!Ia&&/^(linux|chrome os)/.test(Kt),Lr=Ma||Nr;var Br={};At(Br,{blink:()=>jp,gecko:()=>Dp,webkit:()=>Mr});var Mr=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),Dp=!Mr&&Xt.includes("firefox"),jp=!Mr&&Xt.includes("chrom");var Hr={};At(Hr,{voiceOver:()=>Fp});var Fp=Lr;var zr={};At(zr,{jsdom:()=>Vp});var Vp=/jsdom|happydom/.test(Xt);var Fo=0,Ye=class e{static create(){return new e}currentId=Fo;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fo,o()},t)}isStarted(){return this.currentId!==Fo}clear=()=>{this.currentId!==Fo&&(clearTimeout(this.currentId),this.currentId=Fo)};disposeEffect=()=>this.clear};function rt(){let e=Se(Ye.create).current;return co(e.disposeEffect),e}var Oe=h(z(),1);function Ba(e){return"nativeEvent"in e}function Rt(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function Ha(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var Dr="data-base-ui-focusable";var jr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Cn(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ie(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&uo(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Me(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Bt(e,t){if(!V(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute("data-trigger-disabled");for(let[,n]of t.entries())if(ie(n,o))return!n.hasAttribute("data-trigger-disabled");return!1}function An(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function za(e){return e.matches("html,body")}function Da(e){return we(e)&&e.matches(jr)}function Fr(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${jr}`)!=null}function ja(e){if(!e||xt.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Wp(e,t){return t!=null&&!Rt(t)?0:typeof e=="function"?e():e}function St(e,t,o){let n=Wp(e,o);return typeof n=="number"?n:n?.[t]}function Vr(e){return typeof e=="function"?e():e}function On(e,t){return t||e==="click"||e==="mousedown"}function Fa(e){return e?.includes("mouse")&&e!=="mousedown"}var Va=h(Q(),1),Wa=Oe.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ye,currentIdRef:{current:null},currentContextRef:{current:null}});function Yp(e,t){e.current=t.current}function Wr(e){let{children:t,delay:o,timeoutMs:n=0}=e,r=Oe.useRef(o),i=Oe.useRef(o),s=Oe.useRef(null),a=Oe.useRef(null),d=rt();return D(()=>{if(i.current=o,!s.current){r.current=o;return}r.current={open:St(r.current,"open"),close:St(o,"close")}},[o,s,r,i]),(0,Va.jsx)(Wa.Provider,{value:Oe.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:i,currentIdRef:s,timeoutMs:n,currentContextRef:a,timeout:d}),[n,d]),children:t})}function Yr(e,t={open:!1}){let{open:o}=t,n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),i=Oe.useContext(Wa),{currentIdRef:s,delayRef:a,timeoutMs:d,initialDelayRef:c,currentContextRef:l,hasProvider:f,timeout:p}=i,[m,u]=Oe.useState(!1),g=Oe.useRef(o),v=Oe.useRef(!1);return D(()=>{g.current=o},[o]),D(()=>()=>{v.current=!0},[]),D(()=>{function _(){v.current||u(!1),l.current?.setIsInstantPhase(!1),s.current=null,l.current=null,a.current=c.current,p.clear()}if(s.current&&!o&&s.current===r){if(u(!1),d){let w=r;return p.start(d,()=>{n.select("open")||s.current&&s.current!==w||_()}),()=>{(g.current||s.current!==w)&&p.clear()}}_()}},[o,r,s,a,d,c,l,p,n]),D(()=>{if(!o)return;let _=l.current,w=s.current;p.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:u},s.current=r,a.current={open:0,close:St(c.current,"close")},w!==null&&w!==r?(u(!0),_?.setIsInstantPhase(!0),_?.onOpenChange(!1,ee(U.none))):(u(!1),_?.setIsInstantPhase(!1))},[o,r,n,s,a,c,l,p]),D(()=>()=>{if(s.current===r){if(l.current=null,!g.current)return;s.current=null,Yp(a,c),p.clear()}},[l,s,a,r,c,p]),Oe.useMemo(()=>({hasProvider:f,delayRef:a,isInstantPhase:m}),[f,a,m])}function it(...e){return()=>{for(let t=0;t({x:e,y:e}),Up={left:"right",right:"left",bottom:"top",top:"bottom"};function Yo(e,t,o){return Be(e,Ht(t,o))}function at(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function ct(e){return e.split("-")[1]}function Ln(e){return e==="x"?"y":"x"}function Uo(e){return e==="y"?"height":"width"}function De(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Go(e){return Ln(De(e))}function Xa(e,t,o){o===void 0&&(o=!1);let n=ct(e),r=Go(e),i=Uo(r),s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Vo(s)),[s,Vo(s)]}function Ka(e){let t=Vo(e);return[Nn(e),t,Nn(t)]}function Nn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Ya=["left","right"],Ua=["right","left"],Gp=["top","bottom"],Xp=["bottom","top"];function Kp(e,t,o){switch(e){case"top":case"bottom":return o?t?Ua:Ya:t?Ya:Ua;case"left":case"right":return t?Gp:Xp;default:return[]}}function qa(e,t,o,n){let r=ct(e),i=Kp(Ee(e),o==="start",n);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Nn)))),i}function Vo(e){let t=Ee(e);return Up[t]+e.slice(t.length)}function qp(e){return{top:0,right:0,bottom:0,left:0,...e}}function In(e){return typeof e!="number"?qp(e):{top:e,right:e,bottom:e,left:e}}function qt(e){let{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Et(e,t,o=!0){return e.filter(r=>r.parentId===t).flatMap(r=>[...!o||r.context?.open?[r]:[],...Et(e,r.id,o)])}function go(e){return`data-base-ui-${e}`}var Ue=h(z(),1),Ja=h(Mt(),1);var Za={style:{transition:"none"}};var Zp="data-base-ui-swipe-ignore",Qp="data-swipe-ignore",ww=`[${Zp}]`,vw=`[${Qp}]`;var Qa={fallbackAxisSide:"end"};var $a=h(Q(),1),Jp=Ue.createContext(null),$p=()=>Ue.useContext(Jp),em=go("portal");function Ur(e={}){let{ref:t,container:o,componentProps:n=be,elementProps:r}=e,i=Lt(),a=$p()?.portalNode,[d,c]=Ue.useState(null),[l,f]=Ue.useState(null),p=Y(v=>{v!==null&&f(v)}),m=Ue.useRef(null);D(()=>{if(o===null){m.current&&(m.current=null,f(null),c(null));return}if(i==null)return;let v=(o&&(Rn(o)?o:o.current))??a??document.body;if(v==null){m.current&&(m.current=null,f(null),c(null));return}m.current!==v&&(m.current=v,f(null),c(v))},[o,a,i]);let u=Ce("div",n,{ref:[t,p],props:[{id:i,[em]:""},r]});return{portalNode:l,portalSubtree:d&&u?Ja.createPortal(u,d):null}}var Zt=h(z(),1);function ec(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(n=>n(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var tm=h(Q(),1),om=Zt.createContext(null),nm=Zt.createContext(null),bo=()=>Zt.useContext(om)?.id||null,Dt=e=>{let t=Zt.useContext(nm);return e??t};var je=h(z(),1);function rm(e,t){let o=null,n=null,r=!1;return{contextElement:e||void 0,getBoundingClientRect(){let i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",c=i.width,l=i.height,f=i.x,p=i.y;return o==null&&t.x&&s&&(o=i.x-t.x),n==null&&t.y&&a&&(n=i.y-t.y),f-=o||0,p-=n||0,c=0,l=0,!r||d?(c=t.axis==="y"?i.width:0,l=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,p=a&&t.y!=null?t.y:p):r&&!d&&(l=t.axis==="x"?i.height:l,c=t.axis==="y"?i.width:c),r=!0,{width:c,height:l,x:f,y:p,top:p,right:f+c,bottom:p+l,left:f}}}}function tc(e){return e!=null&&e.clientX!=null}function Gr(e,t={}){let{enabled:o=!0,axis:n="both"}=t,r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),a=r.useState("domReferenceElement"),d=r.context.dataRef,c=je.useRef(!1),l=je.useRef(null),[f,p]=je.useState(),[m,u]=je.useState([]),g=Y(b=>{r.set("positionReference",b)}),v=Y((b,S,x)=>{c.current||d.current.openEvent&&!tc(d.current.openEvent)||r.set("positionReference",rm(x??a,{x:b,y:S,axis:n,dataRef:d,pointerType:f}))}),_=Y(b=>{i?l.current||(v(b.clientX,b.clientY,b.currentTarget),u([])):v(b.clientX,b.clientY,b.currentTarget)}),w=Rt(f)?s:i;je.useEffect(()=>{if(!o){g(a);return}if(!w)return;function b(){l.current?.(),l.current=null}let S=ge(s);function x(E){let T=Me(E);ie(s,T)?b():v(E.clientX,E.clientY)}return!d.current.openEvent||tc(d.current.openEvent)?l.current=re(S,"mousemove",x):g(a),b},[w,o,s,d,a,r,v,g,m]),je.useEffect(()=>()=>{r.set("positionReference",null)},[r]),je.useEffect(()=>{o&&!s&&(c.current=!1)},[o,s]),je.useEffect(()=>{!o&&i&&(c.current=!0)},[o,i]);let y=je.useMemo(()=>{function b(S){p(S.pointerType)}return{onPointerDown:b,onPointerEnter:b,onMouseMove:_,onMouseEnter:_}},[_]);return je.useMemo(()=>o?{reference:y,trigger:y}:{},[o,y])}var Fe=h(z(),1);function im(){return!1}function sm(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Xr(e,t={}){let{enabled:o=!0,escapeKey:n=!0,outsidePress:r=!0,outsidePressEvent:i="sloppy",referencePress:s=im,bubbles:a,externalTree:d}=t,c="rootStore"in e?e.rootStore:e,l=c.useState("open"),f=c.useState("floatingElement"),{dataRef:p}=c.context,m=Dt(d),u=Y(typeof r=="function"?r:()=>!1),g=typeof r=="function"?u:r,v=g!==!1,_=Y(()=>i),{escapeKey:w,outsidePress:y}=sm(a),b=Fe.useRef(!1),S=Fe.useRef(!1),x=Fe.useRef(!1),E=Fe.useRef(!1),T=Fe.useRef(""),k=Fe.useRef(null),C=rt(),j=rt(),A=Y(()=>{j.clear(),p.current.insideReactTree=!1}),L=Y(W=>{let oe=p.current.floatingContext?.nodeId;return(m?Et(m.nodesRef.current,oe):[]).some(se=>se.context?.open&&!se.context.dataRef.current[W])}),I=Y(W=>An(W,c.select("floatingElement"))||An(W,c.select("domReferenceElement"))),R=Y(W=>{s()&&c.setOpen(!1,ee(U.triggerPress,W.nativeEvent))}),N=Y(W=>{if(!l||!o||!n||W.key!=="Escape"||E.current||!w&&L("__escapeKeyBubbles"))return;let oe=Ba(W)?W.nativeEvent:W,te=ee(U.escapeKey,oe);c.setOpen(!1,te),te.isCanceled||W.preventDefault(),!w&&!te.isPropagationAllowed&&W.stopPropagation()}),H=Y(()=>{p.current.insideReactTree=!0,j.start(0,A)}),P=Y(W=>{if(!l||!o||W.button!==0)return;let oe=Me(W.nativeEvent);ie(c.select("floatingElement"),oe)&&(b.current||(b.current=!0,S.current=!1))}),O=Y(W=>{!l||!o||(W.defaultPrevented||W.nativeEvent.defaultPrevented)&&b.current&&(S.current=!0)});Fe.useEffect(()=>{if(!l||!o)return;p.current.__escapeKeyBubbles=w,p.current.__outsidePressBubbles=y;let W=new Ye,oe=new Ye;function te(){W.clear(),E.current=!0}function se(){W.start(xt.engine.webkit?5:0,()=>{E.current=!1})}function G(){x.current=!0,oe.start(0,()=>{x.current=!1})}function K(){b.current=!1,S.current=!1}function J(){let B=T.current,F=B==="pen"||!B?"mouse":B,he=_(),ke=typeof he=="function"?he():he;return typeof ke=="string"?ke:ke[F]}function ne(B){let F=J();return F==="intentional"&&B.type!=="click"||F==="sloppy"&&B.type==="click"}function me(B){let F=p.current.floatingContext?.nodeId,he=m&&Et(m.nodesRef.current,F).some(ke=>An(B,ke.context?.elements.floating));return I(B)||he}function le(B){if(ne(B)){B.type!=="click"&&!I(B)&&(oe.clear(),x.current=!1),A();return}if(p.current.insideReactTree){A();return}let F=Me(B),he=`[${go("inert")}]`,ke=V(F)?F.getRootNode():null,kt=Array.from((uo(ke)?ke:xe(c.select("floatingElement"))).querySelectorAll(he)),Lo=c.context.triggerElements;if(F&&(Lo.hasElement(F)||Lo.hasMatchingElement(We=>ie(We,F))))return;let _t=V(F)?F:null;for(;_t&&!nt(_t);){let We=tt(_t);if(nt(We)||!V(We))break;_t=We}if(!(kt.length&&V(F)&&!za(F)&&!ie(F,c.select("floatingElement"))&&kt.every(We=>!ie(_t,We)))){if(we(F)&&!("touches"in B)){let We=nt(F),Pt=Ae(F),Ct=/auto|scroll/,un=We||Ct.test(Pt.overflowX),fn=We||Ct.test(Pt.overflowY),pn=un&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,mn=fn&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,gn=Pt.direction==="rtl",ae=mn&&(gn?B.offsetX<=F.offsetWidth-F.clientWidth:B.offsetX>F.clientWidth),Ie=pn&&B.offsetY>F.clientHeight;if(ae||Ie)return}if(!me(B)){if(J()==="intentional"&&x.current){oe.clear(),x.current=!1;return}typeof g=="function"&&!g(B)||L("__outsidePressBubbles")||(c.setOpen(!1,ee(U.outsidePress,B)),A())}}}function X(B){J()!=="sloppy"||B.pointerType==="touch"||!c.select("open")||!o||I(B)||le(B)}function pe(B){if(J()!=="sloppy"||!c.select("open")||!o||I(B))return;let F=B.touches[0];F&&(k.current={startTime:Date.now(),startX:F.clientX,startY:F.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},C.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function ue(B,F){let he=Me(B);if(!he)return;let ke=re(he,B.type,()=>{F(B),ke()})}function vt(B){T.current="touch",ue(B,pe)}function Te(B){C.clear(),B.type==="pointerdown"&&(T.current=B.pointerType),!(B.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)&&ue(B,F=>{F.type==="pointerdown"?X(F):le(F)})}function Ve(B){if(!b.current)return;let F=S.current;if(K(),J()==="intentional"){if(B.type==="pointercancel"){F&&G();return}if(!me(B)){if(F){G();return}typeof g=="function"&&!g(B)||(oe.clear(),x.current=!0,A())}}}function Ke(B){if(J()!=="sloppy"||!k.current||I(B))return;let F=B.touches[0];if(!F)return;let he=Math.abs(F.clientX-k.current.startX),ke=Math.abs(F.clientY-k.current.startY),kt=Math.sqrt(he*he+ke*ke);kt>5&&(k.current.dismissOnTouchEnd=!0),kt>10&&(le(B),C.clear(),k.current=null)}function He(B){ue(B,Ke)}function no(B){J()!=="sloppy"||!k.current||I(B)||(k.current.dismissOnTouchEnd&&le(B),C.clear(),k.current=null)}function dn(B){ue(B,no)}let _e=xe(f),ro=it(n&&it(re(_e,"keydown",N),re(_e,"compositionstart",te),re(_e,"compositionend",se)),v&&it(re(_e,"click",Te,!0),re(_e,"pointerdown",Te,!0),re(_e,"pointerup",Ve,!0),re(_e,"pointercancel",Ve,!0),re(_e,"mousedown",Te,!0),re(_e,"mouseup",Ve,!0),re(_e,"touchstart",vt,!0),re(_e,"touchmove",He,!0),re(_e,"touchend",dn,!0)));return()=>{ro(),W.clear(),oe.clear(),K(),x.current=!1}},[p,f,n,v,g,l,o,w,y,N,A,_,L,I,m,c,C]),Fe.useEffect(A,[g,A]);let M=Fe.useMemo(()=>({onKeyDown:N,onPointerDown:R,onClick:R}),[N,R]),Z=Fe.useMemo(()=>({onKeyDown:N,onPointerDown:O,onMouseDown:O,onClickCapture:H,onMouseDownCapture(W){H(),P(W)},onPointerDownCapture(W){H(),P(W)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[N,H,P,O]);return Fe.useMemo(()=>o?{reference:M,floating:Z,trigger:M}:{},[o,M,Z])}var Ne=h(z(),1);function oc(e,t,o){let{reference:n,floating:r}=e,i=De(t),s=Go(t),a=Uo(s),d=Ee(t),c=i==="y",l=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2,p=n[a]/2-r[a]/2,m;switch(d){case"top":m={x:l,y:n.y-r.height};break;case"bottom":m={x:l,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-r.width,y:f};break;default:m={x:n.x,y:n.y}}switch(ct(t)){case"start":m[s]-=p*(o&&c?-1:1);break;case"end":m[s]+=p*(o&&c?-1:1);break}return m}async function ic(e,t){var o;t===void 0&&(t={});let{x:n,y:r,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=at(t,e),u=In(m),v=a[p?f==="floating"?"reference":"floating":f],_=qt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(v)))==null||o?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:d})),w=f==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=qt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:d}):w);return{top:(_.top-S.top+u.top)/b.y,bottom:(S.bottom-_.bottom+u.bottom)/b.y,left:(_.left-S.left+u.left)/b.x,right:(S.right-_.right+u.right)/b.x}}var am=50,sc=async(e,t,o)=>{let{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:s}=o,a=s.detectOverflow?s:{...s,detectOverflow:ic},d=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:l,y:f}=oc(c,n,d),p=n,m=0,u={};for(let g=0;gI<=0)){var j,A;let I=(((j=i.flip)==null?void 0:j.index)||0)+1,R=E[I];if(R&&(!(f==="alignment"?w!==De(R):!1)||C.every(P=>De(P.placement)===w?P.overflows[0]>0:!0)))return{data:{index:I,overflows:C},reset:{placement:R}};let N=(A=C.filter(H=>H.overflows[0]<=0).sort((H,P)=>H.overflows[1]-P.overflows[1])[0])==null?void 0:A.placement;if(!N)switch(m){case"bestFit":{var L;let H=(L=C.filter(P=>{if(x){let O=De(P.placement);return O===w||O==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,M)=>O+M,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:L[0];H&&(N=H);break}case"initialPlacement":N=a;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function nc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rc(e){return Ga.some(t=>e[t]>=0)}var cc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o,platform:n}=t,{strategy:r="referenceHidden",...i}=at(e,t);switch(r){case"referenceHidden":{let s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=nc(s,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rc(a)}}}case"escaped":{let s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=nc(s,o.floating);return{data:{escapedOffsets:a,escaped:rc(a)}}}default:return{}}}}};var lc=new Set(["left","top"]);async function cm(e,t){let{placement:o,platform:n,elements:r}=e,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=Ee(o),a=ct(o),d=De(o)==="y",c=lc.has(s)?-1:1,l=i&&d?-1:1,f=at(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:u}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof u=="number"&&(m=a==="end"?u*-1:u),d?{x:m*l,y:p*c}:{x:p*c,y:m*l}}var dc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;let{x:r,y:i,placement:s,middlewareData:a}=t,d=await cm(t,e);return s===((o=a.offset)==null?void 0:o.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+d.x,y:i+d.y,data:{...d,placement:s}}}}},uc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:d={fn:_=>{let{x:w,y}=_;return{x:w,y}}},...c}=at(e,t),l={x:o,y:n},f=await i.detectOverflow(t,c),p=De(Ee(r)),m=Ln(p),u=l[m],g=l[p];if(s){let _=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=u+f[_],b=u-f[w];u=Yo(y,u,b)}if(a){let _=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=g+f[_],b=g-f[w];g=Yo(y,g,b)}let v=d.fn({...t,[m]:u,[p]:g});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[m]:s,[p]:a}}}}}},fc=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:n,placement:r,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:d=!0,crossAxis:c=!0}=at(e,t),l={x:o,y:n},f=De(r),p=Ln(f),m=l[p],u=l[f],g=at(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){let y=p==="y"?"height":"width",b=i.reference[p]-i.floating[y]+v.mainAxis,S=i.reference[p]+i.reference[y]-v.mainAxis;mS&&(m=S)}if(c){var _,w;let y=p==="y"?"width":"height",b=lc.has(Ee(r)),S=i.reference[f]-i.floating[y]+(b&&((_=s.offset)==null?void 0:_[f])||0)+(b?0:v.crossAxis),x=i.reference[f]+i.reference[y]+(b?0:((w=s.offset)==null?void 0:w[f])||0)-(b?v.crossAxis:0);ux&&(u=x)}return{[p]:m,[f]:u}}}},pc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;let{placement:r,rects:i,platform:s,elements:a}=t,{apply:d=()=>{},...c}=at(e,t),l=await s.detectOverflow(t,c),f=Ee(r),p=ct(r),m=De(r)==="y",{width:u,height:g}=i.floating,v,_;f==="top"||f==="bottom"?(v=f,_=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=f,v=p==="end"?"top":"bottom");let w=g-l.top-l.bottom,y=u-l.left-l.right,b=Ht(g-l[v],w),S=Ht(u-l[_],y),x=!t.middlewareData.shift,E=b,T=S;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(T=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=w),x&&!p){let C=Be(l.left,0),j=Be(l.right,0),A=Be(l.top,0),L=Be(l.bottom,0);m?T=u-2*(C!==0||j!==0?C+j:Be(l.left,l.right)):E=g-2*(A!==0||L!==0?A+L:Be(l.top,l.bottom))}await d({...t,availableWidth:T,availableHeight:E});let k=await s.getDimensions(a.floating);return u!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function hc(e){let t=Ae(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=we(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n,a=zt(o)!==i||zt(n)!==s;return a&&(o=i,n=s),{width:o,height:n,$:a}}function qr(e){return V(e)?e:e.contextElement}function ho(e){let t=qr(e);if(!we(t))return st(1);let o=t.getBoundingClientRect(),{width:n,height:r,$:i}=hc(t),s=(i?zt(o.width):o.width)/n,a=(i?zt(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var lm=st(0);function wc(e){let t=ge(e);return!En()||!t.visualViewport?lm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dm(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ge(e)?!1:t}function Qt(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let r=e.getBoundingClientRect(),i=qr(e),s=st(1);t&&(n?V(n)&&(s=ho(n)):s=ho(e));let a=dm(i,o,n)?wc(i):st(0),d=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,l=r.width/s.x,f=r.height/s.y;if(i){let p=ge(i),m=n&&V(n)?ge(n):n,u=p,g=Tn(u);for(;g&&n&&m!==u;){let v=ho(g),_=g.getBoundingClientRect(),w=Ae(g),y=_.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,b=_.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;d*=v.x,c*=v.y,l*=v.x,f*=v.y,d+=y,c+=b,u=ge(g),g=Tn(u)}}return qt({width:l,height:f,x:d,y:c})}function Mn(e,t){let o=jo(e).scrollLeft;return t?t.left+o:Qt(ot(e)).left+o}function vc(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Mn(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function um(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e,i=r==="fixed",s=ot(n),a=t?Do(t.floating):!1;if(n===s||a&&i)return o;let d={scrollLeft:0,scrollTop:0},c=st(1),l=st(0),f=we(n);if((f||!f&&!i)&&((Gt(n)!=="body"||fo(s))&&(d=jo(n)),f)){let m=Qt(n);c=ho(n),l.x=m.x+n.clientLeft,l.y=m.y+n.clientTop}let p=s&&!f&&!i?vc(s,d):st(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-d.scrollLeft*c.x+l.x+p.x,y:o.y*c.y-d.scrollTop*c.y+l.y+p.y}}function fm(e){return Array.from(e.getClientRects())}function pm(e){let t=ot(e),o=jo(e),n=e.ownerDocument.body,r=Be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+Mn(e),a=-o.scrollTop;return Ae(n).direction==="rtl"&&(s+=Be(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:s,y:a}}var mc=25;function mm(e,t){let o=ge(e),n=ot(e),r=o.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,d=0;if(r){i=r.width,s=r.height;let l=En();(!l||l&&t==="fixed")&&(a=r.offsetLeft,d=r.offsetTop)}let c=Mn(n);if(c<=0){let l=n.ownerDocument,f=l.body,p=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,u=Math.abs(n.clientWidth-f.clientWidth-m);u<=mc&&(i-=u)}else c<=mc&&(i+=c);return{width:i,height:s,x:a,y:d}}function gm(e,t){let o=Qt(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=we(e)?ho(e):st(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,d=r*i.x,c=n*i.y;return{width:s,height:a,x:d,y:c}}function gc(e,t,o){let n;if(t==="viewport")n=mm(e,o);else if(t==="document")n=pm(ot(e));else if(V(t))n=gm(t,o);else{let r=wc(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return qt(n)}function _c(e,t){let o=tt(e);return o===t||!V(o)||nt(o)?!1:Ae(o).position==="fixed"||_c(o,t)}function bm(e,t){let o=t.get(e);if(o)return o;let n=It(e,[],!1).filter(a=>V(a)&&Gt(a)!=="body"),r=null,i=Ae(e).position==="fixed",s=i?tt(e):e;for(;V(s)&&!nt(s);){let a=Ae(s),d=Sn(s);!d&&a.position==="fixed"&&(r=null),(i?!d&&!r:!d&&a.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||fo(s)&&!d&&_c(e,s))?n=n.filter(l=>l!==s):r=a,s=tt(s)}return t.set(e,n),n}function hm(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e,s=[...o==="clippingAncestors"?Do(t)?[]:bm(t,this._c):[].concat(o),n],a=gc(t,s[0],r),d=a.top,c=a.right,l=a.bottom,f=a.left;for(let p=1;p{s(!1,1e-7)},1e3)}E===1&&!xc(c,e.getBoundingClientRect())&&s(),b=!1}try{o=new IntersectionObserver(S,{...y,root:r.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(e)}return s(!0),i}function Xo(e,t,o,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,c=qr(e),l=r||i?[...c?It(c):[],...t?It(t):[]]:[];l.forEach(_=>{r&&_.addEventListener("scroll",o,{passive:!0}),i&&_.addEventListener("resize",o)});let f=c&&a?xm(c,o):null,p=-1,m=null;s&&(m=new ResizeObserver(_=>{let[w]=_;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),o()}),c&&!d&&m.observe(c),t&&m.observe(t));let u,g=d?Qt(e):null;d&&v();function v(){let _=Qt(e);g&&!xc(g,_)&&o(),g=_,u=requestAnimationFrame(v)}return o(),()=>{var _;l.forEach(w=>{r&&w.removeEventListener("scroll",o),i&&w.removeEventListener("resize",o)}),f?.(),(_=m)==null||_.disconnect(),m=null,d&&cancelAnimationFrame(u)}}var Rc=dc;var Sc=uc,Ec=ac,Tc=pc,kc=cc;var Pc=fc,Bn=(e,t,o)=>{let n=new Map,r={platform:Zr,...o},i={...r.platform,_c:n};return sc(e,t,{...r,platform:i})};var ve=h(z(),1),Ac=h(z(),1),Oc=h(Mt(),1),Sm=typeof document<"u",Em=function(){},Hn=Sm?Ac.useLayoutEffect:Em;function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!zn(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){let i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!zn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Nc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cc(e,t){let o=Nc(e);return Math.round(t*o)/o}function Qr(e){let t=ve.useRef(e);return Hn(()=>{t.current=e}),t}function Lc(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:c}=e,[l,f]=ve.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ve.useState(n);zn(p,n)||m(n);let[u,g]=ve.useState(null),[v,_]=ve.useState(null),w=ve.useCallback(P=>{P!==x.current&&(x.current=P,g(P))},[]),y=ve.useCallback(P=>{P!==E.current&&(E.current=P,_(P))},[]),b=i||u,S=s||v,x=ve.useRef(null),E=ve.useRef(null),T=ve.useRef(l),k=d!=null,C=Qr(d),j=Qr(r),A=Qr(c),L=ve.useCallback(()=>{if(!x.current||!E.current)return;let P={placement:t,strategy:o,middleware:p};j.current&&(P.platform=j.current),Bn(x.current,E.current,P).then(O=>{let M={...O,isPositioned:A.current!==!1};I.current&&!zn(T.current,M)&&(T.current=M,Oc.flushSync(()=>{f(M)}))})},[p,t,o,j,A]);Hn(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[c]);let I=ve.useRef(!1);Hn(()=>(I.current=!0,()=>{I.current=!1}),[]),Hn(()=>{if(b&&(x.current=b),S&&(E.current=S),b&&S){if(C.current)return C.current(b,S,L);L()}},[b,S,L,C,k]);let R=ve.useMemo(()=>({reference:x,floating:E,setReference:w,setFloating:y}),[w,y]),N=ve.useMemo(()=>({reference:b,floating:S}),[b,S]),H=ve.useMemo(()=>{let P={position:o,left:0,top:0};if(!N.floating)return P;let O=Cc(N.floating,l.x),M=Cc(N.floating,l.y);return a?{...P,transform:"translate("+O+"px, "+M+"px)",...Nc(N.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:O,top:M}},[o,a,N.floating,l.x,l.y]);return ve.useMemo(()=>({...l,update:L,refs:R,elements:N,floatingStyles:H}),[l,L,R,N,H])}var Jr=(e,t)=>{let o=Rc(e);return{name:o.name,fn:o.fn,options:[e,t]}},$r=(e,t)=>{let o=Sc(e);return{name:o.name,fn:o.fn,options:[e,t]}},ei=(e,t)=>({fn:Pc(e).fn,options:[e,t]}),ti=(e,t)=>{let o=Ec(e);return{name:o.name,fn:o.fn,options:[e,t]}},oi=(e,t)=>{let o=Tc(e);return{name:o.name,fn:o.fn,options:[e,t]}};var ni=(e,t)=>{let o=kc(e);return{name:o.name,fn:o.fn,options:[e,t]}};var _o=h(z(),1),qc=h(Mt(),1);var Xc=h(z(),1);var q=(e,t,o,n,r,i,...s)=>{if(s.length>0)throw new Error(Pe(1));let a;if(e&&t&&o&&n&&r&&i)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f),u=o(d,c,l,f),g=n(d,c,l,f),v=r(d,c,l,f);return i(p,m,u,g,v,c,l,f)};else if(e&&t&&o&&n&&r)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f),u=o(d,c,l,f),g=n(d,c,l,f);return r(p,m,u,g,c,l,f)};else if(e&&t&&o&&n)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f),u=o(d,c,l,f);return n(p,m,u,c,l,f)};else if(e&&t&&o)a=(d,c,l,f)=>{let p=e(d,c,l,f),m=t(d,c,l,f);return o(p,m,c,l,f)};else if(e&&t)a=(d,c,l,f)=>{let p=e(d,c,l,f);return t(p,c,l,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var Uc=h(z(),1),li=h(ii(),1),Gc=h(jc(),1);var Fc=h(z(),1);var si=[],ai;function Vc(){return ai}function Wc(e){si.push(e)}function ci(e){let t=(o,n)=>{let r=Se(Wm).current,i;try{ai=r;for(let s of si)s.before(r);i=e(o,n);for(let s of si)s.after(r);r.didInitialize=!0}finally{ai=void 0}return i};return t.displayName=e.displayName||e.name,t}function Yc(e){return Fc.forwardRef(ci(e))}function Wm(){return{didInitialize:!1}}var Ym=ao(19),Um=Ym?Xm:Km;function jn(e,t,o,n,r){return Um(e,t,o,n,r)}function Gm(e,t,o,n,r){let i=Uc.useCallback(()=>t(e.getSnapshot(),o,n,r),[e,t,o,n,r]);return(0,li.useSyncExternalStore)(e.subscribe,i,i)}Wc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let r of e.syncHooks)o.add(r.store);let n=[];for(let r of o)n.push(r.subscribe(t));return()=>{for(let r of n)r()}}),(0,li.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xm(e,t,o,n,r){let i=Vc();if(!i)return Gm(e,t,o,n,r);let s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,n)||!Object.is(a.a3,r))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=n,a.a3=r,a.value=t(e.getSnapshot(),o,n,r))):(a={store:e,selector:t,a1:o,a2:n,a3:r,value:t(e.getSnapshot(),o,n,r)},i.syncHooks.push(a)),a.value}function Km(e,t,o,n,r){return(0,Gc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,o,n,r))}var Fn=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let n of this.listeners){if(o!==this.updateTick)return;n(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,n,r){return jn(this,t,o,n,r)}};var Jt=h(z(),1);var vo=class extends Fn{constructor(t,o={},n){super(t),this.context=o,this.selectors=n}useSyncedValue(t,o){Jt.useDebugValue(t);let n=this;D(()=>{n.state[t]!==o&&n.set(t,o)},[n,t,o])}useSyncedValueWithCleanup(t,o){let n=this;D(()=>(n.state[t]!==o&&n.set(t,o),()=>{n.set(t,void 0)}),[n,t,o])}useSyncedValues(t){let o=this,n=Object.values(t);D(()=>{o.update(t)},[o,...n])}useControlledProp(t,o){Jt.useDebugValue(t);let n=this,r=o!==void 0;D(()=>{r&&!Object.is(n.state[t],o)&&n.setState({...n.state,[t]:o})},[n,t,o,r])}select(t,o,n,r){let i=this.selectors[t];return i(this.state,o,n,r)}useState(t,o,n,r){return Jt.useDebugValue(t),jn(this,this.selectors[t],o,n,r)}useContextCallback(t,o){Jt.useDebugValue(t);let n=Y(o??Nt);this.context[t]=n}useStateSetter(t){let o=Jt.useRef(void 0);return o.current===void 0&&(o.current=n=>{this.set(t,n)}),o.current}observe(t,o){let n;typeof t=="function"?n=t:n=this.selectors[t];let r=n(this.state);return o(r,r,this),this.subscribe(i=>{let s=n(i);if(!Object.is(r,s)){let a=r;r=s,o(s,a,this)}})}};var qm={open:q(e=>e.open),transitionStatus:q(e=>e.transitionStatus),domReferenceElement:q(e=>e.domReferenceElement),referenceElement:q(e=>e.positionReference??e.referenceElement),floatingElement:q(e=>e.floatingElement),floatingId:q(e=>e.floatingId)},pt=class extends vo{constructor(t){let{syncOnly:o,nested:n,onOpenChange:r,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ec(),nested:n,triggerElements:i},qm),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&Ha(o))&&(this.context.dataRef.current.openEvent=t?o:void 0)};dispatchOpenChange=(t,o)=>{this.syncOpenEvent(t,o.event);let n={open:t,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",n)};setOpen=(t,o)=>{if(this.syncOnly){this.context.onOpenChange?.(t,o);return}this.dispatchOpenChange(t,o),this.context.onOpenChange?.(t,o)}};function Kc(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:n,floatingId:r,nested:i,onOpenChange:s}=e,a=t.useState("open"),d=t.useState("activeTriggerElement"),c=t.useState(o?"popupElement":"positionerElement"),l=t.context.triggerElements,f=s,p=Xc.useRef(null);n===void 0&&p.current===null&&(p.current=new pt({open:a,transitionStatus:void 0,referenceElement:d,floatingElement:c,triggerElements:l,onOpenChange:f,floatingId:r,syncOnly:!0,nested:i}));let m=n??p.current;return t.useSyncedValue("floatingId",r),D(()=>{let u={open:a,floatingId:r,referenceElement:d,floatingElement:c};V(d)&&(u.domReferenceElement=d),m.state.positionReference===m.state.referenceElement&&(u.positionReference=d),m.update(u)},[a,r,d,c,m]),m.context.onOpenChange=f,m.context.nested=i,m}var Zc={tabIndex:-1,[Dr]:""};function Qc(e,t,o=!1){let n=Lt(),r=bo()!=null,i=_o.useRef(null);e===void 0&&i.current===null&&(i.current=t(n,r));let s=e??i.current;return Kc({popupStore:s,treatPopupAsFloatingElement:o,floatingRootContext:s.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function Zm(e,t){let o=_o.useRef(null),n=_o.useRef(null);return _o.useCallback(r=>{if(e===void 0)return;let i=!1;if(o.current!==null){let s=o.current,a=n.current,d=t.context.triggerElements.getById(s);a&&d===a&&(t.context.triggerElements.delete(s),i=!0),o.current=null,n.current=null}if(r!==null&&(o.current=e,n.current=r,t.context.triggerElements.add(e,r),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function Qm(e,t,o,n=!1){t?e.preventUnmountingOnClose=!1:n&&(e.preventUnmountingOnClose=!0);let r=o?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=o??null)}function Jm(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Jc(e,t,o,n={}){let r=o.reason,i=r===U.triggerHover,s=t&&r===U.triggerFocus,a=!t&&(r===U.triggerPress||r===U.escapeKey),d=Jm(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;n.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let c=()=>{let l={...n.extraState,open:t};s?l.instantType="focus":a?l.instantType="dismiss":i&&(l.instantType=void 0),Qm(l,t,o.trigger,d()),e.update(l)};i?qc.flushSync(c):c()}function $c(e,t,o,n){Oa(()=>{t===void 0&&e.state.open===!1&&o&&(e.state={...e.state,open:!0,activeTriggerId:n,preventUnmountingOnClose:!1})})}function el(e,t,o,n){let r=o.useState("isMountedByTrigger",e),i=Zm(e,o),s=Y(a=>{if(i(a),!a)return;let d=o.select("open"),c=o.select("activeTriggerId");if(c===e){o.update({activeTriggerElement:a,...d?n:null});return}c==null&&d&&o.update({activeTriggerId:e,activeTriggerElement:a,...n})});return D(()=>{r&&o.update({activeTriggerElement:t.current,...n})},[r,o,t,...Object.values(n)]),{registerTrigger:s,isMountedByThisTrigger:r}}function tl(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,n=e.useState("open"),r=e.useState("triggerCount");D(()=>{if(!n){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let a=e.select("activeTriggerId"),d=null;if(a){let c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(s.activeTriggerElement=c):d=a}if(!d&&!a&&i===1){let c=e.context.triggerElements.entries().next();if(!c.done){let[l,f]=c.value;s.activeTriggerId=l,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),d&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){let c=ee(U.none);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[n,e,r,o])}function ol(e,t,o){let{mounted:n,setMounted:r,transitionStatus:i}=ha(e),s=t.useState("preventUnmountingOnClose"),a=e?!1:s;t.useSyncedValues({mounted:n,transitionStatus:i,preventUnmountingOnClose:a});let d=Y(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)});return Pn({enabled:n&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:i}}function nl(e,t){e.useSyncedValues(t),D(()=>()=>{e.update({activeTriggerProps:be,inactiveTriggerProps:be,popupProps:be})},[e])}var jt=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,o){let n=this.idMap.get(t);n!==o&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(o),this.idMap.set(t,o))}delete(t){let o=this.idMap.get(t);o&&(this.elementsSet.delete(o),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let o of this.elementsSet)if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function rl(){return new pt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new jt,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function sl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:rl(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:be,inactiveTriggerProps:be,popupProps:be}}function al(e,t,o=!1){return new pt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}var Ko=q(e=>e.triggerIdProp??e.activeTriggerId),di=q(e=>e.openProp??e.open),il=q(e=>(e.popupElement?.id??e.floatingId)||void 0);function cl(e,t){return t!==void 0&&di(e)&&Ko(e)===t}function $m(e,t){return cl(e,t)?!0:t!==void 0&&di(e)&&Ko(e)==null&&e.triggerCount===1}var ll={open:di,mounted:q(e=>e.mounted),transitionStatus:q(e=>e.transitionStatus),floatingRootContext:q(e=>e.floatingRootContext),triggerCount:q(e=>e.triggerCount),preventUnmountingOnClose:q(e=>e.preventUnmountingOnClose),payload:q(e=>e.payload),activeTriggerId:Ko,activeTriggerElement:q(e=>e.mounted?e.activeTriggerElement:null),popupId:il,isTriggerActive:q((e,t)=>t!==void 0&&Ko(e)===t),isOpenedByTrigger:q((e,t)=>cl(e,t)),isMountedByTrigger:q((e,t)=>t!==void 0&&Ko(e)===t&&e.mounted),triggerProps:q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:q((e,t)=>$m(e,t)?il(e):void 0),popupProps:q(e=>e.popupProps),popupElement:q(e=>e.popupElement),positionerElement:q(e=>e.positionerElement)};function dl(e){let{open:t=!1,onOpenChange:o,elements:n={}}=e,r=Lt(),i=bo()!=null,s=Se(()=>new pt({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new jt,floatingId:r,syncOnly:!1,nested:i})).current;return D(()=>{let a={open:t,floatingId:r};n.reference!==void 0&&(a.referenceElement=n.reference,a.domReferenceElement=V(n.reference)?n.reference:null),n.floating!==void 0&&(a.floatingElement=n.floating),s.update(a)},[t,r,n.reference,n.floating,s]),s.context.onOpenChange=o,s.context.nested=i,s}function ui(e={}){let{nodeId:t,externalTree:o}=e,n=dl(e),r=e.rootContext||n,i=r.useState("referenceElement"),s=r.useState("floatingElement"),a=r.useState("domReferenceElement"),d=r.useState("open"),c=r.useState("floatingId"),[l,f]=Ne.useState(null),[p,m]=Ne.useState(void 0),[u,g]=Ne.useState(void 0),v=Ne.useRef(null),_=Dt(o),w=Ne.useMemo(()=>({reference:i,floating:s,domReference:a}),[i,s,a]),y=Lc({...e,elements:{...w,...l&&{reference:l}}}),b=V(p)?p:null,S=u===void 0?r.state.floatingElement:u;r.useSyncedValue("referenceElement",p??null),r.useSyncedValue("domReferenceElement",p===void 0?a:b),r.useSyncedValue("floatingElement",S);let x=Ne.useCallback(A=>{let L=V(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;f(L),y.refs.setReference(L)},[y.refs]),E=Ne.useCallback(A=>{(V(A)||A===null)&&(v.current=A,m(A)),(V(y.refs.reference.current)||y.refs.reference.current===null||A!==null&&!V(A))&&y.refs.setReference(A)},[y.refs,m]),T=Ne.useCallback(A=>{g(A),y.refs.setFloating(A)},[y.refs]),k=Ne.useMemo(()=>({...y.refs,setReference:E,setFloating:T,setPositionReference:x,domReference:v}),[y.refs,E,T,x]),C=Ne.useMemo(()=>({...y.elements,domReference:a}),[y.elements,a]),j=Ne.useMemo(()=>({...y,dataRef:r.context.dataRef,open:d,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:k,elements:C,nodeId:t,rootStore:r}),[y,k,C,t,r,d,c]);return D(()=>{a&&(v.current=a)},[a]),D(()=>{r.context.dataRef.current.floatingContext=j;let A=_?.nodesRef.current.find(L=>L.id===t);A&&(A.context=j)}),Ne.useMemo(()=>({...y,context:j,refs:k,elements:C,rootStore:r}),[y,k,C,j,r])}var mt=h(z(),1);var fi=xt.os.mac&&xt.engine.webkit;function pi(e,t={}){let{enabled:o=!0,delay:n}=t,r="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=r.context,a=mt.useRef(!1),d=mt.useRef(null),c=mt.useRef(!0),l=rt();mt.useEffect(()=>{let p=r.select("domReferenceElement");if(!o)return;let m=ge(p);function u(){let _=r.select("domReferenceElement");!r.select("open")&&we(_)&&_===Cn(xe(_))&&(a.current=!0)}function g(){c.current=!0}function v(){c.current=!1}return it(re(m,"blur",u),fi&&re(m,"keydown",g,!0),fi&&re(m,"pointerdown",v,!0))},[r,o]),mt.useEffect(()=>{if(!o)return;function p(m){if(m.reason===U.triggerPress||m.reason===U.escapeKey){let u=r.select("domReferenceElement");V(u)&&(d.current=u,a.current=!0)}}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,o,r]);let f=mt.useMemo(()=>{function p(){a.current=!1,d.current=null}return{onMouseLeave(){p()},onFocus(m){let u=m.currentTarget;if(a.current){if(d.current===u)return;p()}let g=Me(m.nativeEvent);if(V(g)){if(fi&&!m.relatedTarget){if(!c.current&&!Da(g))return}else if(!ja(g))return}let v=Bt(m.relatedTarget,r.context.triggerElements),{nativeEvent:_,currentTarget:w}=m,y=typeof n=="function"?n():n;if(r.select("open")&&v||y===0||y===void 0){r.setOpen(!0,ee(U.triggerFocus,_,w));return}l.start(y,()=>{a.current||r.setOpen(!0,ee(U.triggerFocus,_,w))})},onBlur(m){p();let u=m.relatedTarget,g=m.nativeEvent,v=V(u)&&u.hasAttribute(go("focus-guard"))&&u.getAttribute("data-type")==="outside";l.start(0,()=>{let _=r.select("domReferenceElement"),w=Cn(xe(_));!u&&w===_||ie(s.current.floatingContext?.refs.floating.current,w)||ie(_,w)||v||Bt(u??w,r.context.triggerElements)||r.setOpen(!1,ee(U.triggerFocus,g))})}}},[s,n,r,l]);return mt.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var gi=h(z(),1);var mi=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ye,this.restTimeout=new Ye,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Vn=new WeakMap;function yo(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Vn.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Vn.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Wn(e,t){let{scopeElement:o,referenceElement:n,floatingElement:r}=t,i=Vn.get(o);i&&i!==e&&yo(i),yo(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=n,e.pointerEventsFloatingElement=r,Vn.set(o,e),o.style.pointerEvents="none",n.style.pointerEvents="auto",r.style.pointerEvents="auto"}function xo(e){let t=e.context.dataRef.current,o=Se(()=>t.hoverInteractionState??mi.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),co(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function bi(e,t={}){let{enabled:o=!0,closeDelay:n=0,nodeId:r}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),a=i.useState("floatingElement"),d=i.useState("domReferenceElement"),{dataRef:c}=i.context,l=Dt(),f=bo(),p=xo(i),m=rt(),u=Y(()=>On(c.current.openEvent?.type,p.interactedInside)),g=Y(()=>Fa(c.current.openEvent?.type)),v=Y(()=>{yo(p)});D(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,v())},[s,p,v]),gi.useEffect(()=>v,[v]),D(()=>{if(o&&s&&p.handleCloseOptions?.blockPointerEvents&&g()&&V(d)&&a){let _=d,w=a,y=xe(a),b=l?.nodesRef.current.find(T=>T.id===f)?.context?.elements.floating;b&&(b.style.pointerEvents="");let S=p.pointerEventsScopeElement!==w?p.pointerEventsScopeElement:null,x=b!==w?b:null,E=p.handleCloseOptions?.getScope?.()??S??x??_.closest("[data-rootownerid]")??y.body;return Wn(p,{scopeElement:E,referenceElement:_,floatingElement:w}),()=>{v()}}},[o,s,d,a,p,g,l,f,v]),gi.useEffect(()=>{if(!o)return;function _(){return!!(l&&f&&Et(l.nodesRef.current,f).length>0)}function w(T){let k=St(n,"close",p.pointerType),C=()=>{i.setOpen(!1,ee(U.triggerHover,T)),l?.events.emit("floating.closed",T)};k?p.openChangeTimeout.start(k,C):(p.openChangeTimeout.clear(),C())}function y(T){let k=Me(T);if(!Fr(k)){p.interactedInside=!1;return}p.interactedInside=k?.closest("[aria-haspopup]")!=null}function b(){p.openChangeTimeout.clear(),m.clear(),l?.events.off("floating.closed",x),v()}function S(T){if(_()&&l){l.events.on("floating.closed",x);return}if(Bt(T.relatedTarget,i.context.triggerElements))return;let k=c.current.floatingContext?.nodeId??r,C=T.relatedTarget;if(!(l&&k&&V(C)&&Et(l.nodesRef.current,k,!1).some(A=>ie(A.context?.elements.floating,C)))){if(p.handler){p.handler(T);return}v(),g()&&!u()&&w(T)}}function x(T){!l||!f||_()||m.start(0,()=>{l.events.off("floating.closed",x),i.setOpen(!1,ee(U.triggerHover,T)),l.events.emit("floating.closed",T)})}let E=a;return it(E&&re(E,"mouseenter",b),E&&re(E,"mouseleave",S),E&&re(E,"pointerdown",y,!0),()=>{l?.events.off("floating.closed",x)})},[o,a,i,c,n,r,g,u,v,p,l,f,m])}var Ft=h(z(),1),ul=h(Mt(),1);var eg={current:null};function hi(e,t={}){let{enabled:o=!0,delay:n=0,handleClose:r=null,mouseOnly:i=!1,restMs:s=0,move:a=!0,triggerElementRef:d=eg,externalTree:c,isActiveTrigger:l=!0,getHandleCloseContext:f,isClosing:p,shouldOpen:m}=t,u="rootStore"in e?e.rootStore:e,{dataRef:g,events:v}=u.context,_=Dt(c),w=xo(u),y=Ft.useRef(!1),b=ze(r),S=ze(n),x=ze(s),E=ze(o),T=ze(m),k=ze(p),C=Y(()=>On(g.current.openEvent?.type,w.interactedInside)),j=Y(()=>T.current?.()!==!1),A=Y((R,N,H)=>{let P=u.context.triggerElements;if(P.hasElement(N))return!R||!ie(R,N);if(!V(H))return!1;let O=H;return P.hasMatchingElement(M=>ie(M,O))&&(!R||!ie(R,O))}),L=Y(()=>{if(!w.handler)return;xe(u.select("domReferenceElement")).removeEventListener("mousemove",w.handler),w.handler=void 0}),I=Y(()=>{yo(w)});return l&&(w.handleCloseOptions=b.current?.__options),Ft.useEffect(()=>L,[L]),Ft.useEffect(()=>{if(!o)return;function R(N){N.open?y.current=!1:(y.current=N.reason===U.triggerHover,L(),w.openChangeTimeout.clear(),w.restTimeout.clear(),w.blockMouseMove=!0,w.restTimeoutPending=!1)}return v.on("openchange",R),()=>{v.off("openchange",R)}},[o,v,w,L]),Ft.useEffect(()=>{if(!o)return;function R(O,M=!0){let Z=St(S.current,"close",w.pointerType);Z?w.openChangeTimeout.start(Z,()=>{u.setOpen(!1,ee(U.triggerHover,O)),_?.events.emit("floating.closed",O)}):M&&(w.openChangeTimeout.clear(),u.setOpen(!1,ee(U.triggerHover,O)),_?.events.emit("floating.closed",O))}let N=d.current??(l?u.select("domReferenceElement"):null);if(!V(N))return;function H(O){if(w.openChangeTimeout.clear(),w.blockMouseMove=!1,i&&!Rt(w.pointerType))return;let M=Vr(x.current),Z=St(S.current,"open",w.pointerType),W=Me(O),oe=O.currentTarget??null,te=u.select("domReferenceElement"),se=oe;if(V(W)&&!u.context.triggerElements.hasElement(W)){for(let ue of u.context.triggerElements.elements())if(ie(ue,W)){se=ue;break}}V(oe)&&V(te)&&!u.context.triggerElements.hasElement(oe)&&ie(oe,te)&&(se=te);let G=se==null?!1:A(te,se,W),K=u.select("open"),J=k.current?.()??u.select("transitionStatus")==="ending",ne=!K&&J&&y.current,me=!G&&V(se)&&V(te)&&ie(te,se)&&ne,le=M>0&&!Z,X=G&&(K||ne)||me,pe=!K||G;if(X){j()&&u.setOpen(!0,ee(U.triggerHover,O,se));return}le||(Z?w.openChangeTimeout.start(Z,()=>{pe&&j()&&u.setOpen(!0,ee(U.triggerHover,O,se))}):pe&&j()&&u.setOpen(!0,ee(U.triggerHover,O,se)))}function P(O){if(C()){I();return}L();let M=u.select("domReferenceElement"),Z=xe(M);w.restTimeout.clear(),w.restTimeoutPending=!1;let W=g.current.floatingContext??f?.();if(Bt(O.relatedTarget,u.context.triggerElements))return;if(b.current&&W){u.select("open")||w.openChangeTimeout.clear();let te=d.current;w.handler=b.current({...W,tree:_,x:O.clientX,y:O.clientY,onClose(){I(),L(),E.current&&!C()&&te===u.select("domReferenceElement")&&R(O,!0)}}),Z.addEventListener("mousemove",w.handler),w.handler(O);return}(w.pointerType!=="touch"||!ie(u.select("floatingElement"),O.relatedTarget))&&R(O)}return a?it(re(N,"mousemove",H,{once:!0}),re(N,"mouseenter",H),re(N,"mouseleave",P)):it(re(N,"mouseenter",H),re(N,"mouseleave",P))},[L,I,g,S,u,o,b,w,l,A,C,i,a,x,d,_,E,f,k,j]),Ft.useMemo(()=>{if(!o)return;function R(N){w.pointerType=N.pointerType}return{onPointerDown:R,onPointerEnter:R,onMouseMove(N){let{nativeEvent:H}=N,P=N.currentTarget,O=u.select("domReferenceElement"),M=u.select("open"),Z=A(O,P,N.target);if(i&&!Rt(w.pointerType))return;if(M&&Z&&w.handleCloseOptions?.blockPointerEvents){let te=u.select("floatingElement");if(te){let se=w.handleCloseOptions?.getScope?.()??P.ownerDocument.body;Wn(w,{scopeElement:se,referenceElement:P,floatingElement:te})}}let W=Vr(x.current);if(M&&!Z||W===0||!Z&&w.restTimeoutPending&&N.movementX**2+N.movementY**2<2)return;w.restTimeout.clear();function oe(){if(w.restTimeoutPending=!1,C())return;let te=u.select("open");!w.blockMouseMove&&(!te||Z)&&j()&&u.setOpen(!0,ee(U.triggerHover,H,P))}w.pointerType==="touch"?ul.flushSync(()=>{oe()}):Z&&M?oe():(w.restTimeoutPending=!0,w.restTimeout.start(W,oe))}}},[o,w,C,A,i,u,x,j])}var fl=.1,tg=fl*fl,ce=.5;function Yn(e,t,o,n,r,i){return n>=t!=i>=t&&e<=(r-o)*(t-n)/(i-n)+o}function Un(e,t,o,n,r,i,s,a,d,c){let l=!1;return Yn(e,t,o,n,r,i)&&(l=!l),Yn(e,t,r,i,s,a)&&(l=!l),Yn(e,t,s,a,d,c)&&(l=!l),Yn(e,t,d,c,o,n)&&(l=!l),l}function og(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function Gn(e,t,o,n,r,i){let s=Math.min(o,r),a=Math.max(o,r),d=Math.min(n,i),c=Math.max(n,i);return e>=s&&e<=a&&t>=d&&t<=c}function wi(e={}){let{blockPointerEvents:t=!1}=e,o=new Ye,n=({x:r,y:i,placement:s,elements:a,onClose:d,nodeId:c,tree:l})=>{let f=s?.split("-")[0],p=!1,m=null,u=null,g=typeof performance<"u"?performance.now():0;function v(w,y){let b=performance.now(),S=b-g;if(m===null||u===null||S===0)return m=w,u=y,g=b,!1;let x=w-m,E=y-u,T=x*x+E*E,k=S*S*tg;return m=w,u=y,g=b,T0)}function L(){A()||_()}if(A())return;let I=b.getBoundingClientRect(),R=S.getBoundingClientRect(),N=r>R.right-R.width/2,H=i>R.bottom-R.height/2,P=R.width>I.width,O=R.height>I.height,M=(P?I:R).left,Z=(P?I:R).right,W=(O?I:R).top,oe=(O?I:R).bottom;if(f==="top"&&i>=I.bottom-1||f==="bottom"&&i<=I.top+1||f==="left"&&r>=I.right-1||f==="right"&&r<=I.left+1){L();return}let te=!1;switch(f){case"top":te=Gn(x,E,M,I.top+1,Z,R.bottom-1);break;case"bottom":te=Gn(x,E,M,R.top+1,Z,I.bottom-1);break;case"left":te=Gn(x,E,R.right-1,oe,I.left+1,W);break;case"right":te=Gn(x,E,I.right-1,oe,R.left+1,W);break;default:}if(te)return;if(p&&!og(x,E,I)){L();return}if(!k&&v(x,E)){L();return}let se=!1;switch(f){case"top":{let G=P?ce/2:ce*4,K=P||N?r+G:r-G,J=P?r-G:N?r+G:r-G,ne=i+ce+1,me=N||P?R.bottom-ce:R.top,le=N?P?R.bottom-ce:R.top:R.bottom-ce;se=Un(x,E,K,ne,J,ne,R.left,me,R.right,le);break}case"bottom":{let G=P?ce/2:ce*4,K=P||N?r+G:r-G,J=P?r-G:N?r+G:r-G,ne=i-ce,me=N||P?R.top+ce:R.bottom,le=N?P?R.top+ce:R.bottom:R.top+ce;se=Un(x,E,K,ne,J,ne,R.left,me,R.right,le);break}case"left":{let G=O?ce/2:ce*4,K=O||H?i+G:i-G,J=O?i-G:H?i+G:i-G,ne=r+ce+1,me=H||O?R.right-ce:R.left,le=H?O?R.right-ce:R.left:R.right-ce;se=Un(x,E,me,R.top,le,R.bottom,ne,K,ne,J);break}case"right":{let G=O?ce/2:ce*4,K=O||H?i+G:i-G,J=O?i-G:H?i+G:i-G,ne=r-ce,me=H||O?R.left+ce:R.right,le=H?O?R.left+ce:R.right:R.left+ce;se=Un(x,E,ne,K,ne,J,me,R.top,le,R.bottom);break}default:}se?p||o.start(40,L):L()}};return n.__options={...e,blockPointerEvents:t},n}var vi=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Yt.startingStyle]="startingStyle",e[e.endingStyle=Yt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),qo=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),ng={[qo.popupOpen]:""},B_={[qo.popupOpen]:"",[qo.pressed]:""},rg={[vi.open]:""},ig={[vi.closed]:""},sg={[vi.anchorHidden]:""},pl={open(e){return e?ng:null}};var Ro={open(e){return e?rg:ig},anchorHidden(e){return e?sg:null}};function ml(e){return ao(19)?e:e?"true":void 0}var Ge=h(z(),1);var ag=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:n,placement:r,rects:i,platform:s,elements:a,middlewareData:d}=t,{element:c,padding:l=0,offsetParent:f="real"}=at(e,t)||{};if(c==null)return{};let p=In(l),m={x:o,y:n},u=Go(r),g=Uo(u),v=await s.getDimensions(c),_=u==="y",w=_?"top":"left",y=_?"bottom":"right",b=_?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[u]-m[u]-i.floating[g],x=m[u]-i.reference[u],E=f==="real"?await s.getOffsetParent?.(c):a.floating,T=a.floating[b]||i.floating[g];(!T||!await s.isElement?.(E))&&(T=a.floating[b]||i.floating[g]);let k=S/2-x/2,C=T/2-v[g]/2-1,j=Math.min(p[w],C),A=Math.min(p[y],C),L=j,I=T-v[g]-A,R=T/2-v[g]/2+k,N=Yo(L,R,I),H=!d.arrow&&ct(r)!=null&&R!==N&&i.reference[g]/2-(R({...ag(e),options:[e,t]});var cg=ni().fn,bl={name:"hide",async fn(e){let{width:t,height:o,x:n,y:r}=e.rects.reference,i=t===0&&o===0&&n===0&&r===0;return{data:{referenceHidden:(await cg(e)).data?.referenceHidden||i}}}};var Zo={sideX:"left",sideY:"top"},hl={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:n},elements:{floating:r},platform:i,strategy:s,placement:a}=e,d=ge(r),c=d.getComputedStyle(r);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:o,data:Zo};let f=await i.getOffsetParent?.(r),p={width:0,height:0};if(s==="fixed"&&d?.visualViewport)p={width:d.visualViewport.width,height:d.visualViewport.height};else if(f===d){let w=xe(r);p={width:w.documentElement.clientWidth,height:w.documentElement.clientHeight}}else await i.isElement?.(f)&&(p=await i.getDimensions(f));let m=Ee(a),u=t,g=o;m==="left"&&(u=p.width-(t+n.width)),m==="top"&&(g=p.height-(o+n.height));let v=m==="left"?"right":Zo.sideX,_=m==="top"?"bottom":Zo.sideY;return{x:u,y:g,data:{sideX:v,sideY:_}}}};function _l(e,t,o){let n=e==="inline-start"||e==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[t]}function wl(e,t,o){let{rects:n,placement:r}=e;return{side:_l(t,Ee(r),o),align:ct(r)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function yl(e){let{anchor:t,positionMethod:o="absolute",side:n="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:d=5,sticky:c=!1,arrowPadding:l=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:u,mounted:g,collisionAvoidance:v,shiftCrossAxis:_=!1,nodeId:w,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:S}=e,[x,E]=Ge.useState(null);!g&&x!==null&&E(null);let T=v.side||"flip",k=v.align||"flip",C=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,A=Y(j),L=j?A:t,I=ze(t),R=ze(g),H=so()==="rtl",P=x||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":H?"left":"right","inline-start":H?"right":"left"}[n],O=i==="center"?P:`${P}-${i}`,M=d,Z=1,W=n==="bottom"?Z:0,oe=n==="top"?Z:0,te=n==="right"?Z:0,se=n==="left"?Z:0;typeof M=="number"?M={top:M+W,right:M+se,bottom:M+oe,left:M+te}:M&&(M={top:(M.top||0)+W,right:(M.right||0)+se,bottom:(M.bottom||0)+oe,left:(M.left||0)+te});let G={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:M},K=Ge.useRef(null),J=ze(r),ne=ze(s),me=typeof r!="function"?r:0,le=typeof s!="function"?s:0,X=[];p&&X.push(p),X.push(Jr(ae=>{let Ie=wl(ae,n,H),ut=typeof J.current=="function"?J.current(Ie):J.current,qe=typeof ne.current=="function"?ne.current(Ie):ne.current;return{mainAxis:ut,crossAxis:qe,alignmentAxis:qe}},[me,le,H,n]));let pe=k==="none"&&T!=="shift",ue=!pe&&(c||_||T==="shift"),vt=T==="none"?null:ti({...G,padding:{top:M.top+Z,right:M.right+Z,bottom:M.bottom+Z,left:M.left+Z},mainAxis:!_&&T==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:C}),Te=pe?null:$r(ae=>{let Ie=xe(ae.elements.floating).documentElement;return{...G,rootBoundary:_?{x:0,y:0,width:Ie.clientWidth,height:Ie.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:ue,limiter:c||_?void 0:ei(ut=>{if(!K.current)return{};let{width:qe,height:yt}=K.current.getBoundingClientRect(),et=De(Ee(ut.placement)),Vt=et==="y"?qe:yt,io=et==="y"?M.left+M.right:M.top+M.bottom;return{offset:Vt/2+io/2}})}},[G,c,_,M,k]);T==="shift"||k==="shift"||i==="center"?X.push(Te,vt):X.push(vt,Te),X.push(oi({...G,apply({elements:{floating:ae},availableWidth:Ie,availableHeight:ut,rects:qe}){if(!R.current)return;let yt=ae.style;yt.setProperty("--available-width",`${Ie}px`),yt.setProperty("--available-height",`${ut}px`);let et=ge(ae).devicePixelRatio||1,{x:Vt,y:io,width:bn,height:br}=qe.reference,hr=(Math.round((Vt+bn)*et)-Math.round(Vt*et))/et,wr=(Math.round((io+br)*et)-Math.round(io*et))/et;yt.setProperty("--anchor-width",`${hr}px`),yt.setProperty("--anchor-height",`${wr}px`)}}),gl(ae=>({element:K.current||xe(ae.elements.floating).createElement("div"),padding:l,offsetParent:"floating"}),[l]),{name:"transformOrigin",fn(ae){let{elements:Ie,middlewareData:ut,placement:qe,rects:yt,y:et}=ae,Vt=Ee(qe),io=De(Vt),bn=K.current,br=ut.arrow?.x||0,hr=ut.arrow?.y||0,wr=bn?.clientWidth||0,ff=bn?.clientHeight||0,vr=br+wr/2,Us=hr+ff/2,pf=Math.abs(ut.shift?.y||0),mf=yt.reference.height/2,Io=typeof r=="function"?r(wl(ae,n,H)):r,gf=pf>Io,bf={top:`${vr}px calc(100% + ${Io}px)`,bottom:`${vr}px ${-Io}px`,left:`calc(100% + ${Io}px) ${Us}px`,right:`${-Io}px ${Us}px`}[Vt],hf=`${vr}px ${yt.reference.y+mf-et}px`;return Ie.floating.style.setProperty("--transform-origin",ue&&io==="y"&&gf?hf:bf),{}}},bl,y),D(()=>{!g&&u&&u.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,u]);let Ve=Ge.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:Ke,elements:He,x:no,y:dn,middlewareData:_e,update:ro,placement:B,context:F,isPositioned:he,floatingStyles:ke}=ui({rootContext:u,open:m?g:void 0,placement:O,middleware:X,strategy:o,whileElementsMounted:m?void 0:(...ae)=>Xo(...ae,Ve),nodeId:w,externalTree:S}),{sideX:kt,sideY:Lo}=_e.adaptiveOrigin||Zo,_t=he?o:"fixed",We=Ge.useMemo(()=>{let ae=y?{position:_t,[kt]:no,[Lo]:dn}:{position:_t,...ke};return he||(ae.opacity=0),ae},[y,_t,kt,no,Lo,dn,ke,he]),Pt=Ge.useRef(null);D(()=>{if(!g)return;let ae=I.current,Ie=typeof ae=="function"?ae():ae,qe=(vl(Ie)?Ie.current:Ie)||null||null;qe!==Pt.current&&(Ke.setPositionReference(qe),Pt.current=qe)},[g,Ke,L,I]),Ge.useEffect(()=>{if(!g)return;let ae=I.current;typeof ae!="function"&&vl(ae)&&ae.current!==Pt.current&&(Ke.setPositionReference(ae.current),Pt.current=ae.current)},[g,Ke,L,I]),Ge.useEffect(()=>{if(m&&g&&He.reference&&He.floating)return Xo(He.reference,He.floating,ro,Ve)},[m,g,He,ro,Ve]);let Ct=Ee(B),un=_l(n,Ct,H),fn=ct(B)||"center",pn=!!_e.hide?.referenceHidden;D(()=>{b&&g&&he&&E(Ct)},[b,g,he,Ct]);let mn=Ge.useMemo(()=>({position:"absolute",top:_e.arrow?.y,left:_e.arrow?.x}),[_e.arrow]),gn=_e.arrow?.centerOffset!==0;return Ge.useMemo(()=>({positionerStyles:We,arrowStyles:mn,arrowRef:K,arrowUncentered:gn,side:un,align:fn,physicalSide:Ct,anchorHidden:pn,refs:Ke,context:F,isPositioned:he,update:ro}),[We,mn,K,gn,un,fn,Ct,pn,Ke,F,he,ro])}function vl(e){return e!=null&&"current"in e}function Xn(e){return e==="starting"?Za:be}function xl(e,t,{styles:o,transitionStatus:n,props:r,refs:i,hidden:s,inert:a=!1}){let d={...o};return a&&(d.pointerEvents="none"),Ce("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:d},Xn(n),r],stateAttributesMapping:Ro})}var Rl=h(z(),1);var _i=Rl.forwardRef(function(t,o){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:s=!1,nativeButton:a=!0,style:d,...c}=t,{getButtonProps:l,buttonRef:f}=Ea({disabled:i,focusableWhenDisabled:s,native:a});return Ce("button",t,{state:{disabled:i},ref:[o,f],props:[c,l]})});var Le=h(z(),1),Cl=h(Mt(),1);var Sl=h(z(),1);function El(e){let[t,o]=Sl.useState({current:e,previous:null});return e!==t.current&&o({current:e,previous:t.current}),t.previous}var So=h(z(),1);function yi(e){let t=Ae(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=we(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n;return(zt(o)!==i||zt(n)!==s)&&(o=i,n=s),{width:o,height:n}}function kl(e){let{popupElement:t,positionerElement:o,content:n,mounted:r,onMeasureLayout:i,onMeasureLayoutComplete:s,side:a,direction:d}=e,c=mo(t,!0,!1),l=lo(),f=So.useRef(null),p=So.useRef(!0),m=So.useRef(Nt),u=Y(i),g=Y(s),v=So.useMemo(()=>{let _=a==="top",w=a==="left";return d==="rtl"?(_=_||a==="inline-end",w=w||a==="inline-end"):(_=_||a==="inline-start",w=w||a==="inline-start"),_?{position:"absolute",[a==="top"?"bottom":"top"]:"0",[w?"right":"left"]:"0"}:be},[a,d]);D(()=>{if(!r){m.current=Nt,p.current=!0,f.current=null;return}if(!t||!o)return;m.current=Tl(t,v),xi(t,"auto");let _=qn(t,"position","static"),w=qn(t,"transform","none"),y=qn(t,"scale","1"),b=Tl(o,{"--available-width":"max-content","--available-height":"max-content"});function S(){_(),w(),b()}function x(){S(),y()}if(u?.(),p.current||f.current===null){Kn(o,"max-content");let C=yi(t);return f.current=C,Kn(o,C),x(),g?.(null,C),p.current=!1,()=>{m.current(),m.current=Nt}}Kn(o,"max-content");let E=f.current,T=yi(t);f.current=T,xi(t,E),x(),g?.(E,T),Kn(o,T);let k=new AbortController;return l.request(()=>{xi(t,T),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},k.signal)}),()=>{k.abort(),l.cancel(),m.current(),m.current=Nt}},[n,t,o,c,l,r,u,g,v])}function qn(e,t,o){let n=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,n)}}function Tl(e,t){let o=[];for(let[n,r]of Object.entries(t))o.push(qn(e,n,r));return o.length?()=>{o.forEach(n=>n())}:Nt}function xi(e,t){let o=t==="auto"?"auto":`${t.width}px`,n=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",o),e.style.setProperty("--popup-height",n)}function Kn(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,n=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",o),e.style.setProperty("--positioner-height",n)}var Eo=h(Q(),1);function Al(e){let{store:t,side:o,cssVars:n,children:r}=e,i=so(),s=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),d=t.useState("open"),c=t.useState("payload"),l=t.useState("mounted"),f=t.useState("popupElement"),p=t.useState("positionerElement"),m=El(d?s:null),u=ug(a,c),g=Le.useRef(null),[v,_]=Le.useState(null),[w,y]=Le.useState(null),b=Le.useRef(null),S=Le.useRef(null),x=mo(b,!0,!1),E=lo(),[T,k]=Le.useState(null),[C,j]=Le.useState(!1);D(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let A=Y(()=>{b.current?.style.setProperty("animation","none"),b.current?.style.setProperty("transition","none"),S.current?.style.setProperty("display","none")}),L=Y(P=>{b.current?.style.removeProperty("animation"),b.current?.style.removeProperty("transition"),S.current?.style.removeProperty("display"),P&&k(P)}),I=Le.useRef(null);D(()=>{(!d||!l)&&(I.current=null)},[d,l]),D(()=>{if(s&&m&&s!==m&&I.current!==s&&g.current){_(g.current),j(!0);let P=dg(m,s);y(P),E.request(()=>{Cl.flushSync(()=>{j(!1)}),x(()=>{_(null),k(null),g.current=null})}),I.current=s}},[s,m,v,x,E]),D(()=>{let P=b.current;if(!P)return;let O=xe(P).createElement("div");for(let M of Array.from(P.childNodes))O.appendChild(M.cloneNode(!0));g.current=O});let R=v!=null,N;R?N=(0,Eo.jsxs)(Le.Fragment,{children:[(0,Eo.jsx)("div",{"data-previous":!0,inert:ml(!0),ref:S,style:{...T?{[n.popupWidth]:`${T.width}px`,[n.popupHeight]:`${T.height}px`}:null,position:"absolute"},"data-ending-style":C?void 0:""},"previous"),(0,Eo.jsx)("div",{"data-current":!0,ref:b,"data-starting-style":C?"":void 0,children:r},u)]}):N=(0,Eo.jsx)("div",{"data-current":!0,ref:b,children:r},u),D(()=>{let P=S.current;!P||!v||P.replaceChildren(...Array.from(v.childNodes))},[v]),kl({popupElement:f,positionerElement:p,mounted:l,content:c,onMeasureLayout:A,onMeasureLayoutComplete:L,side:o,direction:i});let H={activationDirection:lg(w),transitioning:R};return{children:N,state:H}}function lg(e){if(e)return`${Pl(e.horizontal,5,"right","left")} ${Pl(e.vertical,5,"down","up")}`}function Pl(e,t,o,n){return e>t?o:e<-t?n:""}function dg(e,t){let o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r={x:o.left+o.width/2,y:o.top+o.height/2},i={x:n.left+n.width/2,y:n.top+n.height/2};return{horizontal:i.x-r.x,vertical:i.y-r.y}}function ug(e,t){let[o,n]=Le.useState(0),r=Le.useRef(e),i=Le.useRef(t),s=Le.useRef(!1);return D(()=>{let a=r.current,d=i.current,c=e!==a,l=t!==d;c?(n(f=>f+1),s.current=!l):s.current&&l&&(n(f=>f+1),s.current=!1),r.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}var Zn=h(z(),1),Ol=h(Mt(),1);var Nl=h(Q(),1),Ll=Zn.forwardRef(function(t,o){let{children:n,container:r,className:i,render:s,style:a,...d}=t,{portalNode:c,portalSubtree:l}=Ur({container:r,ref:o,componentProps:t,elementProps:d});return!l&&!c?null:(0,Nl.jsxs)(Zn.Fragment,{children:[l,c&&Ol.createPortal(n,c)]})});var Qe={};At(Qe,{Arrow:()=>ql,Handle:()=>Qo,Popup:()=>Xl,Portal:()=>Wl,Positioner:()=>Ul,Provider:()=>Zl,Root:()=>Ml,Trigger:()=>jl,Viewport:()=>$l,createHandle:()=>ed});var gt=h(z(),1);var Qn=h(z(),1),Ri=Qn.createContext(void 0);function Ze(e){let t=Qn.useContext(Ri);if(t===void 0&&!e)throw new Error(Pe(72));return t}var Il=h(z(),1);var fg={...ll,disabled:q(e=>e.disabled),instantType:q(e=>e.instantType),isInstantPhase:q(e=>e.isInstantPhase),trackCursorAxis:q(e=>e.trackCursorAxis),disableHoverablePopup:q(e=>e.disableHoverablePopup),lastOpenChangeReason:q(e=>e.openChangeReason),closeOnClick:q(e=>e.closeOnClick),closeDelay:q(e=>e.closeDelay),hasViewport:q(e=>e.hasViewport)},To=class e extends vo{constructor(t,o,n=!1){let r=new jt,i={...pg(),...t};i.floatingRootContext=al(r,o,n),super(i,{popupRef:Il.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},fg)}setOpen=(t,o)=>{Jc(this,t,o,{extraState:{openChangeReason:o.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,ee(U.triggerPress,t))}static useStore(t,o){return Qc(t,(r,i)=>new e(o,r,i)).store}};function pg(){return{...sl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Jn=h(Q(),1),Ml=ci(function(t){let{disabled:o=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:a,onOpenChange:d,onOpenChangeComplete:c,handle:l,triggerId:f,defaultTriggerId:p=null,children:m}=t,u=To.useStore(l?.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:f});$c(u,r,n,p),u.useControlledProp("openProp",r),u.useControlledProp("triggerIdProp",f),u.useContextCallback("onOpenChange",d),u.useContextCallback("onOpenChangeComplete",c);let g=u.useState("open"),v=!o&&g,_=u.useState("activeTriggerId"),w=u.useState("mounted"),y=u.useState("payload");u.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),u.useSyncedValue("disabled",o),tl(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:S}=ol(v,u),x=u.useState("isInstantPhase"),E=u.useState("instantType"),T=u.useState("lastOpenChangeReason"),k=gt.useRef(null);D(()=>{g&&o&&u.setOpen(!1,ee(U.disabled))},[g,o,u]),D(()=>{S==="ending"&&T===U.none||S!=="ending"&&x?(E!=="delay"&&(k.current=E),u.set("instantType","delay")):k.current!==null&&(u.set("instantType",k.current),k.current=null)},[S,x,T,E,u]),D(()=>{v&&_==null&&u.set("payload",void 0)},[u,_,v]);let C=gt.useCallback(()=>{u.setOpen(!1,ee(U.imperativeAction))},[u]);gt.useImperativeHandle(a,()=>({unmount:b,close:C}),[b,C]);let j=v||w||!o&&s!=="none";return(0,Jn.jsxs)(Ri.Provider,{value:u,children:[j&&(0,Jn.jsx)(mg,{store:u,disabled:o,trackCursorAxis:s}),typeof m=="function"?m({payload:y}):m]})});function mg({store:e,disabled:t,trackCursorAxis:o}){let n=e.useState("floatingRootContext"),r=Xr(n,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=Gr(n,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),s=gt.useMemo(()=>ye(i.reference,r.reference),[i.reference,r.reference]),a=gt.useMemo(()=>ye(i.trigger,r.trigger),[i.trigger,r.trigger]),d=gt.useMemo(()=>ye(Zc,i.floating,r.floating),[i.floating,r.floating]);return nl(e,{activeTriggerProps:s,inactiveTriggerProps:a,popupProps:d}),null}var er=h(z(),1);var $n=h(z(),1),Si=$n.createContext(void 0);function Bl(){return $n.useContext(Si)}var Hl=(function(e){return e[e.popupOpen=qo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var Dl="data-base-ui-tooltip-trigger";function zl(e){if("composedPath"in e){let o=e.composedPath();for(let n=0;ng.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),G=pi(y,{enabled:!R}).reference,K=X=>{let pe=O.current,ue=zl(X),vt=te(ue),Te=b.current,Ve=Te&&ue&&ie(Te,ue);if(vt&&g.select("open")&&g.select("lastOpenChangeReason")===U.triggerHover){g.setOpen(!1,ee(U.triggerHover,X));return}if(pe&&!vt&&Ve&&!N.current&&!g.select("open")&&Te&&Rt(Z.current)){let Ke=()=>{!O.current&&!N.current&&!g.select("open")&&g.setOpen(!0,ee(U.triggerHover,X,Te))},He=W();He===0?(M.clear(),Ke()):M.start(He,Ke)}},J=g.useState("triggerProps",T);return Ce("button",t,{state:{open:w},ref:[o,E,b],props:[se,G,T||H!=="none"?J:void 0,{onMouseOver(X){K(X.nativeEvent)},onFocus(X){oe(zl(X.nativeEvent))&&X.preventBaseUIHandler()},onMouseLeave(){O.current=!1,M.clear(),Z.current=void 0},onPointerEnter(X){Z.current=X.pointerType},onPointerDown(X){Z.current=X.pointerType,g.set("closeOnClick",l),l&&!g.select("open")&&g.cancelPendingOpen(X.nativeEvent)},onClick(X){l&&!g.select("open")&&g.cancelPendingOpen(X.nativeEvent)},id:v,[Hl.triggerDisabled]:R?"":void 0,[Dl]:R?void 0:""},m],stateAttributesMapping:pl})});var Vl=h(z(),1);var tr=h(z(),1),Ei=tr.createContext(void 0);function Fl(){let e=tr.useContext(Ei);if(e===void 0)throw new Error(Pe(70));return e}var Ti=h(Q(),1),Wl=Vl.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t;return Ze().useState("mounted")||n?(0,Ti.jsx)(Ei.Provider,{value:n,children:(0,Ti.jsx)(Ll,{ref:o,...r})}):null});var nr=h(z(),1);var or=h(z(),1),ki=or.createContext(void 0);function ko(){let e=or.useContext(ki);if(e===void 0)throw new Error(Pe(71));return e}var Yl=h(Q(),1),Ul=nr.forwardRef(function(t,o){let{render:n,className:r,anchor:i,positionMethod:s="absolute",side:a="top",align:d="center",sideOffset:c=0,alignOffset:l=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:u=!1,disableAnchorTracking:g=!1,collisionAvoidance:v=Qa,style:_,...w}=t,y=Ze(),b=Fl(),S=y.useState("open"),x=y.useState("mounted"),E=y.useState("trackCursorAxis"),T=y.useState("disableHoverablePopup"),k=y.useState("floatingRootContext"),C=y.useState("instantType"),j=y.useState("transitionStatus"),A=y.useState("hasViewport"),L=yl({anchor:i,positionMethod:s,floatingRootContext:k,mounted:x,side:a,sideOffset:c,align:d,alignOffset:l,collisionBoundary:f,collisionPadding:p,sticky:u,arrowPadding:m,disableAnchorTracking:g,keepMounted:b,collisionAvoidance:v,adaptiveOrigin:A?hl:void 0}),I=nr.useMemo(()=>({open:S,side:L.side,align:L.align,anchorHidden:L.anchorHidden,instant:E!=="none"?"tracking-cursor":C}),[S,L.side,L.align,L.anchorHidden,E,C]),R=xl(t,I,{styles:L.positionerStyles,transitionStatus:j,props:w,refs:[o,y.useStateSetter("positionerElement")],hidden:!x,inert:!S||E==="both"||T});return(0,Yl.jsx)(ki.Provider,{value:L,children:R})});var Gl=h(z(),1);var bg={...Ro,...wa},Xl=Gl.forwardRef(function(t,o){let{render:n,className:r,style:i,...s}=t,a=Ze(),{side:d,align:c}=ko(),l=a.useState("open"),f=a.useState("instantType"),p=a.useState("transitionStatus"),m=a.useState("popupProps"),u=a.useState("floatingRootContext"),g=a.useState("disabled"),v=a.useState("closeDelay");Pn({open:l,ref:a.context.popupRef,onComplete(){l&&a.context.onOpenChangeComplete?.(!0)}}),bi(u,{enabled:!g,closeDelay:v});let _=a.useStateSetter("popupElement");return Ce("div",t,{state:{open:l,side:d,align:c,instant:f,transitionStatus:p},ref:[o,a.context.popupRef,_],props:[m,Xn(p),s],stateAttributesMapping:bg})});var Kl=h(z(),1);var ql=Kl.forwardRef(function(t,o){let{render:n,className:r,style:i,...s}=t,a=Ze(),{arrowRef:d,side:c,align:l,arrowUncentered:f,arrowStyles:p}=ko(),m=a.useState("open"),u=a.useState("instantType");return Ce("div",t,{state:{open:m,side:c,align:l,uncentered:f,instant:u},ref:[o,d],props:[{style:p,"aria-hidden":!0},s],stateAttributesMapping:Ro})});var Pi=h(z(),1);var Ci=h(Q(),1),Zl=function(t){let{delay:o,closeDelay:n,timeout:r=400}=t,i=Pi.useMemo(()=>({delay:o,closeDelay:n}),[o,n]),s=Pi.useMemo(()=>({open:o,close:n}),[o,n]);return(0,Ci.jsx)(Si.Provider,{value:i,children:(0,Ci.jsx)(Wr,{delay:s,timeoutMs:r,children:t.children})})};var Jl=h(z(),1);var Ql=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var hg={activationDirection:e=>e?{"data-activation-direction":e}:null},$l=Jl.forwardRef(function(t,o){let{render:n,className:r,style:i,children:s,...a}=t,d=Ze(),c=ko(),l=d.useState("instantType"),{children:f,state:p}=Al({store:d,side:c.side,cssVars:Ql,children:s}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return Ce("div",t,{state:m,ref:o,props:[a,{children:f}],stateAttributesMapping:hg})});var Qo=class{constructor(){this.store=new To}open(t){let o=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!o)throw new Error(Pe(81,t));this.store.setOpen(!0,ee(U.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,ee(U.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ed(){return new Qo}function bt(e){return Ce(e.defaultTagName??"div",e,e)}var nd=h(de(),1),Ai="data-wp-hash";function Oi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&vg(document)),e.__wpStyleRuntime}function wg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ai}]`))if(o.getAttribute(Ai)===t)return!0;return!1}function rd(e,t,o){if(!e.head)return;let n=Oi(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(wg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ai,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function vg(e){let t=Oi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)rd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function id(e,t){let o=Oi();o.styles.set(e,t);for(let n of o.documents.keys())rd(n,e,t)}typeof process>"u",id("a495f9d138",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var td={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",id("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var od={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Je=(0,nd.forwardRef)(function({variant:t="body-md",render:o,className:n,...r},i){return bt({render:o,defaultTagName:"span",ref:i,props:ye(r,{className:$(td.text,od.heading,od.p,td[t],n)})})});var ld=h(Q(),1),Ni="data-wp-hash";function Li(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&yg(document)),e.__wpStyleRuntime}function _g(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ni}]`))if(o.getAttribute(Ni)===t)return!0;return!1}function cd(e,t,o){if(!e.head)return;let n=Li(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(_g(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ni,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function yg(e){let t=Li();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)cd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function xg(e,t){let o=Li();o.styles.set(e,t);for(let n of o.documents.keys())cd(n,e,t)}typeof process>"u",xg("9db2873e7f","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");var sd={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},Ii=(0,ad.forwardRef)(function({intent:t="none",className:o,...n},r){return(0,ld.jsx)(Je,{ref:r,className:$(sd.badge,sd[`is-${t}-intent`],o),...n,variant:"body-sm"})});var rr=h(de(),1),dd=h(Ot(),1),fd=h(Q(),1);import{speak as Rg}from"@wordpress/a11y";var Mi="data-wp-hash";function Bi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Eg(document)),e.__wpStyleRuntime}function Sg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Mi}]`))if(o.getAttribute(Mi)===t)return!0;return!1}function ud(e,t,o){if(!e.head)return;let n=Bi(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Sg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Mi,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Eg(e){let t=Bi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)ud(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function ir(e,t){let o=Bi();o.styles.set(e,t);for(let n of o.documents.keys())ud(n,e,t)}typeof process>"u",ir("b74f1ac304",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var Jo={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"};typeof process>"u",ir("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var Tg={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",ir("da99a163ac","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus{outline:none}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){@include mixins.focus-ring()}}}");var kg={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active"};typeof process>"u",ir("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var Pg={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},pd=(0,rr.forwardRef)(function({tone:t="brand",variant:o="solid",size:n="default",className:r,focusableWhenDisabled:i=!0,disabled:s,loading:a,loadingAnnouncement:d=(0,dd.__)("Loading"),children:c,...l},f){let p=$(Pg.button,Tg["box-sizing"],kg["outset-ring--focus-except-active"],o!=="unstyled"&&Jo.button,Jo[`is-${t}`],Jo[`is-${o}`],Jo[`is-${n}`],a&&Jo["is-loading"],r);return(0,rr.useEffect)(()=>{a&&d&&Rg(d)},[a,d]),(0,fd.jsx)(_i,{ref:f,className:p,focusableWhenDisabled:i,disabled:s??a,...l,children:c})});var wd=h(de(),1);var gd=h(de(),1),bd=h($t(),1),hd=h(Q(),1),eo=(0,gd.forwardRef)(function({icon:t,size:o=24,...n},r){return(0,hd.jsx)(bd.SVG,{ref:r,...t.props,...n,width:o,height:o})});var _d=h(Q(),1),Hi="data-wp-hash";function zi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ag(document)),e.__wpStyleRuntime}function Cg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Hi}]`))if(o.getAttribute(Hi)===t)return!0;return!1}function vd(e,t,o){if(!e.head)return;let n=zi(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Cg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Hi,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Ag(e){let t=zi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)vd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Og(e,t){let o=zi();o.styles.set(e,t);for(let n of o.documents.keys())vd(n,e,t)}typeof process>"u",Og("b74f1ac304",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var Ng={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"},Di=(0,wd.forwardRef)(function({className:t,icon:o,...n},r){return(0,_d.jsx)(eo,{ref:r,icon:o,className:$(Ng.icon,t),size:24,...n})});Di.displayName="Button.Icon";var sr=Object.assign(pd,{Icon:Di});var ar=h($t(),1),ji=h(Q(),1),Fi=(0,ji.jsx)(ar.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ji.jsx)(ar.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});var cr=h($t(),1),Vi=h(Q(),1),Wi=(0,Vi.jsx)(cr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Vi.jsx)(cr.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});var lr=h($t(),1),Yi=h(Q(),1),Ui=(0,Yi.jsx)(lr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Yi.jsx)(lr.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var dr=h($t(),1),Gi=h(Q(),1),Xi=(0,Gi.jsx)(dr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Gi.jsx)(dr.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var ur=h($t(),1),Ki=h(Q(),1),qi=(0,Ki.jsx)(ur.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Ki.jsx)(ur.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var yd=h(de(),1);function Zi(e,t,o){return(0,yd.cloneElement)(e??t,{children:o})}var Lg=h(Rd(),1);var Ed=h(Qi(),1),{lock:h4,unlock:Td}=(0,Ed.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/ui");function Ig(){let e=Lg;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return Td(e.privateApis).ThemeProvider}var kd=Ig();var Pd=h(de(),1),Ji="data-wp-hash";function $i(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Bg(document)),e.__wpStyleRuntime}function Mg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ji}]`))if(o.getAttribute(Ji)===t)return!0;return!1}function Cd(e,t,o){if(!e.head)return;let n=$i(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Mg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ji,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Bg(e){let t=$i();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Cd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Hg(e,t){let o=$i();o.styles.set(e,t);for(let n of o.documents.keys())Cd(n,e,t)}typeof process>"u",Hg("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var zg={stack:"_19ce0419607e1896__stack"},Dg={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Po=(0,Pd.forwardRef)(function({direction:t,gap:o,align:n,justify:r,wrap:i,render:s,...a},d){let c={gap:o&&Dg[o],alignItems:n,justifyContent:r,flexDirection:t,flexWrap:i};return bt({render:s,ref:d,props:ye(a,{style:c,className:zg.stack})})});var Kd=h(de(),1);var Vd=h(de(),1);var Id=h(de(),1);var ts="data-wp-hash";function os(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Fg(document)),e.__wpStyleRuntime}function jg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ts}]`))if(o.getAttribute(ts)===t)return!0;return!1}function Od(e,t,o){if(!e.head)return;let n=os(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(jg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ts,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Fg(e){let t=os();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Od(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Vg(e,t){let o=os();o.styles.set(e,t);for(let n of o.documents.keys())Od(n,e,t)}typeof process>"u",Vg("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var Ad={slot:"_11fc52b637ff8a7e__slot"},Nd="data-wp-compat-overlay-slot";function Wg(){return typeof document>"u"?null:document}function Yg(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var ht=null;function es(e){return e.setAttribute("aria-hidden","false"),e}function Ug(e){let t=e.createElement("div");return t.setAttribute(Nd,""),Ad.slot&&t.classList.add(Ad.slot),e.body.appendChild(t),t}function Ld(){if(typeof window>"u"||!Yg()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=Wg();if(!e||!e.body)return;if(ht&&ht.ownerDocument===e&&ht.isConnected)return es(ht);let t=e.querySelector(`[${Nd}]`);return t instanceof HTMLDivElement?(ht=es(t),ht):(ht?.isConnected&&ht.remove(),ht=es(Ug(e)),ht)}var Md=h(Q(),1),Bd=(0,Id.forwardRef)(function({container:t,...o},n){return(0,Md.jsx)(Qe.Portal,{container:t??Ld(),...o,ref:n})});var Hd=h(de(),1),jd=h(Q(),1),ns="data-wp-hash";function rs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Xg(document)),e.__wpStyleRuntime}function Gg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ns}]`))if(o.getAttribute(ns)===t)return!0;return!1}function zd(e,t,o){if(!e.head)return;let n=rs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Gg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ns,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Xg(e){let t=rs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)zd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Dd(e,t){let o=rs();o.styles.set(e,t);for(let n of o.documents.keys())zd(n,e,t)}typeof process>"u",Dd("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var Kg={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Dd("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var qg={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},Fd=(0,Hd.forwardRef)(function({align:t="center",className:o,side:n="top",sideOffset:r=4,...i},s){return(0,jd.jsx)(Qe.Positioner,{ref:s,align:t,side:n,sideOffset:r,...i,className:$(Kg["box-sizing"],qg.positioner,o)})});var $o=h(Q(),1),is="data-wp-hash";function ss(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Qg(document)),e.__wpStyleRuntime}function Zg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${is}]`))if(o.getAttribute(is)===t)return!0;return!1}function Wd(e,t,o){if(!e.head)return;let n=ss(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Zg(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(is,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Qg(e){let t=ss();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Wd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Jg(e,t){let o=ss();o.styles.set(e,t);for(let n of o.documents.keys())Wd(n,e,t)}typeof process>"u",Jg("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var $g={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},eb={background:"#1e1e1e"},as=(0,Vd.forwardRef)(function({portal:t,positioner:o,children:n,className:r,...i},s){let a=(0,$o.jsx)(kd,{color:eb,children:(0,$o.jsx)(Qe.Popup,{ref:s,className:$($g.popup,r),...i,children:n})}),d=Zi(o,(0,$o.jsx)(Fd,{}),a);return Zi(t,(0,$o.jsx)(Bd,{}),d)});var Yd=h(de(),1),Ud=h(Q(),1),cs=(0,Yd.forwardRef)(function(t,o){return(0,Ud.jsx)(Qe.Trigger,{ref:o,...t})});var Gd=h(Q(),1);function ls(e){return(0,Gd.jsx)(Qe.Root,{...e})}var lt=h(Q(),1),ds="data-wp-hash";function us(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&nb(document)),e.__wpStyleRuntime}function ob(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ds}]`))if(o.getAttribute(ds)===t)return!0;return!1}function qd(e,t,o){if(!e.head)return;let n=us(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(ob(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ds,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function nb(e){let t=us();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)qd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function rb(e,t){let o=us();o.styles.set(e,t);for(let n of o.documents.keys())qd(n,e,t)}typeof process>"u",rb("c5cdafb1bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}");var Xd={"icon-button":"_28cfdc260e755391__icon-button",icon:"f1c70d719989a85a__icon"},fs=(0,Kd.forwardRef)(function({label:t,className:o,children:n,disabled:r,focusableWhenDisabled:i=!0,icon:s,size:a,shortcut:d,positioner:c,...l},f){let p=$(Xd["icon-button"],o);return(0,lt.jsxs)(ls,{children:[(0,lt.jsx)(cs,{ref:f,disabled:r&&!i,render:(0,lt.jsx)(sr,{...l,size:a,"aria-label":t,"aria-keyshortcuts":d?.ariaKeyShortcut,disabled:r,focusableWhenDisabled:i}),className:p,children:(0,lt.jsx)(eo,{icon:s,size:24,className:Xd.icon})}),(0,lt.jsxs)(as,{positioner:c,children:[t,d&&(0,lt.jsxs)(lt.Fragment,{children:[" ",(0,lt.jsx)("span",{"aria-hidden":"true",children:d.displayShortcut})]})]})]})});var Zd=h(de(),1),Qd=h(Ot(),1),Co=h(Q(),1),ps="data-wp-hash";function ms(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&sb(document)),e.__wpStyleRuntime}function ib(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ps}]`))if(o.getAttribute(ps)===t)return!0;return!1}function Jd(e,t,o){if(!e.head)return;let n=ms(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(ib(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ps,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function sb(e){let t=ms();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Jd(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function pr(e,t){let o=ms();o.styles.set(e,t);for(let n of o.documents.keys())Jd(n,e,t)}typeof process>"u",pr("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var ab={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",pr("da99a163ac","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus{outline:none}._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){@include mixins.focus-ring()}}}");var cb={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active"};typeof process>"u",pr("e8e6a9be37",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');var fr={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};typeof process>"u",pr("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var lb={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},en=(0,Zd.forwardRef)(function({children:t,variant:o="default",tone:n="brand",openInNewTab:r=!1,render:i,className:s,...a},d){return bt({render:i,defaultTagName:"a",ref:d,props:ye(a,{className:$(lb.a,ab["box-sizing"],cb["outset-ring--focus-except-active"],o!=="unstyled"&&fr.link,o!=="unstyled"&&fr[`is-${n}`],o==="unstyled"&&fr["is-unstyled"],s),target:r?"_blank":void 0,children:(0,Co.jsxs)(Co.Fragment,{children:[t,r&&(0,Co.jsx)("span",{className:fr["link-icon"],role:"img","aria-label":(0,Qd.__)("(opens in a new tab)")})]})})})});var tn={};At(tn,{ActionButton:()=>xu,ActionLink:()=>Eu,Actions:()=>fu,CloseIcon:()=>hu,Description:()=>lu,Root:()=>tu,Title:()=>iu});var Ao=h(de(),1);import{speak as db}from"@wordpress/a11y";var Oo=h(Q(),1),bs="data-wp-hash";function hs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&fb(document)),e.__wpStyleRuntime}function ub(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${bs}]`))if(o.getAttribute(bs)===t)return!0;return!1}function $d(e,t,o){if(!e.head)return;let n=hs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(ub(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(bs,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function fb(e){let t=hs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)$d(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function eu(e,t){let o=hs();o.styles.set(e,t);for(let n of o.documents.keys())$d(n,e,t)}typeof process>"u",eu("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var pb={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",eu("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var gs={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},mb={neutral:null,info:Xi,warning:Fi,success:qi,error:Ui};function gb(e){return e==="error"?"assertive":"polite"}function bb(e){if(e){if(typeof e=="string")return e;try{return(0,Ao.renderToString)(e)}catch{return}}}function hb(e,t){let o=bb(e);(0,Ao.useEffect)(()=>{o&&db(o,t)},[o,t])}var tu=(0,Ao.forwardRef)(function({intent:t="neutral",children:o,icon:n,spokenMessage:r=o,politeness:i=gb(t),render:s,...a},d){hb(r,i);let c=n===null?null:n??mb[t],l=$(gs.notice,gs[`is-${t}`],pb["box-sizing"]);return bt({defaultTagName:"div",render:s,ref:d,props:ye({className:l,children:(0,Oo.jsxs)(Oo.Fragment,{children:[o,c&&(0,Oo.jsx)(eo,{className:gs.icon,icon:c})]})},a)})});var ou=h(de(),1);var ru=h(Q(),1),ws="data-wp-hash";function vs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&vb(document)),e.__wpStyleRuntime}function wb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ws}]`))if(o.getAttribute(ws)===t)return!0;return!1}function nu(e,t,o){if(!e.head)return;let n=vs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(wb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(ws,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function vb(e){let t=vs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)nu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function _b(e,t){let o=vs();o.styles.set(e,t);for(let n of o.documents.keys())nu(n,e,t)}typeof process>"u",_b("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var yb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},iu=(0,ou.forwardRef)(function({className:t,...o},n){return(0,ru.jsx)(Je,{ref:n,variant:"heading-md",className:$(yb.title,t),...o})});var su=h(de(),1);var cu=h(Q(),1),_s="data-wp-hash";function ys(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Rb(document)),e.__wpStyleRuntime}function xb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${_s}]`))if(o.getAttribute(_s)===t)return!0;return!1}function au(e,t,o){if(!e.head)return;let n=ys(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(xb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(_s,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Rb(e){let t=ys();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)au(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Sb(e,t){let o=ys();o.styles.set(e,t);for(let n of o.documents.keys())au(n,e,t)}typeof process>"u",Sb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Eb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},lu=(0,su.forwardRef)(function({className:t,...o},n){return(0,cu.jsx)(Je,{ref:n,variant:"body-md",className:$(Eb.description,t),...o})});var du=h(de(),1);var xs="data-wp-hash";function Rs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&kb(document)),e.__wpStyleRuntime}function Tb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${xs}]`))if(o.getAttribute(xs)===t)return!0;return!1}function uu(e,t,o){if(!e.head)return;let n=Rs(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Tb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(xs,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function kb(e){let t=Rs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)uu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Pb(e,t){let o=Rs();o.styles.set(e,t);for(let n of o.documents.keys())uu(n,e,t)}typeof process>"u",Pb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Cb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},fu=(0,du.forwardRef)(function({render:t,...o},n){return bt({defaultTagName:"div",render:t,ref:n,props:ye({className:Cb.actions},o)})});var pu=h(de(),1),mu=h(Ot(),1);var bu=h(Q(),1),Ss="data-wp-hash";function Es(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ob(document)),e.__wpStyleRuntime}function Ab(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ss}]`))if(o.getAttribute(Ss)===t)return!0;return!1}function gu(e,t,o){if(!e.head)return;let n=Es(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Ab(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ss,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Ob(e){let t=Es();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)gu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Nb(e,t){let o=Es();o.styles.set(e,t);for(let n of o.documents.keys())gu(n,e,t)}typeof process>"u",Nb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Lb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},hu=(0,pu.forwardRef)(function({className:t,icon:o=Wi,label:n=(0,mu.__)("Dismiss"),...r},i){return(0,bu.jsx)(fs,{...r,ref:i,className:$(Lb["close-icon"],t),variant:"minimal",size:"small",tone:"neutral",icon:o,label:n})});var vu=h(de(),1);var yu=h(Q(),1),Ts="data-wp-hash";function ks(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Mb(document)),e.__wpStyleRuntime}function Ib(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ts}]`))if(o.getAttribute(Ts)===t)return!0;return!1}function _u(e,t,o){if(!e.head)return;let n=ks(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Ib(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ts,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Mb(e){let t=ks();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)_u(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Bb(e,t){let o=ks();o.styles.set(e,t);for(let n of o.documents.keys())_u(n,e,t)}typeof process>"u",Bb("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var wu={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},xu=(0,vu.forwardRef)(function({className:t,loading:o,loadingAnnouncement:n,variant:r,...i},s){return(0,yu.jsx)(sr,{...i,...o!==void 0?{loading:o,loadingAnnouncement:n??""}:{},ref:s,size:"compact",tone:"neutral",variant:r,className:$(wu["action-button"],wu[`is-action-button-${r}`],t)})});var Ru=h(de(),1);var Cs=h(Q(),1),Ps="data-wp-hash";function As(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&zb(document)),e.__wpStyleRuntime}function Hb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Ps}]`))if(o.getAttribute(Ps)===t)return!0;return!1}function Su(e,t,o){if(!e.head)return;let n=As(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Hb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Ps,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function zb(e){let t=As();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Su(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Db(e,t){let o=As();o.styles.set(e,t);for(let n of o.documents.keys())Su(n,e,t)}typeof process>"u",Db("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var jb={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},Eu=(0,Ru.forwardRef)(function({className:t,render:o,...n},r){return(0,Cs.jsx)(Je,{ref:r,className:$(jb["action-link"],t),...n,variant:"body-md",render:(0,Cs.jsx)(en,{tone:"neutral",variant:"default",render:o})})});var Tu=h(de(),1),ku=h(Q(),1),Pu=(0,Tu.forwardRef)(({children:e,className:t,ariaLabel:o,as:n="div",...r},i)=>(0,ku.jsx)(n,{ref:i,className:$("admin-ui-navigable-region",t),"aria-label":o,role:"region",tabIndex:"-1",...r,children:e}));Pu.displayName="NavigableRegion";var Cu=Pu;var Ou=h(on(),1),{Fill:Nu,Slot:Lu}=(0,Ou.createSlotFill)("SidebarToggle");var $e=h(Q(),1),Os="data-wp-hash";function Ns(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Vb(document)),e.__wpStyleRuntime}function Fb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Os}]`))if(o.getAttribute(Os)===t)return!0;return!1}function Iu(e,t,o){if(!e.head)return;let n=Ns(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Fb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Os,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Vb(e){let t=Ns();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Iu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Wb(e,t){let o=Ns();o.styles.set(e,t);for(let n of o.documents.keys())Iu(n,e,t)}typeof process>"u",Wb("ddd9aab364","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var to={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function Mu({headingLevel:e=1,breadcrumbs:t,badges:o,visual:n,title:r,subTitle:i,actions:s,showSidebarToggle:a=!0}){let d=`h${e}`;return(0,$e.jsxs)(Po,{direction:"column",className:to.header,children:[(0,$e.jsxs)(Po,{className:to["header-content"],direction:"row",gap:"sm",justify:"space-between",children:[(0,$e.jsxs)(Po,{direction:"row",gap:"sm",align:"center",justify:"start",children:[a&&(0,$e.jsx)(Lu,{bubblesVirtually:!0,className:to["sidebar-toggle-slot"]}),n&&(0,$e.jsx)("div",{className:to["header-visual"],"aria-hidden":"true",children:n}),r&&(0,$e.jsx)(Je,{className:to["header-title"],render:(0,$e.jsx)(d,{}),variant:"heading-lg",children:r}),t,o]}),s&&(0,$e.jsx)(Po,{align:"center",className:to["header-actions"],direction:"row",gap:"sm",children:s})]}),i&&(0,$e.jsx)(Je,{render:(0,$e.jsx)("p",{}),variant:"body-md",className:to["header-subtitle"],children:i})]})}var nn=h(Q(),1),Is="data-wp-hash";function Ms(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ub(document)),e.__wpStyleRuntime}function Yb(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Is}]`))if(o.getAttribute(Is)===t)return!0;return!1}function Bu(e,t,o){if(!e.head)return;let n=Ms(),r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(Yb(e,t)){r.add(t);return}let i=e.createElement("style");i.setAttribute(Is,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Ub(e){let t=Ms();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,n]of t.styles)Bu(e,o,n);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Gb(e,t){let o=Ms();o.styles.set(e,t);for(let n of o.documents.keys())Bu(n,e,t)}typeof process>"u",Gb("ddd9aab364","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var Ls={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function Hu({headingLevel:e,breadcrumbs:t,badges:o,visual:n,title:r,subTitle:i,children:s,className:a,actions:d,ariaLabel:c,hasPadding:l=!1,showSidebarToggle:f=!0}){let p=$(Ls.page,a);return(0,nn.jsxs)(Cu,{className:p,ariaLabel:c??(typeof r=="string"?r:""),children:[(r||t||o||d||n)&&(0,nn.jsx)(Mu,{headingLevel:e,breadcrumbs:t,badges:o,visual:n,title:r,subTitle:i,actions:d,showSidebarToggle:f}),l?(0,nn.jsx)("div",{className:$(Ls.content,Ls["has-padding"]),children:s}):s]})}Hu.SidebarToggleFill=Nu;var Bs=Hu;var dt=h(on()),lf=h(rn()),df=h(de()),Tt=h(Ot()),uf=h(mr());import{privateApis as l0}from"@wordpress/connectors";var ju=h(Qi()),{lock:l3,unlock:No}=(0,ju.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/routes");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='09e9b056ea']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","09e9b056ea"),e.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 92% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 58% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 8% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 42% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page>p{color:#949494}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")),document.head.appendChild(e)}var cn=h(on()),Ws=h(mr()),ln=h(rn()),wt=h(de()),Xe=h(Ot()),rf=h(Hs()),sf=h(Wu());var gr=h(on()),js=h(de()),Qu=h(rn()),oo=h(Ot());import{__experimentalRegisterConnector as Xb,__experimentalConnectorItem as Zu,__experimentalDefaultConnectorSettings as Kb,__experimentalApplicationPasswordConnectorSettings as qb,privateApis as Zb}from"@wordpress/connectors";var zs=h(mr()),an=h(rn()),sn=h(de()),fe=h(Ot()),Yu=h(Hs());function Ds({file:e,settingName:t,connectorName:o,isInstalled:n,isActivated:r,keySource:i="none",initialIsConnected:s=!1}){let[a,d]=(0,sn.useState)(!1),[c,l]=(0,sn.useState)(!1),[f,p]=(0,sn.useState)(s),[m,u]=(0,sn.useState)(null),g=e?.replace(/\.php$/,""),v=g?.includes("/")?g.split("/")[0]:g,{derivedPluginStatus:_,canManagePlugins:w,currentApiKey:y,currentUsername:b,hasStoredCredentials:S,hasResolvedSettings:x,canInstallPlugins:E}=(0,an.useSelect)(K=>{let J=K(zs.store),me=J.getEntityRecord("root","site")?.[t],le=typeof me=="string"?me:"",X=typeof me=="object"&&me!==null?me:void 0,pe=X!==void 0?!!X.username&&!!X.password:!!le,ue=J.hasFinishedResolution("getEntityRecord",["root","site"]),vt=!!J.canUser("create",{kind:"root",name:"plugin"}),Te={currentApiKey:le,currentUsername:X?.username??"",hasStoredCredentials:pe,hasResolvedSettings:ue,canInstallPlugins:vt};if(!e)return{...Te,derivedPluginStatus:ue?"active":"checking",canManagePlugins:void 0};let Ve=J.getEntityRecord("root","plugin",g);if(!J.hasFinishedResolution("getEntityRecord",["root","plugin",g]))return{...Te,derivedPluginStatus:"checking",canManagePlugins:void 0};if(Ve){let no=Ve.status==="active"||Ve.status==="network-active";return{...Te,derivedPluginStatus:no?"active":"inactive",canManagePlugins:!0}}let He="not-installed";return r?He="active":n&&(He="inactive"),{...Te,derivedPluginStatus:He,canManagePlugins:!1}},[e,g,t,n,r]),T=m??_,k=w,C=T==="active"&&f||m==="active"&&S,{saveEntityRecord:j,invalidateResolution:A}=(0,an.useDispatch)(zs.store),{createSuccessNotice:L,createErrorNotice:I}=(0,an.useDispatch)(Yu.store),R=K=>j("root","site",{[t]:K},{throwOnError:!0}),N=()=>{L((0,fe.sprintf)((0,fe.__)("%s connected successfully."),o),{id:"connector-connect-success",type:"snackbar"})},H=()=>{L((0,fe.sprintf)((0,fe.__)("%s disconnected."),o),{id:"connector-disconnect-success",type:"snackbar"})},P=()=>{I((0,fe.sprintf)((0,fe.__)("Failed to disconnect %s."),o),{id:"connector-disconnect-error",type:"snackbar"})},O=async()=>{if(v){l(!0);try{await j("root","plugin",{slug:v,status:"active"},{throwOnError:!0}),u("active"),A("getEntityRecord",["root","site"]),d(!0),L((0,fe.sprintf)((0,fe.__)("Plugin for %s installed and activated successfully."),o),{id:"connector-plugin-install-success",type:"snackbar"})}catch{I((0,fe.sprintf)((0,fe.__)("Failed to install plugin for %s."),o),{id:"connector-plugin-install-error",type:"snackbar"})}finally{l(!1)}}},M=async()=>{if(e){l(!0);try{await j("root","plugin",{plugin:g,status:"active"},{throwOnError:!0}),u("active"),A("getEntityRecord",["root","site"]),d(!0),L((0,fe.sprintf)((0,fe.__)("Plugin for %s activated successfully."),o),{id:"connector-plugin-activate-success",type:"snackbar"})}catch{I((0,fe.sprintf)((0,fe.__)("Failed to activate plugin for %s."),o),{id:"connector-plugin-activate-error",type:"snackbar"})}finally{l(!1)}}};return{pluginStatus:T,canInstallPlugins:E,canActivatePlugins:k,isExpanded:a,setIsExpanded:d,isBusy:c,isConnected:C,currentApiKey:y,currentUsername:b,hasResolvedSettings:x,keySource:i,handleButtonClick:()=>{if(T==="not-installed"){if(E===!1)return;O()}else if(T==="inactive"){if(k===!1)return;M()}else d(!a)},getButtonLabel:()=>{if(c)return T==="not-installed"?(0,fe.__)("Installing\u2026"):(0,fe.__)("Activating\u2026");if(a)return(0,fe.__)("Cancel");if(C)return(0,fe.__)("Edit");switch(T){case"checking":return(0,fe.__)("Checking\u2026");case"not-installed":return(0,fe.__)("Install");case"inactive":return(0,fe.__)("Activate");case"active":return(0,fe.__)("Set up")}},saveApiKey:async K=>{let J=y;try{let le=(await R(K))?.[t];if(K&&(le===J||!le))throw new Error("It was not possible to connect to the provider using this key.");p(!0),N()}catch(ne){throw console.error("Failed to save API key:",ne),ne}},removeApiKey:async()=>{try{await R(""),p(!1),H()}catch(K){console.error("Failed to remove API key:",K),P()}},saveCredentials:async({username:K,applicationPassword:J})=>{try{let le=(await R({username:K,password:J}))?.[t];if(!le?.username||!le?.password)throw new Error((0,fe.__)("It was not possible to save these credentials."));p(!0),N()}catch(ne){throw console.error("Failed to save credentials:",ne),ne}},removeCredentials:async()=>{try{await R({username:"",password:""}),p(!1),H()}catch(K){console.error("Failed to remove credentials:",K),P()}}}}var Uu=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})),Gu=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",fill:"#D97757"})),Xu=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",fill:"#F0F0F0"}),React.createElement("path",{d:"M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",fill:"#949494"})),Ku=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("rect",{width:"44",height:"44",fill:"#357B49",rx:"6"}),React.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",clipRule:"evenodd"})),qu=()=>React.createElement("svg",{width:"40",height:"40",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-0)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-1)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-2)"}),React.createElement("defs",null,React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},React.createElement("stop",{stopColor:"#08B962"}),React.createElement("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},React.createElement("stop",{stopColor:"#F94543"}),React.createElement("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},React.createElement("stop",{stopColor:"#FABC12"}),React.createElement("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"}))));var{store:Qb}=No(Zb);function Ju(){try{return JSON.parse(document.getElementById("wp-script-module-data-options-connectors-wp-admin")?.textContent??"{}")}catch{return{}}}function Fs(){return Ju().connectors??{}}function $u(){return!!Ju().isFileModDisabled}var Jb={google:qu,openai:Uu,anthropic:Gu,akismet:Ku};function $b(e,t){if(t)return React.createElement("img",{src:t,alt:"",width:40,height:40});let o=Jb[e];return React.createElement(o||Xu,null)}var e0=()=>React.createElement("span",{style:{color:"#345b37",backgroundColor:"#eff8f0",padding:"4px 12px",borderRadius:"2px",fontSize:"13px",fontWeight:"var(--wpds-typography-font-weight-emphasis)",whiteSpace:"nowrap"}},(0,oo.__)("Connected")),t0=({slug:e})=>React.createElement(en,{href:(0,oo.sprintf)((0,oo.__)("https://wordpress.org/plugins/%s/"),e),openInNewTab:!0},(0,oo.__)("Learn more")),o0=()=>React.createElement(Ii,null,(0,oo.__)("Not available"));function ef({isConnected:e,showUnavailableBadge:t,pluginSlug:o,isExpanded:n,isBusy:r,pluginStatus:i,actionButtonRef:s,handleButtonClick:a,getButtonLabel:d}){return React.createElement(gr.__experimentalHStack,{spacing:3,expanded:!1},e&&React.createElement(e0,null),t&&(o?React.createElement(t0,{slug:o}):React.createElement(o0,null)),!t&&React.createElement(gr.Button,{ref:s,variant:n||e?"tertiary":"secondary",size:"compact",onClick:a,disabled:i==="checking"||r,isBusy:r,accessibleWhenDisabled:!0},d()))}function tf(e){let t=e?.replace(/\.php$/,"");return t?.includes("/")?t.split("/")[0]:t}function n0({name:e,description:t,logo:o,authentication:n,plugin:r}){let i=n?.method==="api_key"?n:void 0,s=i?.settingName??"",a=i?.credentialsUrl??void 0,d=tf(r?.file),{pluginStatus:c,canInstallPlugins:l,canActivatePlugins:f,isExpanded:p,setIsExpanded:m,isBusy:u,isConnected:g,currentApiKey:v,hasResolvedSettings:_,keySource:w,handleButtonClick:y,getButtonLabel:b,saveApiKey:S,removeApiKey:x}=Ds({file:r?.file,settingName:s,connectorName:e,isInstalled:r?.isInstalled,isActivated:r?.isActivated,keySource:i?.keySource,initialIsConnected:i?.isConnected}),E=w==="env"||w==="constant",T=c==="not-installed"&&l===!1||c==="inactive"&&f===!1,k=(0,js.useRef)(null);return React.createElement(Zu,{className:d?`connector-item--${d}`:void 0,logo:o,name:e,description:t,actionArea:React.createElement(ef,{isConnected:g,showUnavailableBadge:T,pluginSlug:d,isExpanded:p,isBusy:u,pluginStatus:c,actionButtonRef:k,handleButtonClick:y,getButtonLabel:b})},p&&c==="active"&&_&&React.createElement(Kb,{key:g?"connected":"setup",initialValue:E?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":v,helpUrl:a,readOnly:g||E,keySource:w,onRemove:E?void 0:async()=>{await x(),k.current?.focus()},onSave:async C=>{await S(C),m(!1),k.current?.focus()}}))}function r0({name:e,description:t,logo:o,authentication:n,plugin:r}){let i=n?.method==="application_password"?n:void 0,s=i?.settingName??"",a=i?.credentialsUrl??void 0,d=tf(r?.file),{pluginStatus:c,canInstallPlugins:l,canActivatePlugins:f,isExpanded:p,setIsExpanded:m,isBusy:u,isConnected:g,currentUsername:v,hasResolvedSettings:_,keySource:w,handleButtonClick:y,getButtonLabel:b,saveCredentials:S,removeCredentials:x}=Ds({file:r?.file,settingName:s,connectorName:e,isInstalled:r?.isInstalled,isActivated:r?.isActivated,keySource:i?.keySource,initialIsConnected:i?.isConnected}),E=w==="env"||w==="constant",T=(0,js.useRef)(null),k=c==="not-installed"&&l===!1||c==="inactive"&&f===!1;return React.createElement(Zu,{className:d?`connector-item--${d}`:void 0,logo:o,name:e,description:t,actionArea:React.createElement(ef,{isConnected:g,showUnavailableBadge:k,pluginSlug:d,isExpanded:p,isBusy:u,pluginStatus:c,actionButtonRef:T,handleButtonClick:y,getButtonLabel:b})},p&&c==="active"&&_&&React.createElement(qb,{key:g?"connected":"setup",initialUsername:E?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":v,helpUrl:a,readOnly:g||E,keySource:w,onRemove:E?void 0:async()=>{await x(),T.current?.focus()},onSave:async C=>{await S(C),m(!1),T.current?.focus()}}))}function of(){let e=Fs(),t=o=>o.replace(/[^a-z0-9-_]/gi,"-");for(let[o,n]of Object.entries(e)){if(o==="akismet"&&!n.plugin?.isInstalled)continue;let{authentication:r}=n,i=t(o),s={name:n.name,description:n.description,type:n.type,logo:$b(o,n.logoUrl),authentication:r,plugin:n.plugin},a=No((0,Qu.select)(Qb)).getConnector(i);r.method==="api_key"&&!a?.render?s.render=n0:r.method==="application_password"&&!a?.render&&(s.render=r0),Xb(i,s)}}function nf(){return React.createElement("div",{className:"ai-plugin-callout__decoration","aria-hidden":"true"},React.createElement("svg",{viewBox:"0 0 248 248",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",focusable:"false",style:{width:"100%",height:"100%"}},React.createElement("image",{href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQAElEQVR4AezdC3ojWW5tYflOzPbIbI/M9sh8+WdrdZ+KpiiKL5FB5KedwN7AeSFIpHRYmfX/PubXVGAqMBV4kQpMw3qRBzXbnApMBT4+pmHNq2AqMBV4mQpMw3qZR3X9RmeGqcCrV2Aa1qs/wdn/VOCNKjAN640e9hx1KvDqFZiG9epPcPY/FThWgZ1q07B2+mDnWFOBPVZgGtYen+qcaSqw0wpMw9rpg51jTQX2WIFpWMee6mhTganAU1ZgGtZTPpbZ1FRgKnCsAtOwjlVltKnAVOApKzAN6ykfy2zqcRWYlV6pAtOwXulpzV6nAm9egWlYb/4CmONPBV6pAtOwXulpve9e//Nw9P/7xL8d7Hy9aQWubFhvWrU59qMr8D+HBcPBna93rcA0rHd98q91bs3q3w9bBv7Bna93rMA0rHd86nPmqcCLVmAa1os+uF/Y9m8u6Q7rvw8bgLnDOhTiXb+mYb3rk3+tc//rYbsaVTjQP18amct4+h9hftt3BaZh7fv57v107rNg7+ec831WYBrWZyHGPHUF/vewu//6xNqg+HMRfyjMrb+edb5pWM/6ZGZfawX86Bc0qTU2/htVYBrWGz3sOepU4NUrMA3r1Z/g7H8q8EYVmIZ1h4c9U04FpgL3qcA0rPvUdWadCkwF7lCBaVh3KOpMORWYCtynAtOw7lPXmfVdKjDnfGgFpmE9tNyz2FRgKnBNBaZhXVO9GTsVmAo8tALTsB5a7llsKjAVuKYCv9uwrtn5jJ0KTAXergLTsN7ukc+BpwKvW4FpWK/77GbnU4G3q8A0rLd75L914Fl3KnB9BaZhXV/DmWEqMBV4UAWmYT2o0LPMVGAqcH0FpmFdX8OZYSowFfhrBe7GpmHdrbQz8VRgKnDrCkzDunVFZ76pwFTgbhWYhnW30s7EU4GpwK0rMA3r1hW9fr6ZYSowFfiiAtOwvijMyFOBqcDzVWAa1vM9k9nRVGAq8EUFpmF9UZiRpwKPqMCs8bMKTMP6Wb0meyowFfjFCkzD+sXiz9JTganAzyowDetn9ZrsqcBU4Bcr8NIN6xfrNktPBaYCv1CBaVi/UPRZciowFbisAtOwLqvbjJoKTAV+oQLTsH6h6LPkBRWYIVOBQwWmYR2KMF9TganAa1RgGtZrPKfZ5VRgKnCowDSsQxHmayowFXimCny9l2lYX9dmIlOBqcCTVWAa1pM9kNnOVGAq8HUFpmF9XZuJTAWmAk9WgWlYT/ZArt/OzDAV2G8FpmHt99nOyaYCu6vANKzdPdK7HOjfDrP+9yf4B/fP138efoeDma+pwP0rMA3r/jXewwqaVFjP8x8HAmIHd74eXIG3W24a1ts98pse+H8Os8HBzNdU4P4VmIZ1/xrvYQU/9v3L4SCwNqh/P2iwagdpvqYC96nANKz71HVmnQpMBe5QgXduWHco526n9B3W9tJ91fi7Pfwc7HkqMA3reZ7FM+/kXw+bc7EeDvTPV1z8jzC/TQXuWYFpWPes7sw9FZgK3LQC07BuWs7dTva/h5P91ye6YGfT2EP4eb9mZ/uowDSsfTzHe5/CHVXQqKzHbjX6YCpwtwpMw7pbaX808f8dsoN7oQOdr6nAVGBbgWlY24o8hvvEzXcnp1YTl3cq51ExTdRe7GldE6ev2vhTgbtV4KyGdbfV33diDeC7T9bE5T1LlezFntb94PRVG38qcLcKTMO6W2lPTuy/GPdfiJfED+6G6Lg8/m/Dnuxne7lOe5Y9/naNZv0HVGAa1gOKfMYSGkI4I/1XUp59f79SlFn0sRWYhvXYereaex/3PyunQT9iiePlPMbOKlOBJ67ANKzfeTiakvufVsdDmjgtPnYq8PYVmIb1Oy8B9z7uf06tLi7vVM7EpgJvVYFpWM/xuF1mB3dFz7Gr2cXOK/B6x5uG9RzPzH1VeI4dzS6mAk9YgWlYT/hQZktTganA8QpMwzpel1GnAlOBJ6zANKyLH8oMnApMBR5dgWlYj674rDcVmApcXIFpWBeXbgZOBaYCj67ANKxHV3zWe8UKzJ6fpALTsJ7kQcw2pgJTge8rMA3r+xpNxlRgKvAkFZiG9SQPYrYxFZgKfF+BRzSs73cxGVOBqcBU4IwKTMM6o0iTMhWYCjxHBaZhPcdzmF1MBaYCZ1RgGtYZRXrSFP9Wln/gD/htEwd/mTqNT4Nyj2ny+7/3sDgYh4NxNBYHcdrH4Tc8HOifL/E044hsmjgN0tj2Ko6DcfLE8EADcfmAg1w64IMXrcA0rNd5cN6Y3njrjnE4pvkHANP58iCNxQO+B3x11v84HA6c9+DO1ytWYBrW6zw1/6Df/FtZlz8vtYPLZ5iRv16BaVi//gjO3sD2zYb7F0mB30Q4aHBpfBqU68cjHPjl4iHNPy5oDljH4yBeLh7SxNN+Mr7cY+PFmpNtLf52/2suv9yx11TgF8ZOw/qFor/gkt7kKzrCJZox9xzf3GN3WIFpWK/xUN27hHbsuyIXyyBGZ/FAgzgrh7aO59PE5AQaiKfJ2WriNCiPPZabxsqBa8ebw9rAD9agmX+r0QcvVoFpWK/xwLzxvOFcGq87pof0OHtKE5MDLqpxwAMO4mksDfggjgMecBBPY2lsEKdBGouDOB5oEGdx4Ac8pLFpY1+sAtOwfuuBXb+uN/H1s9x2hm0zWH/8u+1KM9tbVmAa1ms8dj/SuEh2odyOXUSHtTGksadyjZETjuWm/e/BKc+4A/1g09iPw69j2kH+OHe8XHMF89GOjaeXx+LAD41nt5rcwYtVYBrWiz2wZbvehBoZ8IVYPNAgzuKw5vK32prLD8dy08xRHosDP5TLbrVtLg7lscbRWDzQIM7isObyaYMXrMA0rBd8aN9s2Y9lodQ4m/ZK1r7Duu80Np0f0n7ZzvK3qsA0rFtV8vHzeFP6r9+Bbwesy/lAgzgrh8YaC+t3I3SclRdoEGflbDU6TYwfaBBn5Ww1fN2nPB820ECcZiweaLDmyqGBcSunDV6sAtOwXuyBPWC73tTe9NulaNuLfhqsuY1nV13eOeONMRb4t4Q93HK+mevBFZiG9eCC33i5ay+S3efAui3fibjc3+o06625OH3VjKOZZ9V9aCB/1XC5q2YczTyrfq7vgt5YWMc076qN/2IVeIGG9WIVfdx2vSG9CaFVaRpDSI+zcuisxgDrHMXYFfLhO018m0eDrY6D2AoapNmjvUN7FcdDueLyQU762B1UYBrWDh7iHGEq8C4VmIa1vyfdJbTvNDqdi/Ww3g3JgfKe1TpT+2+/zpHGtne6HEgbu5MKTMPayYNcjuENC9sL7iXl765LaPi78MvOLZZ3dmc65/y3WG/meGAFpmE9sNhPuJQ7HhffT7i1i7fkTODy/eJJZuBzVmAa1nM+l2t21SW0S+fm4Qdv5lV/hR+dNNXt/p0jje1M6a9wrvY89swKTMM6s1AvnuZNHF7xKO092xnibNrYF6nAJduchnVJ1Z57jO8sQjt1aR3c8aS/inWe7f6dI43tLPSQNnYnFZiGtZMHuRzDhTOsl869gdkl9cOna7Bqz+g7i72H9hhnV00DU4O0sTupwDSsnTzIOcZU4B0qMA3rRZ/yiW27gAYX1aXxw3rf0wV9ec9qfeJ3bP9pbHv346NzqUHa2J1UYBrWTh7kcgwNKSR7E4e0V7LtnXU2e2fxQBvsvALTsHb+gD+P544nfEovZdo7u24cD6s+/k4rMA1rfw/WJTq4eO50/OANvtXjz2pdoLd/31HZp3OksTQQx1n89TEn+HsFpmH9vRRv6XjTw94O70w+Wdzbud7+PNOw9vcScLcDLqq/O52Lafgu75Xizu5M60X8K+1/9nqiAtOwThTnRUPerLD+SORTs+AN3dH4EH9W6zztv3PZdxrb3ukhbexOKrD/hrWTBzXHmApMBT4+pmHt71Xgwhn6TsQJXcIH9zs04AP/meE87b9z2Xca2/7pciBt7E4qMA1rJw9yOYY3LJxz6awRwDL85V1n96niOed/+cO+2wGmYb3bE//reXd21/PncJ3pnA8d/gyY316nAtOwXudZnbvTfzkkgovqg/vnix+8of+Ih9/SDu5Tf/nEr722fzaN7QDp8yNhFdmRnYa1o4d54ijexOFE2tOG2nu2jcbZtLE7rsA0rP09XN9ZhE7nniq440l/Fes82/07Rxr7KmeZfV5RgaVhXTHLDH2mCrhwhvXS2Zs7rHutEazaM/rO0v7Z9sgPac7kU8NpYlVkR3Ya1o4e5hzlLxWYS/e/lGMfZBrWPp7jeoouqNl0fljve3w3sl5Yl/9sVvM5tv80tj07kw8d2LSxO6nANKydPMjlGN6omhIk0wLt1dDe2c7F4uHVzjT7vaAC07AuKNoLDumeh33B7X/Yd/hYfqWxizzuXiswDWt/T9aFM6yXzvywvrnTnr0KPkRor76jsl/nSGNpII6z+GBHFZiGtaOHecFRvOnhgqFPPcSZfLL41Jt81Ob2tM40rD09zb+dxd0OuKj+m/L17y7c4euM14v4zsqZ1ov41zvF7PhoBaZhHS3LS4verOCN20F8ahY0s3Q+xJ/VOk/771z2ncauexeDVRt/BxWYhrWDhzhHmAq8SwWmYX3zpF8w7MIZ+k7EEVzCB/c7NOAD/5nhPO2/c9l3Gtv+6XIgbexOKjANaycPcjmGNyycc+msEcAy/OVdZ/ep4jnnf/nDvtsBpmG92xP/63nd88Bf1ddmzgPnfOjw2id9w91Pw9rfQ3cBDS6qOx0/eDNv9fizWp/4bffvHGlse0//+Y+EzTD2aSswDetpH81NN+ZNHG468YMma+/Zlo2zaWN3XIFpWPt7uL6zCJ0uzrrjSX+Utaa1gW9dFg+0r7Dm8strLJs2dscVmIa1v4frwhnWS2c8rCf26Rqs2j381mZrOCwO617pPghg24uckM6mseVqXs5kjrSxO6nA7RrWTgoyx3iaCmhIT7OZ2chzVGAa1nM8h1vuwgV1aN44u973uJyH8u5lfWJnbWh9Fg+tTXeJ7jultGPjxRrL4mCcM5kDH+yoAtOwdvQwP4/iDQve+J/SBx4+fuFXa7Pti8WBf2pbckK5bBp7avzEdlKBaVg7eZDfHMOPV+Gb1HPCP85pbbbB/BXpx+xXeV/px+YYbQcVmIa1g4e4OYILZ1gvnfnBm7wh8mDVil1jfcezzulSvPXFzC2eJk4DcTqLgzgN0tfxdHkgjrP4YEcVmIa1o4f5w6N4w/9wyFnp5tVgzkr+Iskc6yeHX6R9KV87/suJJ/C7FZiG9bv1v8fq7nbARfWp+eW4rIZTeT+NmdeFN/vTsfKNsyfAf4prx/90vb3nP9X5pmE91eO4yWY0C1h/JPKpWfCGbiE5sGrFrrHb+eyn9a1nbjZNnAbGirE4iJcrRhNPY2lAl8Pigx1VYBrWjh7mHGUqsPcKTMPa3xN24Qy+y+h0LtaD+x06Kwfwe8Ia9gTWtRaLgzjtK8hpoPtu7gAAEABJREFU/+Uan8Y2li4H0sbupALTsO77IH9jdm9YOOfS2uU4yL/3Xq0B6zo4nLPXddwp33zOdMs5T603sQdWYBrWA4s9Sz2kAu6u4LsPHR6ymVnkthWYhnXbej7DbC6gwUV1++EHb2Y6Kw/4tHvBj2fWgdZi29N3nwiKl2ucfbJpLA3SrYkPdlSBaVg7epgnjuJNHE6kPTzUnthTi4uvKPeYVuzhdha8fwWmYd2/xo9ewR0OrN9h8INYe+JD/FmtPR7bfxr7rHuffd2wAtOwbljMJ5nKJ2qwXjq7hA5tUxOQB/z0Z7TtnW2vLB7at+blU0PnShu7kwpMw9rJg5xjTAXeoQJP07DeodgPOqML6tCSx+56aC6rgV/uM1qf+NkjrPvDQ7rvsJxJDdLG7qQC07B28iCXY3jDgjdysjdwWHU+lPes1nnaP98+7TuNpQUxiI/dSQWmYe3kQX5zDPc94ZvUpwy3d3bdIB5WffydVmAa1v4erAtnWC+d+cEb3KlZecCnPQY/X8XFevvvOyx7TmObVRxn08bupALTsHbyIOcYf6mAZrZ+SvqX4JDXrcA0rNd9dl/t3N0NuKj+Kocux8U04HvBXs+1l+dz1TmmYV1Vvqcc7AIa1h+J/JWY4A3dxuXAqhV7Jus87d9+7c2e01ga0OWw+OBXK3Dbxadh3baeM9tUYCpwxwpMw7pjcR8wtbsaaCm+S/SQHmflpL+K9R2Ti3Ro/6zzhM4iJ8hJH7uDCkzDeu2H2Bvz0lNoBHDp+EeO03zCqXXLYU/lTewFKzAN66kf2rebc08D3yZ+kaBZXTP+i2lHngrcpwLTsO5T10fN6jIaWk/zwUN6nJWTzm457dmgsdo7tF8WD+05zspJH7uDCkzD2sFD3BzBmzQUirNpr2btPbT3OHtKKzb2xSswDet1H6A7Gt95AL+T4CFNPKTtwXZOtvPwgzNv9VUr9gx29nBGBaZhnVGkJ03xxvNXVoBvmyweaEC/9oLePM8EZ+qc63/Vnsa2Xw0MB+PSx75YBaZhvdgDm+1OBd65AtOwXvfpu7cJ6ynS2HTfYbiEhrQ9WH+tKHQe515Bx8vj0wYvWIG9NKwXLP3VW/bG04BAQzLhqtFpQQzir26dxbmB33mcO6SJywN++tgXq8A0rBd7YMt23cWERf5IYz/u+Mv8K1rqmFbsEfbY+se0R+xl1rhxBaZh3bigd5rOhfn2r6B4E9LBdw6WXjU67RZo3tYxZ5p1XGbTAA84GNf+jaMBH/iXwFhzs41vbTadxUF+uXScTRv7xBWYhvXED+fJtuZNvX4ad4vtmVMT+dFcS7Lxa7NcQme5144/a5FJul0FpmHdrpb3nMm/beXuBe65zqm5u7Q+lXMqZu+w5vjuZv2nYdbYOb753Fex5+Rvc6x/zfjtfMPvXIFpWHcu8I2m743lzdWUNG924NO9cfFAuwXMaw22+fDWWfeVxq65cmCdo/il1lywjrduKLbulb/ml7Nq4z9pBaZhPemDmW1NBaYCHx8fmyJMw9oU5AmoexXfBbBtpwtrNl2O+x9IK/8aay5Y57CGtcG6YiwO4jTAAw7iacbRrEGHNPq1MJc5oblop9Zfcxsz9gkrMA3r+R6KS2Twhv5ud3JCubg3aPyn1nhvYPanY3+abw245WW+ucwJ3+1HTvgud+JPUIFpWE/wEDZb6IJ9I59N3cnA2QM2ica6YGc3oaFTgd+twDSs363/sdV9d+Rymi2OhxqJ+FYr/285sZ9ZY829jtLAtmvJSRMvP41NE8fB/HQWB3HaLWAuc0LzrXu1Lp2VE2iDJ6/ANKwnf0Cf2/PmCp/SH5PG/hHu9Jv5V7TMJZoxp8YXu9SaP6xzpLHp/JA29okrMA3r+R6O7wZCu4uz7lzS+RC/hbVGaD5rpPHpbBpLA37AYc3lbzX5tHvBmtYAfuvgIU08jZ8+9gkqMA3rdx+CNwS0C74L95AeZ9PkuhwHfvq11hqhueJsa7E4uOg+lntMM47OGgvrePqtz2RO6wB/uz6dBvyAvwjeY5vTsH73OXvzwLFd+FHlmH5P7au93HPNY3PbBxyLjfbGFZiG9bsPvx891l1oVODTwnQ8rFoXxmLp11qX1qG57MUakMYP4sf0NPFy0+Ks+Kr7L9XVJu1aa43OxG8+fkizl2O5xcf+YgWmYf1i8Y8s7c1TE1rfsGmsnIbyIX6tNZd1Q/Ph1gY+XS4OaXQ84CCexqd9NV7s1rCWdYFvfrY9sTSQE/DBE1VgGtafh/FUv/lRKLSxOJt2L2uN0Bpx9pj2lX4q15gV5T7SHlv/mPbIPc1aJyowDetEce4c8qf4uX9dxCV08IZqa3yIX2vN1Tps87mExsG+6WuuOA3kBBzE04yjsWniNDA/ncVvAWtVa745WesEGsRZOTTg33JP5hz8sALTsH5YsCdL9yaCJ9vWVdvxiaEzsVdNdOPBmirceNqZ7icVmIb1k2rdNtcdSrh0Zn/iw6Xjn3GcS291YW+5P3PCpXO6iF/vui6dZ8ZdUYFpWFcU78qh3jzeAFDTofmELLREnJWTfmtrbmuE5rfHtPbKpomXm8amieNgHJ3FQZwGdJzFbwHnMifwzclaO9AgzsqhAR/4g1+qwDSsXyr8LDsVmAr8vALTsH5es0tGuJPxHQM0nu9iF8TpLB5oEGfl0G453lzmNLc1Ag3E0+RsNXEalMfiII7DT8Yfy01jzResA3FWDu3Y+mJygjyIs3Jo63g+bfALFfhpw/qFLe5iSZe1sF4k870hQgeNs6c0MTkBhziLAz/gIc1etppYmjge0uPiW00sTRwP6XHxrSaWJo6H9Dh7ShOTE3CIszjwAx7S7CVt7IMrMA3rwQWf5aYCU4HLKzAN6/La/WSky16XuGzj+tSJ1mUui4dy46wcuh9NcEhj8SAP4qwc2jreXmhicgINxNPk0I6Np5fH4nDp+NY6Nl7MGsE6EGfl0Na9prFygjyIs3Jo63h7oQ1+oQLTsH6h6J9LejOs+JQ/ztU+Dr/OzT2Wdxj+cUz/u/bxj1+rxi/CD+dq8s/NPZZ3yXjzGBdwiLM48AMe0ti0sQ+uwDSsxxTcn9DBXYhV2a1GT2Nx4AfjaOxWo6exOPCDcTQ2jaUBP+Cw5vK3mnwa8AMOxqTxaZDG4sAP5bJbbZuLQ3mscTQWBz4N8IBDnC2XxYM8iLP44M4VmIZ15wJ/Tu/CPXxKH3HWG4LO4oEGcRaHNZe/1dZcfpAHxqR1kbxqYvKAH+TQ2LTG09NYOV9p3uRy4KvxxoKc0JxsGisP+AGHNZe/1eTTgB9wMCbtu73KH9ypAtOw7lTYN53WG/tNj/7ix36R7U/DesyDcu+xwqr+6kkaHtLYn2ryjQs4xFkc+MFeaJDG4iCOAw78IL7VitHFV06Ls+I0wAMO4luNnsbiwA84xFk84OFczV7KdQEf0sbesQLTsO5Y3GVqnziFZD8SpfHp3jxpLA34QQ6NTbv3ePOfWkvcnqA8FgdxHPi0Y/unywlyaMak8WliaSwN+EEOjU271XjzmivggztXYBrWnQv8Ob0flcKn9BHPfnz+irOf0gc/fCy/0thkfjiliZXH4sAPOMSzNIizOPADDvEsDeIsDvyAQzxLgziLAz/gIY39qSbfuIBDnMUHd67ANKxbFPgfc3jh9u8u+ZO3iL/mEeTQXeJuNbE0Vh7wgxya+beaWBorD/hBDm0dby80sfJYGojjIId2bDxdTsDh0vGtdWy8WOuw1gF+kENb95rGlsfKA36QQ1vH2wtNrDyWFsTyx96wAtOwbljMmWoq8FkBDUyT+6RjblWBaVi3quQ/5nFfEv6hjvdOFfC3GrwG3unMDznrNKzbltmLtMtdfrN7AYd0eWn9aSyWxp4ab4wc4Mu9dLy9nBovbh1oLRYHceMBDziIpxlHY9PEaZDGOg9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4P/y8fFhLzSxNJa2Qnzl49+gAtOwblDEmWIqMBV4TAWmYV1XZ5er0Cz+JHZ/Afx0PJQvvtXE0thHjbcXa321vrj9gBy5q8angZyAg3jaT8Yfy01jm5O1DvCDHNqx9cXKY+UBP8ihreP5NLHyWBqI4yCHNrhRBaZhXV5IL0Yvyj41aiY6rH+FAw/liaex6fxwShMrj8WBH3CIs3jAwV62Gj1NHA/pcfGtJpYmjof0uPhWE0sTx0N6nD2lickJOMRZHPgBD2n2stXE0sRxSBt7owo8uGHdaNfPM417ivW/fH6enc1OpgI7rMA0rMsfqmblAtaPAM1C669qsOn8IIeu0W01epq5cUhjG8/iwJcHOPxkvHxjgR9wOLZXa5bHygN+wOHS8db4ajy9dVgc+KHx7Fbb5uJQHmscjcUDDeIsDny1B+NogxtVYBrWjQr5OY0XqAYG/E/5Aw8fn7/ibLksDvzP1A88fHz+Ek/jk9mtRk9jcTiWu2prLj/I+Wo8vTwWB364x3hzWwf4AQdrpvG3mhgN+AEHY9L4W02MBuIBH9ywAtOwLi+mOwovVOCbicUDDeKsHBqLA58GeMAhzpbL4sCXB3jAIc6Wy+JBHsRZHNZc/lZbc/kA8sAYHPhbjU4DfjiWm7bNxaGxbLksDnx5gAcc4my5LB7kQZzFYc3lb7U1V2zwgwpMw/pBsTapLtvD+sJMc/nakDT2mHZs/Fe5jTdGDvDpLB5oEGdxWHPb66qtufwg56vx9PJYHPjhHuPNbR3gBxysmcbfamI04AccjEm7Za3MPfhBBaZh/aBYkzoVmAr8bgWmYV1efxfJ27uKOCve7HhIE99qYmksDvyAQ5zFAx7O1ezlVK74qTnFHz3eeu2JxYEfcIizeMDDudotz9qaL28fdYBpWJdX2l2ET4KAbyYvfhzS6HiQQxNP49PE0lga8IMcGpt27/HmP7WWuD1BeSwO4jjwacf2T5cT5NCMSePTxNJYGvCDHBqbdu/x5j+1lrg9DS6owDSsC4r2OcS9xopP+eMSzZiPz1/88Cl9xNmP5RcekuPsKU1MTsAhzuLAX0GDSzRjjAV+wCHO4sBfQYNztZ/kHpvz0vHmMhb4AR9cUIFpWOcVzZ+K/qt2thEuYWnghUgXx0GcBngoV3yriaWxxgI/yKGta6Wx5bHygB/k0Nbx9kITK4+lgTgOcmjHxtPlBBwuHd9ax8aLtQ5rHeAHObR1r2lseaw84Ac5tHW8vdDEymNpII6DHNqx8fTBDyswDeu8gvlkyIuPPW/ED7Im9a0r4B98fOsC/OTw07DOq5aLVvcg7HkjJmsqcF4Fjv3TNOeNfMOsaVjnPXTf0rtIZRuBe7FBOouDeLl40Pjo4mnG0cTSWBrwgxyaMWl8mlgaSwN+kEMzJs1eaGJpLA3EcTCOxuIgTgM84CCeZhyNTROnQRprPzRxHIyjieGBBnFWDs0YHPg0MTzQIM7KoRmDg73QxPBAA/E042hsmjhtcEEFpmFdUFjYef8AAA5ZSURBVLQZMhW4uAIz8KoKTMP65/K5q4I14gI1FPOn5ilNvDnKY0+NF5MTHjW+vX61vnh7kmNfq8anQXksDuI4/GT8sdw01nzBOhBn5dCOrS8mJ8iDOCuHto7n08TkBBqIp8nZauI0KI/FB99UYBrWPxfIiwd6scngBxxcwKexNOCDOA54wEE8jaUBP+AQZ/GAh59q8htrLziksTiI44EGcXEc0lgcxPFAg7g4DmksDuJ4oEGcxYEf8JDG/lSTbxzYCw54wEE8jaUBH8RxwAM++KYC07C+KdCEpwJTgeepwGs1rMfUrctRl6qt6N84Cuk+MdxqYmnsT8fLNw7Wy1k8WEMeu9XoaSwO/GAcjU1jacAPOFx6VmPh0vH2+NV4evtkceCD+jWepQFfHuABhzhbLosHeRBncfjJWe0xGDv4pgLTsL4p0GfYvUP4lD7irBf0x+EXiwP/IP35wsMf4fBbnC2XxYF/SPvzhYc/wuE38TT+Qfpg09iPz1/88Cl9rLn8j8Mvtjz2IP354gc5RHar0dNYHPjBOBq71ehpLA78YByNTWNpwAdxHPg04G81Og34AQdj0vhbTYwG/HAsN00uP+CDbyowDeuvBXKf0IuNLcoPcujsVqOnsTjwg3E0dqvR01gc+ME4GrvV6GksDvxgHI1NY2nADzisufytJp8G/ICDMWl8GqSxOPBDuexW2+biUB5rHI3FgU8DPOAgnsbfamI04AccjEnjbzUxGvADDsYEfLBUYBrWUoyD64Xir1bAejmKh0Pan684axzRiw+HS8abx9hgToizOKy5/K225vKDPDAmrb2umpg84Ac5NDat8fQ0Fgd+MI72Ta0+5MsDfmg8m8bKA37AYc3lbzX5NOAHHIxJ66yrJiYP+EEOjU1rPD2NxUGuD30AHywVmIa1FONM17fwZ6ZO2gtWQMN4wW2/x5anYf31OWtGweVp0TQ2TRyHNH4QP6aniZebxqaxOPADDnEWD3g4V7OXU7nip+YUf/R467UnFgd+wCHO4gEP52r3Pqv9uMSH9jT2swLTsD4L8Wm8WPrUxo8sn/Kf/z15epp4Gp9+zng5co05NV5MHvBD49k0c8lbNTEa8IMcGpv23XjxU7ni5oTyWBzEceDTjq1PlxPk0IxJ49PE0lga8IMcGpt27/HmP7WWuD1BeSwO9ioH8HfA2WechvXPpfIjQSgaZ49pX+nHco9pl4w3j3EBhziLAz/gIY09V/tJ7rE5f2O8fVg34BBnceAHPKSx52o/yT025zq++Fvbd29Y/hSDXgR8l52wXoTioVzxtF5Y54wv99h4seZkW4sf5NDXtdLY8lh5wA9yaOt4e6GJlcfSQBwHObRj4+lyAg6Xjm+tY+PFWoe1DvCDHNq61zS2PFYeHFtrHS8u79rx5rBuwMH8adagDT4r8M4Ny4vBi2P91OazLGOmAlOBZ6zAOzcsz8PFJvBfFbPv21bAH2S3nXFmu1kF3rlhdbnJVlDf+vdXc9aL0DS2XHEcjKOzOIjTAA+tJ55mnDyxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaZDG2g9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4GAvNDE80EA8zTgamyZOgzQWB3EcjKMNPivwzg3rswRjpgJTgVepwDs3LH96bS83V43fcyyPTRPHoR8jVo1frpxwLDeNLY991Pj2+tX64vYDcuxr1fg0kBNwEE/7yfhjuWlsc7LWAX6QQzu2vlh5rDw4lrtqfHnXjjeHdQMO5k+zBg3o/3lwVu1A3+vrnRuWy3YPP/Tk4+JbTSxNHA/pcfGtJpYmjof0OHtKE5MTcIizOPADHtLsZauJpYnjIT0uvtXE0sTxkB4X32piaeJ4SI+zpzQxOQGHOIvDuhYe5ID4VqOnieMhPS6+1cTSxPGQ7gMioKe9nX3nhvV2D3sOfFYF3rohnFWhX0x654blr1j4hBBcoHoMLB5oEGdxuHS8Nb4aT7dGwCHONp7FgS8P8IBDnC2XxYM8iLM4XHpWY+HS8fb41Xi6PQYc4i6vG8+m8+VBGosDP5TLprHygB9wuPSsxsKx8XSX8OBHQ/wt8VYNa/OEPfjgBSnMbjV6GosDPxhHY7caPY3FgR+Mo7FpLA34AYc1l7/V5NOAH3AwJo2/1cRowA/HctO2uTg0li2XxYEvD/CAQ5wtl8WDPIiL48Df6qsmJg/4AYc1l7/V5NOAH47lpm1zcWgsu+aKvT3epWH5Nj/00HEvCuDTWTzQIM7KobE48LcanQb8cCw3bZuLQ2PZclkc+PIADzjE2XJZPMiDOIvDmsvfamsuP8gDY9L4W02MBvxwLDdtm4tDY9lyWRz48gAPOIin8beaGA34AQdj0vhbTYwG/ICDMWn8rSZGe0u8S8PqUxe2B+0CM6wvjDSXn8dyj2n3GG8fx9ZKs6Yc4NNZPNAgzuKw5nbWVVtz+UHOV+Pp5bE48MM9xpvbOsAPOFgzjb/VxGjgNYIDDsbg8Ey1sre3wrs0rLd6qHPYj4+PKcIuK/AuDauLUbYH6XLTHQGk8YP4MT1NvNy0OCt+TE8TlwdpLB5wiLM48AMe0thzNXs5lStuPjiWJ35MTxM3FtL4QfyYniZebhqbxuLADzjEWTzg4VzNXk7lip+aU/xW45vnbey7NCw/94ceLu6TJODTvdBwSKPjQQ5NPI1PE9tq9DRWDs0YHPg0MTzQIM7KobE43Hu8+a0D/K/Wp8sJOBiTxqcd2z+9PFYOzRgc+DQxPNAgzsqhsTjce7z5rQP8r9anywk4GJPGpx3bP/3t8C4N6+0e7Bx4KrDHChxvWPs7qYtU6E8sJ8T/7+BAOouD+CH85wsPLmCJ4mnG0dg0cRqksafGi8kJxkKclUNb1+LTxOQEGsRZOTRjcGivYniQB+JpxtHYNHEapLE4iONgHI3FQZwGeLAfmniacTSxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaW+Jd2lYXlzQJzxv+bDn0FOBV6/AuzQsdwCwXni++rOb/U8F3q4C79KwtpeYHjTNX3UA33LTWBzEaYAHjY8mnmYcjU0Tp0Eae2q8mJxgLMRZObR1LT5NTE6gQZyVQzPmXz4+PmjtVQwP8kA8zTgamyZOgzQWB3EcjKOxOIjTAA/2QxNPM44mlsbSgB/k0IxJ49PE0lga8IMcmjFp9kITS2NpII6DcTQWB3Ea4AEH8TTjaGyaOO0t8S4N6y0f7hx6KrC3Crxzw/KnlgtMcL/l2a4anwZywrHcNLa8a8ebx9rAD9agmX+riaWx8oAf5NDW8XyaWHksDcRxkLPVxGkgJ+AgnvaT8cdy09jmZK0D/CCHdmx9sfJYecAPcmjreD5NrDyWBuI4yNlq4jSQE3AQT2s8nQ/8t8U7NywX8F4AsL4AcBBPx0OaeBpLZ4M4DdJYHMTxQIM4iwM/4CGN/akm3ziwFxzwgIN4GksDPojjgAccxNNYGvBBHAc84CCextKAH3CIs3jAw081+Y21FxzSWBzE8UCDuDgOaSwO4niggb8WpJHR8Uvw8mPeuWG9/MObA7xVBXxg5N7srQ69Pew7Nyx/TccFJvRCYOmhesVZOXQvIBzSWDzIgzgrh3ZsPF1OwCHONp7FgS8PcHAuHPBQLpvGygN+wOHYXh8x3hpfrU9vnywO/NB4dqttc3EojzWOxuKBBnEWh3vUyrx+VPRM7QV/S7xzw/LgQw8f98IAfjoejmnlsuXxj+Ue08plG88ey01bc/l01jjg0wAPOIin8beaGA344Vhu2jYXh8ay5bI48OUBHnCIs+WyeJAHcRaHNZe/1dZcfpAHxqTxt5oYDfjhWG7aNheHxrJrrtjb450b1rGH735gRTlePEGczp7SxOQBPxhHY7caPY3FgR+Mo7FbjZ7G4sAPxtHYNJYG/IDDmsvfavJpwA84GJPG32piNOCHY7lp21wcGsuWy+LAlwd4wCHOlsviQR7EWRzWXP5WW3P5QR4YE/DBUoFpWEsxDq4XiotNcMl5kP588cMf4fBbnDXuIH2wOLg8/fj8hYdP6SPOGkdn8UCDOIvDmsvfamsuP8gDY9La66qJyQN+kENj0xpPT2Nx4AfjaGzatePNY07gBxzWtfhbTT4N+AEHY9La66qJyQN+kENj0xpPT2NxkOv1B3za4LMC07A+CzFmKjAVeP4KTMP66zNyZxBcnhZNY9PEcUjjB/Fjepp4uWlsGosDP+AQZ/GAh3M1ezmVK35qTvFHj7dee2Jx4Acc4iwe8PAX7UDoB/Pnix/ufVbruMQH/p8NzG9/q8A0rL/Vod+9QHwSA+4W0vEghy6exqeJbTV6GiuHZgwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC",width:"248",height:"248",style:{mixBlendMode:"multiply"}})))}var i0="ai",s0="ai-wp-admin",Vs="ai/ai",a0="https://wordpress.org/plugins/ai/",Ys=Object.values(Fs()),c0=Ys.some(e=>e.type==="ai_provider"),af=[];for(let e of Ys)e.type==="ai_provider"&&e.authentication.method==="api_key"&&af.push(e.authentication.settingName);function cf(){let[e,t]=(0,wt.useState)(!1),[o,n]=(0,wt.useState)(!1),r=(0,wt.useRef)(null);(0,wt.useEffect)(()=>{o&&r.current?.focus()},[o]);let i=(0,wt.useRef)(Ys.some(S=>S.type==="ai_provider"&&S.authentication.method==="api_key"&&S.authentication.isConnected)).current,{pluginStatus:s,canInstallPlugins:a,canManagePlugins:d,hasConnectedProvider:c}=(0,ln.useSelect)(S=>{let x=S(Ws.store),E=!!x.canUser("create",{kind:"root",name:"plugin"}),T=x.getEntityRecord("root","site"),k=i||af.some(A=>!!T?.[A]),C=x.getEntityRecord("root","plugin",Vs);return x.hasFinishedResolution("getEntityRecord",["root","plugin",Vs])?C?{pluginStatus:C.status==="active"?"active":"inactive",canInstallPlugins:E,canManagePlugins:!0,hasConnectedProvider:k}:{pluginStatus:"not-installed",canInstallPlugins:E,canManagePlugins:E,hasConnectedProvider:k}:{pluginStatus:"checking",canInstallPlugins:E,canManagePlugins:void 0,hasConnectedProvider:k}},[]),{saveEntityRecord:l}=(0,ln.useDispatch)(Ws.store),{createSuccessNotice:f,createErrorNotice:p}=(0,ln.useDispatch)(rf.store),m=async()=>{t(!0);try{await l("root","plugin",{slug:i0,status:"active"},{throwOnError:!0}),n(!0),f((0,Xe.__)("AI plugin installed and activated successfully."),{id:"ai-plugin-install-success",type:"snackbar"})}catch{p((0,Xe.__)("Failed to install the AI plugin."),{id:"ai-plugin-install-error",type:"snackbar"})}finally{t(!1)}},u=async()=>{t(!0);try{await l("root","plugin",{plugin:Vs,status:"active"},{throwOnError:!0}),n(!0),f((0,Xe.__)("AI plugin activated successfully."),{id:"ai-plugin-activate-success",type:"snackbar"})}catch{p((0,Xe.__)("Failed to activate the AI plugin."),{id:"ai-plugin-activate-error",type:"snackbar"})}finally{t(!1)}};if(!c0||s==="checking"||s==="active"&&i&&!o||s==="inactive"&&d===!1)return null;let g=s==="active"&&!c,v=s==="active"&&c&&(!i||o),_=s==="not-installed"||s==="inactive",w=s==="not-installed"&&a===!1,y=()=>v?(0,Xe.__)("The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. Learn more"):g?(0,Xe.__)("The AI plugin is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. Learn more"):(0,Xe.__)("The AI plugin can use your AI connectors to generate featured images, alt text, titles, excerpts and more. Learn more"),b=()=>s==="not-installed"?{label:e?(0,Xe.__)("Installing\u2026"):(0,Xe.__)("Install the AI plugin"),disabled:e,onClick:e?void 0:m}:{label:e?(0,Xe.__)("Activating\u2026"):(0,Xe.__)("Activate the AI plugin"),disabled:e,onClick:e?void 0:u};return React.createElement("div",{className:"ai-plugin-callout"},React.createElement("div",{className:"ai-plugin-callout__content"},React.createElement("p",null,(0,wt.createInterpolateElement)(y(),{strong:React.createElement("strong",null),a:React.createElement(cn.ExternalLink,{href:a0})})),!w&&(_?React.createElement(cn.Button,{variant:"primary",size:"compact",isBusy:e,disabled:b().disabled,accessibleWhenDisabled:!0,onClick:b().onClick},b().label):React.createElement(cn.Button,{ref:r,variant:"secondary",size:"compact",href:(0,sf.addQueryArgs)("options-general.php",{page:s0})},(0,Xe.__)("Control features in the AI plugin")))),React.createElement(nf,null))}var{store:d0}=No(l0);of();function u0(){let e=$u(),{connectors:t,canInstallPlugins:o,isAiPluginInstalled:n}=(0,lf.useSelect)(c=>{let l=c(uf.store),f=l.getEntityRecord("root","plugin","ai/ai");return{connectors:No(c(d0)).getConnectors(),canInstallPlugins:l.canUser("create",{kind:"root",name:"plugin"}),isAiPluginInstalled:!!f}},[]),r=t.filter(c=>c.render),i=Array.from(new Set(t.filter(c=>c.type==="ai_provider").map(c=>c.plugin?.file?.split("/")[0]).filter(c=>!!c))).sort(),s=new Set(t.filter(c=>c.plugin?.isInstalled).map(c=>c.plugin?.file?.split("/")[0]).filter(c=>!!c));n&&s.add("ai");let a=["ai",...i].filter(c=>!s.has(c)),d=r.length===0;return React.createElement(Bs,{title:(0,Tt.__)("Connectors"),subTitle:(0,Tt.__)("All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere.")},React.createElement("div",{className:`connectors-page${d?" connectors-page--empty":""}`},a.length>0&&(e||!o)&&React.createElement(tn.Root,{intent:"info",className:"connectors-page__file-mods-notice"},React.createElement(tn.Description,null,e?(0,Tt.__)("Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow."):(0,Tt.__)("You do not have permission to install plugins. Please ask a site administrator to install them for you."))),d?React.createElement(dt.__experimentalVStack,{alignment:"center",spacing:3,style:{maxWidth:480}},React.createElement(dt.__experimentalVStack,{alignment:"center",spacing:2},React.createElement(dt.__experimentalHeading,{level:2,size:15},(0,Tt.__)("No connectors yet")),React.createElement(dt.__experimentalText,{size:12},(0,Tt.__)("Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."))),React.createElement(dt.Button,{variant:"secondary",href:"plugin-install.php",__next40pxDefaultSize:!0},(0,Tt.__)("Learn more"))):React.createElement(dt.__experimentalVStack,{spacing:3},React.createElement(cf,null),React.createElement(dt.__experimentalVStack,{spacing:3,role:"list"},t.map(c=>c.render?React.createElement(c.render,{key:c.slug,slug:c.slug,name:c.name,description:c.description,type:c.type,logo:c.logo,authentication:c.authentication,plugin:c.plugin}):null))),o&&!e&&React.createElement("p",null,(0,df.createInterpolateElement)((0,Tt.__)("If the connector you need is not listed, search the plugin directory to see if a connector is available."),{a:React.createElement("a",{href:"plugin-install.php?s=connector&tab=search&type=tag"})}))))}function f0(){return React.createElement(u0,null)}var p0=f0;export{p0 as stage}; /*! Bundled license information: use-sync-external-store/cjs/use-sync-external-store-shim.production.js: diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php index 028e61ec414a8..645ab5588ee5e 100644 --- a/src/wp-includes/capabilities.php +++ b/src/wp-includes/capabilities.php @@ -1163,11 +1163,7 @@ function remove_role( $role ) { function get_super_admins() { global $super_admins; - if ( isset( $super_admins ) ) { - return $super_admins; - } else { - return get_site_option( 'site_admins', array( 'admin' ) ); - } + return $super_admins ?? get_site_option( 'site_admins', array( 'admin' ) ); } /** diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index cd8304f24fdc0..76409d0832f2e 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -1230,7 +1230,7 @@ function get_the_tag_list( $before = '', $sep = '', $after = '', $post_id = 0 ) */ function the_tags( $before = null, $sep = ', ', $after = '' ) { if ( null === $before ) { - $before = __( 'Tags: ' ); + $before = __( 'Tags:' ) . ' '; } $the_tags = get_the_tag_list( $before, $sep, $after ); diff --git a/src/wp-includes/certificates/ca-bundle.crt b/src/wp-includes/certificates/ca-bundle.crt index 3e158b864a6e4..26ec7f7baabf9 100644 --- a/src/wp-includes/certificates/ca-bundle.crt +++ b/src/wp-includes/certificates/ca-bundle.crt @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Thu May 14 03:12:02 2026 GMT +## Certificate data from Mozilla as of: Thu Jul 16 03:12:01 2026 GMT ## ## Find updated versions here: https://curl.se/docs/caextract.html ## @@ -13,39 +13,13 @@ ## It contains the certificates in PEM format and therefore ## can be directly used with curl / libcurl / php_curl, or with ## an Apache+mod_ssl webserver for SSL client authentication. -## Just configure this file as the SSLCACertificateFile. +## Configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.33. -## SHA256: 77130ef91213772844561fbd3aa31d413b25c2ac7f576fea3bc3bbff7ef93489 +## SHA256: e57912808daef7b2b0fa4df2ccf17e47aeaf26c839a38f85c76003ebafd866bd ## -Entrust Root Certification Authority -==================================== ------BEGIN CERTIFICATE----- -MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV -BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw -b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG -A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 -MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu -MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu -Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v -dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz -A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww -Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 -j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN -rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 -MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH -hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA -A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM -Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa -v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS -W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 -tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 ------END CERTIFICATE----- - COMODO ECC Certification Authority ================================== -----BEGIN CERTIFICATE----- @@ -2689,27 +2663,6 @@ It6IKTtM1/r+t+FHvpw+PoP7UV31aPcuIYXcv/Fa4nzXxeSDwWrruoBa3lwtcHb4yOWHh8qgnaHl IhInD0Q9HWzq1MKLL295q39QpsQZp6F6t5b5wR9iWqJDB0BeJsas7a5wFsWqynKKTbDPAYsDP27X -----END CERTIFICATE----- -SecureSign Root CA12 -==================== ------BEGIN CERTIFICATE----- -MIIDcjCCAlqgAwIBAgIUZvnHwa/swlG07VOX5uaCwysckBYwDQYJKoZIhvcNAQELBQAwUTELMAkG -A1UEBhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28uLCBMdGQuMR0wGwYDVQQDExRT -ZWN1cmVTaWduIFJvb3QgQ0ExMjAeFw0yMDA0MDgwNTM2NDZaFw00MDA0MDgwNTM2NDZaMFExCzAJ -BgNVBAYTAkpQMSMwIQYDVQQKExpDeWJlcnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMU -U2VjdXJlU2lnbiBSb290IENBMTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6OcE3 -emhFKxS06+QT61d1I02PJC0W6K6OyX2kVzsqdiUzg2zqMoqUm048luT9Ub+ZyZN+v/mtp7JIKwcc -J/VMvHASd6SFVLX9kHrko+RRWAPNEHl57muTH2SOa2SroxPjcf59q5zdJ1M3s6oYwlkm7Fsf0uZl -fO+TvdhYXAvA42VvPMfKWeP+bl+sg779XSVOKik71gurFzJ4pOE+lEa+Ym6b3kaosRbnhW70CEBF -EaCeVESE99g2zvVQR9wsMJvuwPWW0v4JhscGWa5Pro4RmHvzC1KqYiaqId+OJTN5lxZJjfU+1Uef -NzFJM3IFTQy2VYzxV4+Kh9GtxRESOaCtAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P -AQH/BAQDAgEGMB0GA1UdDgQWBBRXNPN0zwRL1SXm8UC2LEzZLemgrTANBgkqhkiG9w0BAQsFAAOC -AQEAPrvbFxbS8hQBICw4g0utvsqFepq2m2um4fylOqyttCg6r9cBg0krY6LdmmQOmFxv3Y67ilQi -LUoT865AQ9tPkbeGGuwAtEGBpE/6aouIs3YIcipJQMPTw4WJmBClnW8Zt7vPemVV2zfrPIpyMpce -mik+rY3moxtt9XUa5rBouVui7mlHJzWhhpmA8zNL4WukJsPvdFlseqJkth5Ew1DgDzk9qTPxpfPS -vWKErI4cqc1avTc7bgoitPQV55FYxTpE05Uo2cBl6XLK0A+9H7MV2anjpEcJnuDLN/v9vZfVvhga -aaI5gdka9at/yOPiZwud9AzqVN/Ssq+xIvEg37xEHA== ------END CERTIFICATE----- - SecureSign Root CA14 ==================== -----BEGIN CERTIFICATE----- diff --git a/src/wp-includes/class-wp-block-parser.php b/src/wp-includes/class-wp-block-parser.php index 8c619a7b47f2c..ea66e3b51d38d 100644 --- a/src/wp-includes/class-wp-block-parser.php +++ b/src/wp-includes/class-wp-block-parser.php @@ -342,7 +342,7 @@ public function add_freeform( $length = null ) { * @param int|null $last_offset Last byte offset into document if continuing form earlier output. */ public function add_inner_block( WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = null ) { - $parent = $this->stack[ count( $this->stack ) - 1 ]; + $parent = $this->stack[ array_key_last( $this->stack ) ]; $parent->block->innerBlocks[] = (array) $block; $html = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset ); diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index c2198acf20f66..e298b04efcf90 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -4959,7 +4959,7 @@ public function customize_pane_settings() { /* translators: %d: Number of themes being displayed, which cannot currently consider singular vs. plural forms. */ 'announceThemeCount' => __( 'Displaying %d themes' ), /* translators: %s: Theme name. */ - 'announceThemeDetails' => __( 'Showing details for theme: %s' ), + 'announceThemeDetails' => __( 'Theme details: %s' ), ), ); diff --git a/src/wp-includes/class-wp-duotone.php b/src/wp-includes/class-wp-duotone.php index b75b01619fbee..0e12e7ca7f306 100644 --- a/src/wp-includes/class-wp-duotone.php +++ b/src/wp-includes/class-wp-duotone.php @@ -569,8 +569,8 @@ private static function get_slug_from_attribute( $duotone_attr ) { * * @since 6.3.0 * - * @param string $duotone_attr The duotone attribute from a block. * @param string|string[] $duotone_attr The duotone attribute from a block. + * @return bool True if the duotone preset present and valid. */ private static function is_preset( $duotone_attr ) { if ( ! is_string( $duotone_attr ) ) { diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index 244cf84e9b810..228691d26d12b 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -2430,11 +2430,13 @@ public function get_posts() { if ( '' !== $query_vars['author_name'] ) { if ( str_contains( $query_vars['author_name'], '/' ) ) { - $query_vars['author_name'] = explode( '/', $query_vars['author_name'] ); - if ( $query_vars['author_name'][ count( $query_vars['author_name'] ) - 1 ] ) { - $query_vars['author_name'] = $query_vars['author_name'][ count( $query_vars['author_name'] ) - 1 ]; // No trailing slash. + $author_name_parts = explode( '/', $query_vars['author_name'] ); + $last_part = array_last( $author_name_parts ); + + if ( $last_part ) { + $query_vars['author_name'] = $last_part; // No trailing slash. } else { - $query_vars['author_name'] = $query_vars['author_name'][ count( $query_vars['author_name'] ) - 2 ]; // There was a trailing slash. + $query_vars['author_name'] = $author_name_parts[ count( $author_name_parts ) - 2 ]; // There was a trailing slash. } } $query_vars['author_name'] = sanitize_title_for_query( $query_vars['author_name'] ); diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 212c52023a621..7e2cb54731b1f 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -2432,7 +2432,7 @@ protected function get_layout_styles( $block_metadata, $options = array() ) { * background: value; * } * - * p.has-value-gradient-background { + * :where(p).has-value-gradient-background { * background: value; * } * @@ -2613,6 +2613,7 @@ static function ( $carry, $element ) { * @since 5.8.0 * @since 5.9.0 Added the `$origins` parameter. * @since 6.6.0 Added check for root CSS properties selector. + * @since 7.1.0 Wraps block-level preset classes in `:where()` to match root-level specificity. * * @param array $settings Settings to process. * @param string $selector Selector wrapping the classes. @@ -2639,8 +2640,16 @@ protected static function compute_preset_classes( $settings, $selector, $origins $css_var = static::replace_slug_in_string( $preset_metadata['css_vars'], $slug ); $class_name = static::replace_slug_in_string( $class, $slug ); - // $selector is often empty, so we can save ourselves the `append_to_selector()` call then. - $new_selector = '' === $selector ? $class_name : static::append_to_selector( $selector, $class_name ); + /* + * $selector is often empty (root-level presets), in which case the + * bare class is used. For block-level presets the block selector is + * wrapped in `:where()` so the class keeps the same 0-1-0 specificity + * as a root-level preset. Without this, block-level palette rules + * (e.g. `p.has-x-color`) out-rank equally-important rules that also + * target the same property at 0-1-0, such as per-instance responsive + * state styles. + */ + $new_selector = '' === $selector ? $class_name : ':where(' . $selector . ')' . $class_name; $stylesheet .= static::to_ruleset( $new_selector, array( @@ -3985,7 +3994,7 @@ public function get_styles_for_block( $block_metadata ) { */ $is_processing_element = in_array( 'elements', $block_metadata['path'], true ); - $current_element = $is_processing_element ? $block_metadata['path'][ count( $block_metadata['path'] ) - 1 ] : null; + $current_element = $is_processing_element ? array_last( $block_metadata['path'] ) : null; $element_pseudo_allowed = array(); @@ -4679,7 +4688,7 @@ public static function remove_insecure_properties( $theme_json, $origin = 'theme * Get a reference to element name from path. * $metadata['path'] = array( 'styles', 'elements', 'link' ); */ - $current_element = $metadata['path'][ count( $metadata['path'] ) - 1 ]; + $current_element = array_last( $metadata['path'] ); /* * $output is stripped of pseudo selectors. Re-add and process them diff --git a/src/wp-includes/class-wp-view-config-data.php b/src/wp-includes/class-wp-view-config-data.php index 99ea816aee96e..be85e9dc10d60 100644 --- a/src/wp-includes/class-wp-view-config-data.php +++ b/src/wp-includes/class-wp-view-config-data.php @@ -40,7 +40,10 @@ * key by key (an associative array merges member by member, a nested `null` * deletes just that leaf, a scalar replaces just that value), while `set()` * swaps the whole value. A nested `null` deletes just the leaf it names in - * every case. Each patch also declares the configuration schema + * every case. A patch value whose shape does not match the current value — + * an associative array where a list lives, or the reverse — is rejected with + * a notice rather than merged, and an empty array under `merge()` is a + * no-op. Each patch also declares the configuration schema * version it was written against (currently 1), so a future WordPress release * that changes the configuration shape can migrate existing patches forward * instead of breaking them. @@ -118,9 +121,9 @@ private function get_data() { * Applies the entity view configuration filter and returns the result. * * Exposes the container through the dynamic - * `get_entity_view_config_{$kind}_{$name}` filter so that core and third - * parties can provide the configuration for a specific entity, then - * reconciles the filtered container back into a plain configuration array, + * `get_entity_view_config_{$kind}_{$name}` filter (with the dynamic portions + * lowercased), so that core and third parties can provide the configuration for a specific entity, + * then reconciles the filtered container back into a plain configuration array, * limited to the documented configuration keys. * * @since 7.1.0 @@ -134,7 +137,9 @@ public function apply_filters( $kind, $name ) { * Filters the view configuration for a given entity. * * The dynamic portions of the hook name, `$kind` and `$name`, refer to the - * entity kind (e.g. `postType`) and the entity name (e.g. `page`). + * entity kind (e.g. `postType`) and the entity name (e.g. `page`), + * lowercased — so the `postType`/`page` entity maps to the + * `get_entity_view_config_posttype_page` hook. * * Callbacks receive a WP_View_Config_Data object and change the * configuration through its methods. Each write method takes the schema @@ -159,10 +164,12 @@ public function apply_filters( $kind, $name ) { * individual list members. * * A change that declares an unsupported schema version is rejected and does - * not alter anything. Callbacks mutate the container in place, so there is no - * need to return it; any returned value is ignored. Callbacks must not replace - * the container with a different value, as later callbacks receive whatever the - * the previous one returned. + * not alter anything. As with any filter, each callback's return value is + * passed to the next callback as `$data`, so callbacks must return the + * container they received: a callback that returns nothing, or any other + * value, hands that result to every callback hooked at a later priority + * instead of the container. Since the write methods return the container, + * a callback can end with `return $data->merge( $patch, $version );`. * * @since 7.1.0 * @@ -178,7 +185,7 @@ public function apply_filters( $kind, $name ) { * } */ apply_filters( - "get_entity_view_config_{$kind}_{$name}", + wp_get_entity_view_config_hook_name( $kind, $name ), $this, array( 'kind' => $kind, @@ -306,6 +313,12 @@ public function remove( array $spec, int $version ) { * stops inheriting core's future additions to it — but it's useful when a * contributor needs to pin a list to an exact set of members. * + * The shape rule applies here too: a patch value whose shape does not match + * the current value — an associative array where a list lives, or a + * non-empty list where an associative value lives — is rejected with a + * notice and leaves the current value unchanged. An empty array is exempt, + * so replacing a list with an empty list still clears it. + * * A patch that declares an unsupported schema version is rejected and does * not change anything. * @@ -342,16 +355,23 @@ public function replace( array $patch, int $version ) { * * ```php * array( - * 'default_view' => array( 'search' => 'new search', 'fields' => array( 'newField' ) ), + * 'default_view' => array( 'titleField' => 'newTitleField', 'fields' => array( 'newField' ) ), * 'default_layouts' => array( 'grid' => array( 'layout' => array( 'badgeFields' => array( 'newField' ) ) ) ), * 'view_list' => array( array( 'slug' => 'table', 'title' => 'New title' ) ), * ) * ``` * - * - default_view will be updated so the search string is 'new search' and the newField is appended to the list of fields. + * - default_view will be updated so the titleField is 'newTitleField' and the newField is appended to the list of fields. * - default_layouts will be updated so that newField is appended to the badgeFields. * - view_list will be updated so that the view with slug 'table' has its title changed to 'New title'. * + * A patch value only merges into a current value of the same shape: an + * associative array where a list lives, or a non-empty list where an + * associative value lives, is rejected with a notice and leaves the current + * value unchanged. An empty array merges nothing and is a no-op — clear a + * list with replace() and an empty list, or reset a key to its default with + * a top-level `null`. + * * A patch that declares an unsupported schema version is rejected and does * not change anything. * @@ -475,6 +495,15 @@ private function strip_nulls( $value ) { * $replace_lists flag is carried down through associative nesting so that, * under replace(), every list reached along the way is swapped wholesale. * + * An array in $incoming only merges into a current value of the same shape. + * A non-empty mismatch — an associative array where a list lives, or a + * non-empty list where an associative value lives — is reported with + * _doing_it_wrong() and leaves the current value unchanged, so a malformed + * patch cannot silently destroy configuration. An empty array is + * shape-ambiguous and merges nothing, so it is a no-op: clearing a list is + * spelled replace() with an empty list, and resetting a key is spelled + * `null`. + * * @since 7.1.0 * * @param mixed $current The current value. @@ -491,6 +520,18 @@ private function merge_properties( $current, $incoming, $replace_lists ) { // Numerical indexed arrays are expected to be lists (sequential integer keys starting at 0). if ( array_is_list( $incoming ) ) { + // A non-empty list only lands where a list (or nothing) lives, under + // merge() and replace() alike. An empty array is shape-ambiguous and + // exempt, so replace() with an empty list can still clear a list. + if ( array() !== $incoming && is_array( $current ) && ! array_is_list( $current ) && array() !== $current ) { + _doing_it_wrong( + __METHOD__, + esc_html__( 'A view configuration patch value must match the shape of the value it patches: a list merges into a list, and an associative array into an associative array.' ), + '7.1.0' + ); + return $current; + } + // replace() takes an incoming list as-is; merge() merges it by member identity. if ( $replace_lists ) { // As-is except for nulls: a list swapped in wholesale has no @@ -498,6 +539,13 @@ private function merge_properties( $current, $incoming, $replace_lists ) { // set()), so a null member is dropped rather than stored. return $this->strip_nulls( $incoming ); } + + // An empty list has no members to merge, and an empty array is + // shape-ambiguous, so merging one is a no-op rather than a reset. + if ( array() === $incoming ) { + return $current; + } + return $this->merge_list_by_identity( is_array( $current ) && array_is_list( $current ) ? $current : array(), $incoming @@ -505,6 +553,15 @@ private function merge_properties( $current, $incoming, $replace_lists ) { } // Consider any other array as associative (keys are strings). + if ( is_array( $current ) && array_is_list( $current ) && array() !== $current ) { + _doing_it_wrong( + __METHOD__, + esc_html__( 'A view configuration patch value must match the shape of the value it patches: a list merges into a list, and an associative array into an associative array.' ), + '7.1.0' + ); + return $current; + } + $result = is_array( $current ) && ! array_is_list( $current ) ? $current : array(); foreach ( $incoming as $key => $value ) { // A null patch value deletes the property. @@ -601,7 +658,9 @@ private function remove_list_member( array $members, $identity ) { * A member of the incoming list whose identity matches one already present * merges into it in place, keeping its position; an unmatched member is * appended to the end, except a literal `null`, which carries no identity - * and holds nothing to merge and so is dropped. A matched member's contents + * and holds nothing to merge and so is dropped. An appended member has no + * existing leaf for a nested `null` to delete (the same rationale as set()), + * so its nulls are stripped rather than stored. A matched member's contents * merge recursively with the same rules (merge_properties), so the * identity-aware merge applies at * any nesting level: each key named by the patch is substituted while the @@ -637,7 +696,9 @@ private function merge_list_by_identity( array $current, array $incoming ) { } } if ( null === $index ) { - $result[] = $item; + // An appended member has no existing leaf for a nested null to + // delete, so nulls are dropped rather than stored. + $result[] = $this->strip_nulls( $item ); continue; } diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index b20c79b4c9201..1061dbd1831d2 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -191,9 +191,11 @@ private function set_is_enabled() { * Respect old get_option() filters left for back-compat when the 'enable_xmlrpc' * option was deprecated in 3.5.0. Use the {@see 'xmlrpc_enabled'} hook instead. */ - $is_enabled = apply_filters( 'pre_option_enable_xmlrpc', false ); + /** This filter is documented in wp-includes/option.php */ + $is_enabled = apply_filters( 'pre_option_enable_xmlrpc', false, 'enable_xmlrpc', false ); if ( false === $is_enabled ) { - $is_enabled = apply_filters( 'option_enable_xmlrpc', true ); + /** This filter is documented in wp-includes/option.php */ + $is_enabled = apply_filters( 'option_enable_xmlrpc', true, 'enable_xmlrpc' ); } /** @@ -6438,24 +6440,33 @@ public function mw_getCategories( $args ) { * @since 1.5.0 * * @param array $args { - * Method arguments. Note: arguments must be ordered as documented. + * Method arguments. Note: top-level arguments must be ordered as documented. * * @type int $0 Blog ID (unused). * @type string $1 Username. * @type string $2 Password. - * @type array $3 Data. + * @type array $3 { + * Data for the file to upload. + * + * @type string $name File name. Sanitized with sanitize_file_name(). + * @type string $type Optional. File MIME type, stored as the attachment's + * post MIME type. Default empty string. + * @type string $bits Optional. File contents. Default empty string. + * @type int $post_id Optional. ID of the post to attach the file to. + * Default 0. + * } * } * @return array|IXR_Error */ public function mw_newMediaObject( $args ) { + if ( ! $this->minimum_args( $args, 4 ) ) { + return $this->error; + } + $username = $this->escape( $args[1] ); $password = $this->escape( $args[2] ); $data = $args[3]; - $name = sanitize_file_name( $data['name'] ); - $type = $data['type']; - $bits = $data['bits']; - $user = $this->login( $username, $password ); if ( ! $user ) { return $this->error; @@ -6469,6 +6480,25 @@ public function mw_newMediaObject( $args ) { return $this->error; } + if ( + ! is_array( $data ) || + ! is_string( $data['name'] ?? null ) || + ! is_string( $data['type'] ?? '' ) || + ! is_string( $data['bits'] ?? '' ) + ) { + return new IXR_Error( 400, __( 'Invalid attachment data.' ) ); + } + + $name = sanitize_file_name( $data['name'] ); + + // A name consisting only of characters the sanitizer strips leaves nothing to write to. + if ( '' === $name ) { + return new IXR_Error( 400, __( 'Invalid attachment data.' ) ); + } + + $type = $data['type'] ?? ''; + $bits = $data['bits'] ?? ''; + if ( is_multisite() && upload_is_user_over_quota( false ) ) { $this->error = new IXR_Error( 401, diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index b3738c24ec9df..96a26fcf558a1 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2556,6 +2556,193 @@ function wp_new_comment_via_rest_notify_postauthor( $comment ) { } } +/** + * Extracts the mentioned user IDs from note content. + * + * Mentions are stored as chips carrying the `wp-note-mention` class plus a + * `user-N` class token holding the mentioned user's ID: + * `@Name`. Only elements that + * carry both classes are treated as mentions. + * + * @since 7.1.0 + * + * @param string $content Note (comment) content, as stored. + * @return int[] Unique, positive mentioned user IDs. + * @phpstan-return list + */ +function wp_get_note_mentioned_user_ids( string $content ): array { + if ( ! str_contains( $content, 'wp-note-mention' ) ) { + return array(); + } + + $user_ids = array(); + $processor = new WP_HTML_Tag_Processor( $content ); + while ( + $processor->next_tag( + array( + 'tag_name' => 'SPAN', + 'class_name' => 'wp-note-mention', + ) + ) + ) { + foreach ( $processor->class_list() as $class_name ) { + if ( 1 === preg_match( '/^user-(\d+)$/', $class_name, $matches ) ) { + $user_id = (int) $matches[1]; + if ( $user_id > 0 ) { + $user_ids[] = $user_id; + } + break; + } + } + } + + return array_values( array_unique( $user_ids, SORT_NUMERIC ) ); +} + +/** + * Notifies mentioned users about a new note. + * + * Runs on {@see 'rest_insert_comment'} alongside the post author notification. + * The recipient set is the users mentioned in this note, minus the note's own + * author (a user is not notified about their own note) and the post author, + * who is already notified about every note by + * {@see wp_new_comment_via_rest_notify_postauthor()}. + * + * Only fires when a note is created, not when an existing one is edited, so + * correcting a note does not re-notify everyone who already received it. + * + * @since 7.1.0 + * + * @param WP_Comment|null $comment The note that was just inserted. (May only be null as an edge case.) + * @param mixed $request The REST request. Unused. + * @param bool $creating Whether this is a create (true) or update (false). + */ +function wp_notify_note_mentions( ?WP_Comment $comment, $request = null, bool $creating = true ): void { + if ( ! $creating || ! $comment ) { + return; + } + + if ( 'note' !== $comment->comment_type ) { + return; + } + + // Share the single user-facing notes notification preference. + if ( ! get_option( 'wp_notes_notify', 1 ) ) { + return; + } + + $mentioned = wp_get_note_mentioned_user_ids( $comment->comment_content ); + + $author_id = (int) $comment->user_id; + $comment_post_id = (int) $comment->comment_post_ID; + $post = $comment_post_id ? get_post( $comment_post_id ) : null; + $post_author_id = $post ? (int) $post->post_author : 0; + + /* + * The recipient set is bounded and small (one note's mentions), so emails + * are sent synchronously here. If notification volume ever warrants it, + * the right fix is to offload delivery to a background queue rather than + * throttle within the request. + */ + foreach ( $mentioned as $user_id ) { + // Never notify the author about their own note. + if ( $user_id === $author_id ) { + continue; + } + + // The post author is already notified of every note. + if ( $user_id === $post_author_id ) { + continue; + } + + $user = get_userdata( $user_id ); + if ( ! $user || empty( $user->user_email ) ) { + continue; + } + + /* + * Only notify users who can actually read the note. Notes are + * internal: WP_REST_Comments_Controller::check_read_permission() + * only exposes a note to its author or to users who can edit it, so + * the email audience is held to the same bar. A plain read_post + * check would leak note content to, for example, subscribers on a + * public post, who cannot see the note in the editor. + */ + if ( ! user_can( $user_id, 'edit_comment', $comment->comment_ID ) ) { + continue; + } + + wp_send_note_notification( $user, $comment, $post ); + } +} + +/** + * Sends a single note mention notification email. + * + * The email is composed in the recipient's locale, matching how other + * user-directed notifications are composed, and links to the post editor the + * same way the post author's note notification does. + * + * @since 7.1.0 + * + * @param WP_User $user The recipient. + * @param WP_Comment $comment The note that triggered the notification. + * @param WP_Post|null $post The post the note belongs to. + * @return bool Whether the email was accepted for delivery by {@see wp_mail()}. + */ +function wp_send_note_notification( WP_User $user, WP_Comment $comment, ?WP_Post $post ): bool { + $switched_locale = switch_to_user_locale( $user->ID ); + + /* + * The site title and the post title are escaped on the way into the database, + * and note content is stored as HTML. Both are reversed once here for the + * plain text arena of emails. Decoding a second time would go too far and + * resolve entities the author meant to be read literally. + */ + $blogname = wp_specialchars_decode( get_bloginfo( 'name', 'display' ), ENT_QUOTES ); + $post_title = $post ? wp_specialchars_decode( get_the_title( $post ), ENT_QUOTES ) : ''; + $author_name = $comment->comment_author ? $comment->comment_author : __( 'Someone' ); + $content = wp_specialchars_decode( wp_strip_all_tags( $comment->comment_content ) ); + + /* + * The rest of the message is composed for the recipient, and so is the editor + * link: get_edit_post_link() answers for whoever is current, which here is the + * note's author over REST and nobody at all under WP-Cron. + */ + $edit_link = ''; + if ( $post ) { + $previous_user_id = get_current_user_id(); + wp_set_current_user( $user->ID ); + $edit_link = (string) get_edit_post_link( $post->ID, 'url' ); + wp_set_current_user( $previous_user_id ); + } + + /* translators: 1: Note author's name, 2: Post title. */ + $message = sprintf( __( '%1$s mentioned you in a note on "%2$s".' ), $author_name, $post_title ); + /* translators: Note mention notification email subject. 1: Site title, 2: Post title. */ + $subject = sprintf( __( '[%1$s] You were mentioned in a note on "%2$s"' ), $blogname, $post_title ); + + $lines = array( $message, '' ); + if ( '' !== $content ) { + $lines[] = $content; + } + if ( $edit_link ) { + $lines[] = ''; + $lines[] = __( 'Edit This' ) . ': ' . $edit_link; + } + + // Declared explicitly so a filtered default cannot turn the message into HTML. + $headers = 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . '"'; + + $sent = wp_mail( $user->user_email, $subject, implode( "\n", $lines ), $headers ); + + if ( $switched_locale ) { + restore_previous_locale(); + } + + return $sent; +} + /** * Sets the status of a comment. * @@ -3149,7 +3336,7 @@ function do_trackbacks( $post ) { if ( empty( $post->post_excerpt ) ) { /** This filter is documented in wp-includes/post-template.php */ - $excerpt = apply_filters( 'the_content', $post->post_content, $post->ID ); + $excerpt = apply_filters( 'the_content', $post->post_content ); } else { /** This filter is documented in wp-includes/post-template.php */ $excerpt = apply_filters( 'the_excerpt', $post->post_excerpt ); diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php index 88ca63f148e12..3fb6a29cb8dc7 100644 --- a/src/wp-includes/cron.php +++ b/src/wp-includes/cron.php @@ -958,6 +958,8 @@ function spawn_cron( $gmt_time = 0 ) { $doing_wp_cron = sprintf( '%.22F', $gmt_time ); set_transient( 'doing_cron', $doing_wp_cron ); + $cron_url = add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ); + /** * Filters the cron request arguments. * @@ -982,13 +984,13 @@ function spawn_cron( $gmt_time = 0 ) { $cron_request = apply_filters( 'cron_request', array( - 'url' => add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ), + 'url' => $cron_url, 'key' => $doing_wp_cron, 'args' => array( 'timeout' => 0.01, 'blocking' => false, /** This filter is documented in wp-includes/class-wp-http-streams.php */ - 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), + 'sslverify' => apply_filters( 'https_local_ssl_verify', false, $cron_url ), ), ), $doing_wp_cron diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index 77e196525657a..f50c67dd71689 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -77,10 +77,18 @@ html:lang(he-il) .rtl #wpadminbar * { box-shadow: none; } -#wpadminbar a:focus { - outline-offset: -1px; +#wpadminbar a:focus, +#wpadminbar .ab-item[tabindex="0"]:focus { + outline-offset: -2px; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; + box-shadow: inset 0 -4px 0 0 currentColor; + transition: box-shadow 0.1s linear; +} + +#wpadminbar .ab-submenu a:focus, +#wpadminbar .ab-submenu .ab-item[tabindex="0"]:focus { + box-shadow: inset 4px 0 0 0 currentColor; } #wpadminbar { @@ -225,7 +233,9 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar:not(.mobile) > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, -#wpadminbar:not(.mobile) > #wp-toolbar a:focus span.ab-label { +/* The adminbar menu may output either links or focusable div elements. */ +/* As such, we target the focus state without specifying the element type. */ +#wpadminbar > #wp-toolbar :focus span.ab-label { color: #72aee6; } @@ -294,7 +304,8 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover #adminbarsearch:before, -#wpadminbar li #adminbarsearch.adminbar-focused:before { +#wpadminbar li #adminbarsearch.adminbar-focused:before, +#wpadminbar.mobile .quicklinks .ab-item:focus:before { color: #72aee6; } @@ -379,11 +390,6 @@ html:lang(he-il) .rtl #wpadminbar * { float: right; } -#wpadminbar ul li:last-child, -#wpadminbar ul li:last-child .ab-item { - box-shadow: none; -} - /** * Recovery Mode */ @@ -452,7 +458,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wp-admin-bar-user-info .avatar { position: absolute; left: -72px; - top: 4px; + top: 0; width: 64px; height: 64px; border-radius: 50%; @@ -466,7 +472,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar #wp-admin-bar-user-info span { background: none; padding: 0; - height: 18px; + line-height: 1.38461538; } #wpadminbar #wp-admin-bar-user-info .display-name, @@ -475,7 +481,6 @@ html:lang(he-il) .rtl #wpadminbar * { } #wpadminbar #wp-admin-bar-user-info .username { - color: #a7aaad; font-size: 11px; } @@ -911,7 +916,6 @@ html:lang(he-il) .rtl #wpadminbar * { overflow: hidden; width: 52px; padding: 0; - color: #a7aaad; /* @todo not needed? this text is hidden */ position: relative; } @@ -1031,16 +1035,6 @@ html:lang(he-il) .rtl #wpadminbar * { height: auto; font-size: 16px; line-height: 1.5; - color: #f0f0f1; - } - - #wpadminbar #wp-admin-bar-user-info a { - padding-top: 4px; - } - - #wpadminbar #wp-admin-bar-user-info .username { - line-height: 0.8 !important; - margin-bottom: -2px; } /* Show only default top level items */ diff --git a/src/wp-includes/css/buttons.css b/src/wp-includes/css/buttons.css index 967970a9ba461..57d5754483199 100644 --- a/src/wp-includes/css/buttons.css +++ b/src/wp-includes/css/buttons.css @@ -223,6 +223,7 @@ TABLE OF CONTENTS: .wp-core-ui .button[aria-disabled="true"], .wp-core-ui .button-secondary[aria-disabled="true"] { + color: #8a8a8a !important; cursor: default; } diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css index 835b04a8bf6bf..6748a50f00c57 100644 --- a/src/wp-includes/css/media-views.css +++ b/src/wp-includes/css/media-views.css @@ -136,8 +136,7 @@ .media-frame textarea:focus, .media-frame select:focus { border-color: var(--wp-admin-theme-color, #3858e9); - /* Expand border by 0.5px for total 1.5px effect */ - box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color, #3858e9); + box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9); outline: 2px solid transparent; } @@ -333,7 +332,6 @@ .media-toolbar-secondary { float: left; height: 100%; - position: relative; display: grid; grid-template-columns: repeat( 2, 1fr ); grid-template-rows: repeat( 2, 1fr ); @@ -351,16 +349,24 @@ select#media-attachment-filters { } label[for="media-attachment-date-filters"] { - grid-area: 1 / 2 / 2 / 3; + grid-area: 1 / 1 / 2 / 2; } select#media-attachment-date-filters { + grid-area: 2 / 1 / 3 / 2; +} + +select#media-attachment-filters ~ label[for="media-attachment-date-filters"] { + grid-area: 1 / 2 / 2 / 3; +} + +select#media-attachment-filters ~ select#media-attachment-date-filters { grid-area: 2 / 2 / 3 / 3; } -.media-toolbar-secondary > .spinner { +.media-modal .media-toolbar-secondary > .spinner { position: absolute; - left: calc( 100% + 2px ); + right: -30px; top: 50%; margin: 0; } @@ -1031,9 +1037,8 @@ select#media-attachment-date-filters { .wp-core-ui .attachment:focus, .wp-core-ui .selected.attachment:focus, .wp-core-ui .attachment.details:focus { - box-shadow: - inset 0 0 2px 3px #fff, - inset 0 0 0 7px var(--wp-admin-theme-color, #3858e9); + /* Keep this box-shadow consistent between media.css and media-views.css. */ + box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9); /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -6px; @@ -1303,6 +1308,7 @@ select#media-attachment-date-filters { .attachments-browser .media-toolbar-secondary { max-width: 66%; + position: relative; } .uploader-inline .close { @@ -1399,7 +1405,11 @@ select#media-attachment-date-filters { } .attachment.new-media { - outline: 2px dotted #c3c4c7; + /* Dotted outline for the first added item when Infinite scrolling is disabled. */ + /* Contrast ratio must be at least 3:1 against the #dcdcde background for added items when Infinite scrolling is disabled. */ + outline: 2px dotted #757575; + /* Prevent the border from being obscured by adjacent items. */ + outline-offset: -2px; } /** @@ -1845,6 +1855,7 @@ select#media-attachment-date-filters { text-align: right; text-transform: none; font-weight: 400; + display: flex; } .attachment-details .settings-save-status .spinner { @@ -2625,6 +2636,7 @@ select#media-attachment-date-filters { } .attachments-browser .attachments, + .attachments-browser:not(.has-load-more) .attachments, .attachments-browser .uploader-inline, .attachments-browser .media-toolbar, .attachments-browser .attachments-wrapper, @@ -2633,13 +2645,14 @@ select#media-attachment-date-filters { } .attachments-browser .media-toolbar { - height: 74px; + height: 117px; } .attachments-browser .attachments, + .attachments-browser:not(.has-load-more) .attachments, .attachments-browser .uploader-inline, .media-frame-content .attachments-browser .attachments-wrapper { - top: 90px; + top: 131px; } .media-sidebar .setting, @@ -2830,7 +2843,7 @@ select#media-attachment-date-filters { float: right; } - .media-frame .media-toolbar-secondary .spinner { + .media-modal .media-frame .media-toolbar-secondary .spinner { top: calc( 50% - 8px ); } @@ -2865,7 +2878,7 @@ select#media-attachment-date-filters { bottom: -60px; } - .media-frame .media-toolbar-secondary .spinner { + .media-modal .media-frame .media-toolbar-secondary .spinner { top: 0; } @@ -2888,13 +2901,9 @@ select#media-attachment-date-filters { position: unset; } - .media-frame .media-toolbar-secondary .spinner { - position: absolute; - top: 0; + .media-modal .media-frame .media-toolbar-secondary .spinner { bottom: 0; margin: auto; - left: calc( 100% + 2px ); - right: 0; z-index: 9; } @@ -2946,6 +2955,7 @@ select#media-attachment-date-filters { } .attachments-browser .attachments, + .attachments-browser:not(.has-load-more) .attachments, .attachments-browser .uploader-inline, .attachments-browser .media-toolbar, .media-frame-content .attachments-browser .attachments-wrapper { diff --git a/src/wp-includes/customize/class-wp-customize-selective-refresh.php b/src/wp-includes/customize/class-wp-customize-selective-refresh.php index f51b1e6dc7627..3077d09dcf75e 100644 --- a/src/wp-includes/customize/class-wp-customize-selective-refresh.php +++ b/src/wp-includes/customize/class-wp-customize-selective-refresh.php @@ -120,11 +120,7 @@ public function add_partial( $id, $args = array() ) { * @return WP_Customize_Partial|null The partial, if set. Otherwise null. */ public function get_partial( $id ) { - if ( isset( $this->partials[ $id ] ) ) { - return $this->partials[ $id ]; - } else { - return null; - } + return $this->partials[ $id ] ?? null; } /** diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index d9a05c829646a..12ca0045b98b4 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -310,6 +310,11 @@ add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 4 ); add_filter( 'comment_flood_filter', 'wp_throttle_comment_flood', 10, 3 ); add_filter( 'pre_comment_content', 'wp_rel_ugc', 15 ); + +// Note mention chips in comment content: allow `span` through comment kses, +// then reduce its classes to the mention tokens right after `wp_filter_kses`. +add_filter( 'wp_kses_allowed_html', '_wp_kses_allow_note_mention_span', 10, 2 ); +add_filter( 'pre_comment_content', '_wp_kses_sanitize_note_mention_classes', 11 ); add_filter( 'comment_email', 'antispambot' ); add_filter( 'option_tag_base', '_wp_filter_taxonomy_base' ); add_filter( 'option_category_base', '_wp_filter_taxonomy_base' ); @@ -531,6 +536,7 @@ add_action( 'comment_post', 'wp_new_comment_notify_moderator' ); add_action( 'comment_post', 'wp_new_comment_notify_postauthor' ); add_action( 'rest_insert_comment', 'wp_new_comment_via_rest_notify_postauthor' ); +add_action( 'rest_insert_comment', 'wp_notify_note_mentions', 10, 3 ); add_action( 'after_password_reset', 'wp_password_change_notification' ); add_action( 'register_new_user', 'wp_send_new_user_notifications' ); add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 ); @@ -585,6 +591,7 @@ add_action( 'init', 'create_initial_post_types', 0 ); // Highest priority. add_action( 'admin_menu', '_add_post_type_submenus' ); add_action( 'before_delete_post', '_reset_front_page_settings_for_post' ); +add_action( 'before_delete_post', '_reset_privacy_policy_page_for_post' ); add_action( 'wp_trash_post', '_reset_front_page_settings_for_post' ); add_action( 'change_locale', 'create_initial_post_types' ); @@ -821,8 +828,8 @@ // callbacks registered at the default compose on top of them // regardless of registration order. add_filter( - "get_entity_view_config_postType_{$post_type}", - "_wp_get_entity_view_config_post_type_{$post_type}", + "get_entity_view_config_posttype_{$post_type}", + "_wp_get_entity_view_config_posttype_{$post_type}", 5 ); } diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 8f8af4a082196..74a28109b6536 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -2186,6 +2186,7 @@ function sanitize_user( $username, $strict = false ) { * * @param string $key String key. * @return string Sanitized key. + * @phpstan-return lowercase-string */ function sanitize_key( $key ) { $sanitized_key = ''; diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index dca95d69b69fe..f5002a45de1e8 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1445,11 +1445,7 @@ function get_status_header_desc( $code ) { ); } - if ( isset( $wp_header_to_desc[ $code ] ) ) { - return $wp_header_to_desc[ $code ]; - } else { - return ''; - } + return $wp_header_to_desc[ $code ] ?? ''; } /** @@ -5034,9 +5030,13 @@ function wp_parse_args( $args, $defaults = array() ) { * @since 5.1.0 * * @param mixed[]|string $input_list List of values. - * @return array Array of values. A string is split into a list, while an array + * @return array Array of scalar values. A string is split into a list, while an array * keeps its keys, so the result is not necessarily a list. - * @phpstan-return ( $input_list is string ? list : array ) + * @phpstan-return ( + * $input_list is string ? list : ( + * $input_list is array ? array : array + * ) + * ) */ function wp_parse_list( $input_list ): array { if ( ! is_array( $input_list ) ) { diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 29c30137e173d..22a1d3e307d3e 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -1182,7 +1182,7 @@ function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) { } $attachment_url = wp_get_attachment_image_url( $site_icon_id, $size_data ); if ( $attachment_url ) { - $url = $attachment_url; + $url = is_ssl() ? set_url_scheme( $attachment_url, 'https' ) : $attachment_url; } } diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index ace3e14bea565..7ca5191a0f162 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -718,6 +718,7 @@ class WP_HTML_Tag_Processor { * * @since 6.2.0 * @var WP_HTML_Attribute_Token[] + * @phpstan-var array */ private $attributes = array(); @@ -752,7 +753,7 @@ class WP_HTML_Tag_Processor { * ); * * @since 6.2.0 - * @var bool[] + * @var array */ private $classname_updates = array(); @@ -809,7 +810,7 @@ class WP_HTML_Tag_Processor { * ); * * @since 6.2.0 - * @var WP_HTML_Text_Replacement[] + * @var array */ protected $lexical_updates = array(); @@ -2072,7 +2073,7 @@ private function parse_next_tag(): bool { */ $is_valid_pi = ( 0 !== $target_length && - false !== strpos( " \t\f\r\n?>", $html[ $target_at + $target_length ] ) && + str_contains( " \t\f\r\n?>", $html[ $target_at + $target_length ] ) && ! ( 3 === $target_length && 0 === substr_compare( $html, 'xml', $target_at, 3, true ) ) && ! ( 14 === $target_length && 0 === substr_compare( $html, 'xml-stylesheet', $target_at, 14, true ) ) ); @@ -2957,6 +2958,7 @@ private function get_decoded_attribute_value( WP_HTML_Attribute_Token $attribute * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. + * @phpstan-return list|null */ public function get_attribute_names_with_prefix( $prefix ): ?array { if ( @@ -2968,13 +2970,45 @@ public function get_attribute_names_with_prefix( $prefix ): ?array { $comparable = strtolower( $prefix ); + /* + * For the `class` attribute, ensure that enqueued class changes from + * `add_class` and `remove_class` are flushed into attribute updates. + */ + $has_class = isset( $this->attributes['class'] ); + if ( '' === $comparable || str_starts_with( 'class', $comparable ) ) { + foreach ( $this->classname_updates as $update ) { + if ( + ( $has_class && self::REMOVE_CLASS === $update ) || + ( ! $has_class && self::ADD_CLASS === $update ) + ) { + $this->class_name_updates_to_attributes_updates(); + break; + } + } + } + + $additions = array(); + $removals = array(); + foreach ( $this->lexical_updates as $update_name => $update ) { + if ( is_int( $update_name ) || 'modifiable text' === $update_name ) { + continue; + } + + if ( '' === $update->text ) { + $removals[ $update_name ] = true; + } elseif ( ! isset( $this->attributes[ $update_name ] ) && str_starts_with( $update_name, $comparable ) ) { + $additions[] = $update_name; + } + } + $matches = array(); foreach ( array_keys( $this->attributes ) as $attr_name ) { - if ( str_starts_with( $attr_name, $comparable ) ) { + if ( str_starts_with( $attr_name, $comparable ) && ! isset( $removals[ $attr_name ] ) ) { $matches[] = $attr_name; } } - return $matches; + + return empty( $additions ) ? $matches : array_merge( $additions, $matches ); } /** diff --git a/src/wp-includes/http.php b/src/wp-includes/http.php index 8280f424934dd..19aec80581a44 100644 --- a/src/wp-includes/http.php +++ b/src/wp-includes/http.php @@ -855,9 +855,5 @@ function _wp_translate_php_url_constant_to_key( $constant ) { PHP_URL_FRAGMENT => 'fragment', ); - if ( isset( $translation[ $constant ] ) ) { - return $translation[ $constant ]; - } else { - return false; - } + return $translation[ $constant ] ?? false; } diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index a04d62e54924c..62bfc29cfc03f 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -17,9 +17,19 @@ final class WP_Interactivity_API { * Holds the mapping of directive attribute names to their processor methods. * * @since 6.5.0 - * @var array + * @var array + * @phpstan-var array{ + * 'data-wp-interactive': 'data_wp_interactive_processor', + * 'data-wp-router-region': 'data_wp_router_region_processor', + * 'data-wp-context': 'data_wp_context_processor', + * 'data-wp-bind': 'data_wp_bind_processor', + * 'data-wp-class': 'data_wp_class_processor', + * 'data-wp-style': 'data_wp_style_processor', + * 'data-wp-text': 'data_wp_text_processor', + * 'data-wp-each': 'data_wp_each_processor', + * } */ - private static $directive_processors = array( + private static array $directive_processors = array( 'data-wp-interactive' => 'data_wp_interactive_processor', 'data-wp-router-region' => 'data_wp_router_region_processor', 'data-wp-context' => 'data_wp_context_processor', @@ -99,8 +109,17 @@ final class WP_Interactivity_API { * * This is only available during directive processing, otherwise it is `null`. * + * An entry is the namespace the directive defined. It is `false` instead when + * the directive did not define a usable one — the attribute was empty, or its + * JSON held no `namespace`, or the namespace did not match the accepted + * characters — and no enclosing `data-wp-interactive` was in effect to inherit + * from. An entry is pushed either way, because one is popped for every closing + * tag regardless of what the directive contained, so `false` is what stands in + * for "no namespace here" and keeps the stack balanced. + * * @since 6.6.0 - * @var array|null + * @var array|null + * @phpstan-var list|null */ private $namespace_stack = null; @@ -752,32 +771,54 @@ private function evaluate( $entry ) { /** * Parse the directive name to extract the following parts: - * - Prefix: The main directive name without "data-wp-". + * - Prefix: The main directive name without "data-wp-". It cannot begin with a hyphen. * - Suffix: An optional suffix used during directive processing, extracted after the first double hyphen "--". * - Unique ID: An optional unique identifier, extracted after the first triple hyphen "---". * * This function has an equivalent version for the client side. - * See `parseDirectiveName` in https://github.com/WordPress/gutenberg/blob/trunk/packages/interactivity/src/vdom.ts.: + * See `parseDirectiveName` in https://github.com/WordPress/gutenberg/blob/trunk/packages/interactivity/src/vdom.ts: + * + * An empty suffix or unique ID is normalized to null, but the string "0" is preserved. The + * client's `|| null` discards only the empty string, since every non-empty string is truthy in + * JavaScript. Do not use empty() for these checks: it would discard "0" and diverge from the + * client. * - * See examples in the function unit tests `test_parse_directive_name`. + * @see Tests_Interactivity_API_WpInteractivityAPI::test_parse_directive_name() for examples in the test inputs. * * @since 6.9.0 * * @param string $directive_name The directive attribute name. - * @return array An array containing the directive prefix, optional suffix, and optional unique ID. + * @return array|null An array containing the directive prefix, optional suffix, and optional unique ID, or null if the directive name cannot be parsed. + * @phpstan-return array{ + * prefix: non-empty-string, + * suffix: non-empty-string|null, + * unique_id: non-empty-string|null, + * }|null */ private function parse_directive_name( string $directive_name ): ?array { // Remove the first 8 characters (assumes "data-wp-" prefix) - $name = substr( $directive_name, 8 ); + $name = (string) substr( $directive_name, 8 ); - // Check for invalid characters (anything not a-z, 0-9, -, or _) - if ( preg_match( '/[^a-z0-9\-_]/i', $name ) ) { + // Ensure the name only contains valid characters (anything a-z, A-Z, 0-9, -, or _). + if ( 1 !== preg_match( '/^[a-zA-Z0-9\-_]+$/', $name ) ) { return null; } - // Find the first occurrence of '--' to separate the prefix + // Find the first occurrence of '--' to separate the prefix. $suffix_index = strpos( $name, '--' ); + /* + * A prefix cannot begin with a hyphen, so a name which does is not a directive at all. This + * covers both a lone leading hyphen, as in "data-wp--bind", and a leading double hyphen, as + * in "data-wp---foo", where treating the hyphens as a suffix separator would instead leave + * the prefix empty. It also covers "data-wp----unique-id", where only a unique ID is supplied + * without any prefix or suffix. + */ + if ( 0 === $suffix_index || '-' === $name[0] ) { + return null; + } + + // Without a '--' the whole name is the prefix. (This naturally also means there is no unique ID after '---'.) if ( false === $suffix_index ) { return array( 'prefix' => $name, @@ -790,33 +831,34 @@ private function parse_directive_name( string $directive_name ): ?array { $remaining = substr( $name, $suffix_index ); // If remaining starts with '---' but not '----', it's a unique_id - if ( '---' === substr( $remaining, 0, 3 ) && '-' !== ( $remaining[3] ?? '' ) ) { + if ( 3 === strspn( $remaining, '-' ) ) { + $unique_id = (string) substr( $remaining, 3 ); return array( 'prefix' => $prefix, 'suffix' => null, - 'unique_id' => '---' !== $remaining ? substr( $remaining, 3 ) : null, + 'unique_id' => '' === $unique_id ? null : $unique_id, ); } // Otherwise, remove the first two dashes for a potential suffix - $suffix = substr( $remaining, 2 ); + $suffix = (string) substr( $remaining, 2 ); // Look for '---' in the suffix for a unique_id $unique_id_index = strpos( $suffix, '---' ); if ( false !== $unique_id_index && '-' !== ( $suffix[ $unique_id_index + 3 ] ?? '' ) ) { - $unique_id = substr( $suffix, $unique_id_index + 3 ); - $suffix = substr( $suffix, 0, $unique_id_index ); + $unique_id = (string) substr( $suffix, $unique_id_index + 3 ); + $suffix = (string) substr( $suffix, 0, $unique_id_index ); return array( 'prefix' => $prefix, - 'suffix' => empty( $suffix ) ? null : $suffix, - 'unique_id' => empty( $unique_id ) ? null : $unique_id, + 'suffix' => '' === $suffix ? null : $suffix, + 'unique_id' => '' === $unique_id ? null : $unique_id, ); } return array( 'prefix' => $prefix, - 'suffix' => empty( $suffix ) ? null : $suffix, + 'suffix' => '' === $suffix ? null : $suffix, 'unique_id' => null, ); } @@ -846,6 +888,7 @@ private function parse_directive_name( string $directive_name ): ?array { * @param string|null $default_namespace Optional. The default namespace if none is explicitly defined. * @return array An array containing the namespace in the first item and the JSON, the reference path, or null on the * second item. + * @phpstan-return array{ 0: string|null, 1: mixed } */ private function extract_directive_value( $directive_value, $default_namespace = null ): array { if ( empty( $directive_value ) || is_bool( $directive_value ) ) { @@ -878,17 +921,46 @@ private function extract_directive_value( $directive_value, $default_namespace = * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $prefix The directive prefix to filter by. * @return array An array of entries containing the directive namespace, value, suffix, and unique ID. + * @phpstan-return list */ - private function get_directive_entries( WP_Interactivity_API_Directives_Processor $p, string $prefix ) { + private function get_directive_entries( WP_Interactivity_API_Directives_Processor $p, string $prefix ): array { $directive_attributes = $p->get_attribute_names_with_prefix( 'data-wp-' . $prefix ); - $entries = array(); + if ( null === $directive_attributes ) { + return array(); + } + + $entries = array(); foreach ( $directive_attributes as $attribute_name ) { - [ 'prefix' => $attr_prefix, 'suffix' => $suffix, 'unique_id' => $unique_id] = $this->parse_directive_name( $attribute_name ); + $parsed_directive = $this->parse_directive_name( $attribute_name ); + if ( null === $parsed_directive ) { + continue; + } + + [ 'prefix' => $attr_prefix, 'suffix' => $suffix, 'unique_id' => $unique_id ] = $parsed_directive; // Ensure it is the desired directive. if ( $prefix !== $attr_prefix ) { continue; } - list( $namespace, $value ) = $this->extract_directive_value( $p->get_attribute( $attribute_name ), end( $this->namespace_stack ) ); + $attribute_value = $p->get_attribute( $attribute_name ); + if ( null === $attribute_value ) { + continue; + } + /* + * The namespace stack can hold false, which data_wp_interactive_processor() pushes for a + * `data-wp-interactive` whose namespace is invalid and which has no enclosing one to inherit. Only a + * string names a store, so anything else counts as no default namespace at all. + */ + $default_namespace = array_last( $this->namespace_stack ?? array() ); + if ( ! is_string( $default_namespace ) ) { + $default_namespace = null; + } + + list( $namespace, $value ) = $this->extract_directive_value( $attribute_value, $default_namespace ); $entries[] = array( 'namespace' => $namespace, 'value' => $value, @@ -1002,6 +1074,15 @@ private function data_wp_context_processor( WP_Interactivity_API_Directives_Proc continue; } + /* + * A context with no namespace has nothing to be stored under, so the inherited context is left as it + * is. Using the namespace as an array key regardless would coerce null to an empty string, which PHP + * 8.5 deprecates, and would store the context where no reference can address it anyway. + */ + if ( null === $entry['namespace'] ) { + continue; + } + $context = array_replace_recursive( $context, array( $entry['namespace'] => is_array( $entry['value'] ) ? $entry['value'] : array() ) @@ -1017,16 +1098,19 @@ private function data_wp_context_processor( WP_Interactivity_API_Directives_Proc * associated reference. * * @since 6.5.0 + * @since 7.1.0 An object is resolved to whatever it serializes to for the client, a number is formatted by the + * JSON encoder, and a value which cannot be sent to the client is rejected rather than passed to + * WP_HTML_Tag_Processor::set_attribute(). * - * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. - * @param string $mode Whether the processing is entering or exiting the tag. + * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. */ - private function data_wp_bind_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { + private function data_wp_bind_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ): void { if ( 'enter' === $mode ) { $entries = $this->get_directive_entries( $p, 'bind' ); foreach ( $entries as $entry ) { if ( empty( $entry['suffix'] ) || null !== $entry['unique_id'] ) { - continue; + continue; } // Skip if the suffix is an event handler. @@ -1045,6 +1129,97 @@ private function data_wp_bind_processor( WP_Interactivity_API_Directives_Process $result = $this->evaluate( $entry ); + /* + * An object is resolved to whatever it serializes to. When the reference points to a value stored + * in state or context, that is the value the client receives for it when the store is hydrated. + * A derived state closure is never serialized, so there the client value comes from the derived + * state's client-side implementation instead; the resolution is still applied so that both origins + * behave the same. Round-tripping through the JSON encoder rather than calling + * JsonSerializable::jsonSerialize() directly keeps this resolution identical to the client's, + * including for an object which serializes to another serializable object. When the encoding fails + * the object is left in place, to be reported as a usage error below. Note that it rarely does + * fail: wp_json_encode() retries through _wp_json_sanity_check(), which rebuilds the object from + * its public properties and so ignores jsonSerialize() altogether. An object whose serialized form + * JSON cannot represent therefore resolves to whatever that rebuild encodes to, which is what the + * client is sent for it as well. + * + * A throwing JsonSerializable::jsonSerialize() is caught for the same reason the value is checked + * at all: a binding must not be able to abort the render. An exception escaping here would leave + * `$context_stack` and `$namespace_stack` unrestored for every later `process_directives()` call + * on this instance, so the object is treated as one which failed to encode. + */ + if ( is_object( $result ) ) { + try { + $encoded = wp_json_encode( $result ); + } catch ( Throwable $e ) { + $encoded = false; + } + if ( false !== $encoded ) { + $result = json_decode( $encoded ); + } + } + + /* + * Only a value which can be sent to the client may be stored in an attribute value. Strings and + * booleans are passed in as-is, numbers are formatted, and everything else is rejected as a usage + * error. + * + * An object which does not serialize to a scalar is rejected even when it defines `__toString()`, + * which PHP would otherwise coerce for the string parameters of the escaping functions. Its string + * representation is not what the client evaluates this reference to, whether that is the form + * serialized into the store or the return value of a derived state's client-side implementation, + * so the two could disagree once the directive is evaluated during hydration. + */ + if ( null !== $result ) { + if ( ! is_scalar( $result ) ) { + _doing_it_wrong( + __METHOD__, + sprintf( + /* translators: %s: The attribute name. */ + __( 'Attempted to bind a non-scalar value to the "%s" attribute. Ensure the state/context property or the derived state closure resolves to a string, number, or boolean.' ), + esc_html( $entry['suffix'] ) + ), + '7.1.0' + ); + $result = null; + } elseif ( is_int( $result ) || is_float( $result ) ) { + /* + * A number is formatted by the JSON encoder rather than cast to string, so that the + * attribute value matches the number the client receives for this same reference. Casting + * a float is locale-dependent before PHP 8.0, and rounds to `precision` rather than to the + * encoder's `serialize_precision`. + * + * This closes the cases which differ in practice, not every one. A float written in + * exponent notation still disagrees, since PHP encodes 1e25 as `1.0e+25` where JavaScript + * renders it as `1e+25`, as does negative zero, and an integer above the range JavaScript + * can represent exactly is rounded once it reaches the client. Casting diverged on all + * three as well, so none is a regression. + */ + $encoded = wp_json_encode( $result ); + if ( JSON_ERROR_INF_OR_NAN === json_last_error() ) { + /* + * The encoder only rejects INF and NAN, of which JSON can represent neither. When such + * a value is stored in state, the store itself also fails to encode in its entirety, + * and the client is sent an empty script tag in place of all of its state; only + * removing the value from the state resolves that. A derived state closure returning + * one never reaches the store, so there only the binding itself is affected. + */ + _doing_it_wrong( + __METHOD__, + sprintf( + /* translators: %s: The attribute name. */ + __( 'Attempted to bind a non-finite number to the "%s" attribute. Ensure the state/context property or the derived state closure resolves to a finite number or a string.' ), + esc_html( $entry['suffix'] ) + ), + '7.1.0' + ); + $result = null; + } else { + $result = $encoded; + } + } + } + if ( null !== $result && ( diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 37d457a3e18a2..d68021c3a8b30 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -158,9 +158,10 @@ 'popover' => true, ), 'dialog' => array( - 'closedby' => true, - 'open' => true, - 'popover' => true, + 'closedby' => true, + 'open' => true, + 'popover' => true, + 'autofocus' => true, ), 'dl' => array(), 'dt' => array(), @@ -1131,6 +1132,89 @@ function wp_kses_allowed_html( $context = '' ) { } } +/** + * Allows the note mention chip markup in comment content. + * + * The notes `@` mention completer stores a mention as a chip carrying the + * mentioned user's ID in a class token: + * `@Name`. The default comment + * allowlist does not allow `span` at all, so for users without + * `unfiltered_html` the mention would be stripped on save. + * + * The allowance is deliberately narrow and always on: `span` is a + * semantics-free element and _wp_kses_sanitize_note_mention_classes() + * reduces its `class` to the two mention tokens right after kses runs, so + * regular (including anonymous) commenters gain nothing beyond the inert + * mention markup itself. + * + * @since 7.1.0 + * @access private + * + * @param array> $allowed The allowed tags structure for the context. + * @param string $context The kses context. + * @return array> Modified allowed tags structure. + */ +function _wp_kses_allow_note_mention_span( $allowed, $context ): array { + if ( ! is_array( $allowed ) ) { + $allowed = array(); + } + if ( 'pre_comment_content' !== $context ) { + return $allowed; + } + + if ( ! isset( $allowed['span'] ) || ! is_array( $allowed['span'] ) ) { + $allowed['span'] = array(); + } + + $allowed['span']['class'] = true; + + return $allowed; +} + +/** + * Reduces `span` classes in comment content to the note mention tokens. + * + * _wp_kses_allow_note_mention_span() lets `class` through kses on `span` so + * the mention chip survives, but `class` is an open-ended styling and + * scripting hook, so this companion pass - running right after + * `wp_filter_kses` at priority 10 - strips every class token except the two + * the mention markup uses: `wp-note-mention` and `user-N`. `span` is the only + * comment tag allowed to carry `class` at all, so walking `span` tags covers + * the entire allowance. + * + * The pass only applies while the restrictive comment allowlist is active: + * users with `unfiltered_html` are filtered through `wp_filter_post_kses` + * (or not at all), where arbitrary classes are already permitted, and + * narrowing their markup here would restrict what core allows them to post. + * + * @since 7.1.0 + * @access private + * + * @param string $content Slashed comment content, already filtered by kses. + * @return string Slashed comment content with span classes reduced. + */ +function _wp_kses_sanitize_note_mention_classes( $content ): string { + if ( ! is_string( $content ) ) { + $content = ''; + } + if ( false === has_filter( 'pre_comment_content', 'wp_filter_kses' ) ) { + return $content; + } + + $processor = new WP_HTML_Tag_Processor( wp_unslash( $content ) ); + + while ( $processor->next_tag( 'SPAN' ) ) { + foreach ( $processor->class_list() as $token ) { + if ( 'wp-note-mention' !== $token && ! preg_match( '/^user-[1-9][0-9]*$/', $token ) ) { + // Removing the last class also removes the attribute itself. + $processor->remove_class( $token ); + } + } + } + + return wp_slash( $processor->get_updated_html() ); +} + /** * You add any KSES hooks here. * diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 456684d08e221..a31e77b00e26c 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -4716,9 +4716,9 @@ function wp_prepare_attachment_for_js( $attachment ) { $attached_file = get_attached_file( $attachment->ID ); - if ( isset( $meta['filesize'] ) ) { - $bytes = $meta['filesize']; - } elseif ( file_exists( $attached_file ) ) { + if ( isset( $meta['filesize'] ) && is_numeric( $meta['filesize'] ) && (int) $meta['filesize'] > 0 ) { + $bytes = (int) $meta['filesize']; + } elseif ( is_string( $attached_file ) && '' !== $attached_file && is_readable( $attached_file ) ) { $bytes = wp_filesize( $attached_file ); } else { $bytes = ''; @@ -4814,7 +4814,10 @@ function wp_prepare_attachment_for_js( $attachment ) { } $response = array_merge( $response, $sizes['full'] ); - } elseif ( $meta['sizes']['full']['file'] ) { + } elseif ( + ! empty( $meta['sizes']['full']['file'] ) && + isset( $meta['sizes']['full']['width'], $meta['sizes']['full']['height'] ) + ) { $sizes['full'] = array( 'url' => esc_url_raw( $base_url . $meta['sizes']['full']['file'] ), 'height' => $meta['sizes']['full']['height'], @@ -5189,6 +5192,8 @@ function wp_enqueue_media( $args = array() ) { 'mediaFound' => __( 'Number of media items found: %d' ), 'noMedia' => __( 'No media items found.' ), 'noMediaTryNewSearch' => __( 'No media items found. Try a different search.' ), + /* translators: %s: Media item title or file name. */ + 'mediaItemViewed' => __( 'Viewing media item: %s' ), // Library Details. 'attachmentDetails' => __( 'Attachment details' ), @@ -6532,7 +6537,7 @@ function wp_high_priority_element_flag( $value = null ): bool { * * @param string $filename Path to the image. * @param string $mime_type The source image mime type. - * @return string[] An array of mime type mappings. + * @return array An array of mime type mappings. */ function wp_get_image_editor_output_format( $filename, $mime_type ) { $output_format = array( @@ -6554,14 +6559,10 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) { * @since 6.7.0 The default was changed from an empty array to an array * containing the HEIC/HEIF images mime types. * - * @param string[] $output_format { - * An array of mime type mappings. Maps a source mime type to a new - * destination mime type. By default maps HEIC/HEIF input to JPEG output. - * - * @type string ...$0 The new mime type. - * } - * @param string $filename Path to the image. - * @param string $mime_type The source image mime type. + * @param array $output_format An array of mime type mappings. Maps a source mime type to a new + * destination mime type. By default maps HEIC/HEIF input to JPEG output. + * @param string $filename Path to the image. + * @param string $mime_type The source image mime type. */ return apply_filters( 'image_editor_output_format', $output_format, $filename, $mime_type ); } diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index e1c43540c8cb8..b283844836b83 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2090,7 +2090,7 @@ function wp_notify_moderator( $comment_id ) { $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; /* translators: %s: Trackback/pingback/comment author URL. */ $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; - $notify_message .= __( 'Trackback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n"; + $notify_message .= sprintf( __( 'Trackback excerpt: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; break; case 'pingback': @@ -2101,7 +2101,7 @@ function wp_notify_moderator( $comment_id ) { $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; /* translators: %s: Trackback/pingback/comment author URL. */ $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; - $notify_message .= __( 'Pingback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n"; + $notify_message .= sprintf( __( 'Pingback excerpt: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; break; default: // Comments. @@ -2376,7 +2376,7 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) $switched_locale = switch_to_user_locale( $user_id ); - $message = __( 'To set your password, visit the following address:' ) . "\r\n\r\n"; + $message = __( 'To set your password, visit the following address:' ) . "\r\n\r\n"; /* * Since some user login names end in a period, this could produce ambiguous URLs that diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php index 55459c0dd96c8..f64b584374c8e 100644 --- a/src/wp-includes/plugin.php +++ b/src/wp-includes/plugin.php @@ -1005,10 +1005,9 @@ function _wp_filter_build_unique_id( $hook_name, $callback, $priority ): ?string } if ( is_object( $callback ) ) { - return (string) spl_object_id( (object) $callback ); + return (string) spl_object_id( $callback ); } - $callback = (array) $callback; if ( ! isset( $callback[1] ) || ! is_string( $callback[1] ) ) { return null; } diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php index a604334e88c20..cc31471a0b88d 100644 --- a/src/wp-includes/pomo/plural-forms.php +++ b/src/wp-includes/pomo/plural-forms.php @@ -128,7 +128,7 @@ protected function parse( $str ) { case ')': $found = false; while ( ! empty( $stack ) ) { - $o2 = $stack[ count( $stack ) - 1 ]; + $o2 = array_last( $stack ); if ( '(' !== $o2 ) { $output[] = array( 'op', array_pop( $stack ) ); continue; @@ -163,7 +163,7 @@ protected function parse( $str ) { } while ( ! empty( $stack ) ) { - $o2 = $stack[ count( $stack ) - 1 ]; + $o2 = array_last( $stack ); // Ternary is right-associative in C. if ( '?:' === $operator || '?' === $operator ) { diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 3813176140bb4..2db73e9a20476 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -4052,6 +4052,22 @@ function _reset_front_page_settings_for_post( $post_id ) { unstick_post( $post->ID ); } +/** + * Resets the Privacy Policy page ID option when the Privacy Policy page + * is permanently deleted, to prevent uncached database queries for a + * non-existent page. + * + * @since 7.1.0 + * @access private + * + * @param int $post_id The ID of the post being deleted. + */ +function _reset_privacy_policy_page_for_post( int $post_id ): void { + if ( 'page' === get_post_type( $post_id ) && ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post_id ) ) { + update_option( 'wp_page_for_privacy_policy', 0 ); + } +} + /** * Moves a post or page to the Trash * @@ -7032,6 +7048,8 @@ function wp_delete_attachment_files( $post_id, $meta, $backup_sizes, $file ) { * * @since 2.1.0 * @since 6.0.0 The `$filesize` value was added to the returned array. + * @since 7.1.0 `false` is now returned if the metadata is not an array, and when the result is + * filtered the `sizes` key is always an array when present. * * @param int $attachment_id Attachment post ID. Defaults to global $post. * @param bool $unfiltered Optional. If true, filters are not run. Default false. @@ -7095,7 +7113,7 @@ function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) { $data = get_post_meta( $attachment_id, '_wp_attachment_metadata', true ); - if ( ! $data ) { + if ( ! is_array( $data ) || ! $data ) { return false; } @@ -7111,7 +7129,17 @@ function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) { * @param array $data Array of meta data for the given attachment. * @param int $attachment_id Attachment post ID. */ - return apply_filters( 'wp_get_attachment_metadata', $data, $attachment_id ); + $data = apply_filters( 'wp_get_attachment_metadata', $data, $attachment_id ); + + if ( ! is_array( $data ) ) { + return false; + } + + if ( array_key_exists( 'sizes', $data ) && ! is_array( $data['sizes'] ) ) { + $data['sizes'] = array(); + } + + return $data; } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php index 609b133ca4cfc..f336f321a9ea2 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php @@ -237,50 +237,54 @@ public function register_routes() { public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) { $args = parent::get_endpoint_args_for_item_schema( $method ); - if ( WP_REST_Server::CREATABLE === $method && wp_is_client_side_media_processing_enabled() ) { - $args['generate_sub_sizes'] = array( - 'type' => 'boolean', - 'default' => true, - 'description' => __( 'Whether to generate image sub sizes.' ), - ); - $args['convert_format'] = array( - 'type' => 'boolean', - 'default' => true, - 'description' => __( 'Whether to convert image formats.' ), - ); - $args['url'] = array( - 'type' => 'string', - 'format' => 'uri', - 'description' => __( 'URL of an external image to sideload into the media library, instead of uploading a file.' ), - 'sanitize_callback' => 'sanitize_url', - 'validate_callback' => static function ( $url, $request, $param ) { - /* - * A custom validate_callback replaces the default - * rest_validate_request_arg(), so re-apply it first to keep - * the schema checks (string type, uri format) enforced. - */ - $valid = rest_validate_request_arg( $url, $request, $param ); - if ( is_wp_error( $valid ) ) { - return $valid; - } + if ( WP_REST_Server::CREATABLE !== $method ) { + return $args; + } - /* - * Reject URLs that are not safe to request server-side. wp_http_validate_url() - * enforces an HTTP(S) scheme and blocks private, local, and otherwise - * disallowed hosts, guarding the sideload against SSRF. - */ - if ( false === wp_http_validate_url( $url ) ) { - return new WP_Error( - 'rest_invalid_url', - __( 'Invalid URL. Provide a valid, publicly reachable HTTP or HTTPS image URL.' ), - array( 'status' => 400 ) - ); - } + $args['generate_sub_sizes'] = array( + 'type' => 'boolean', + 'default' => true, + 'description' => __( 'Whether to generate image sub sizes.' ), + ); - return true; - }, - ); - } + $args['convert_format'] = array( + 'type' => 'boolean', + 'default' => true, + 'description' => __( 'Whether to convert image formats.' ), + ); + + $args['url'] = array( + 'type' => 'string', + 'format' => 'uri', + 'description' => __( 'URL of an external image to sideload into the media library, instead of uploading a file.' ), + 'sanitize_callback' => 'sanitize_url', + 'validate_callback' => static function ( $url, $request, $param ) { + /* + * A custom validate_callback replaces the default + * rest_validate_request_arg(), so re-apply it first to keep + * the schema checks (string type, uri format) enforced. + */ + $valid = rest_validate_request_arg( $url, $request, $param ); + if ( is_wp_error( $valid ) ) { + return $valid; + } + + /* + * Reject URLs that are not safe to request server-side. wp_http_validate_url() + * enforces an HTTP(S) scheme and blocks private, local, and otherwise + * disallowed hosts, guarding the sideload against SSRF. + */ + if ( false === wp_http_validate_url( $url ) ) { + return new WP_Error( + 'rest_invalid_url', + __( 'Invalid URL. Provide a valid, publicly reachable HTTP or HTTPS image URL.' ), + array( 'status' => 400 ) + ); + } + + return true; + }, + ); return $args; } @@ -381,9 +385,15 @@ public function create_item_permissions_check( $request ) { */ $prevent_unsupported_uploads = apply_filters( 'wp_prevent_unsupported_mime_type_uploads', true, $files['file']['type'] ?? null ); - // When the client handles image processing (generate_sub_sizes is false), - // skip the server-side image editor support check. - if ( false === $request['generate_sub_sizes'] ) { + /* + * When the client handles image processing (generate_sub_sizes is false), + * skip the server-side image editor support check. This check exists + * because the server cannot process the image, so it is only relaxed when + * client side media processing is enabled and something else can. Asking + * to skip sub sizes on a site without it does not make an unsupported + * image type any more usable. + */ + if ( wp_is_client_side_media_processing_enabled() && false === $request['generate_sub_sizes'] ) { $prevent_unsupported_uploads = false; } @@ -459,6 +469,10 @@ public function create_item( $request ) { // Disable server-side EXIF rotation so the client can handle it. // This preserves the original orientation value in the metadata. add_filter( 'wp_image_maybe_exif_rotate', '__return_false', 100 ); + // Disable server-side "big image" downscaling; the client supplies its + // own scaled version via the sideload endpoint. Scaling here would + // create a conflicting "-scaled" file and orphan the full-size upload. + add_filter( 'big_image_size_threshold', '__return_false', 100 ); } // Handle convert_format parameter. @@ -626,12 +640,41 @@ protected function create_item_from_url( $request ) { ); } + /* + * Cap the download at the same size the site would accept as a direct + * upload. check_upload_size() only applies on multisite, so without a + * ceiling here a single site has no limit at all on this path: the + * `upload_max_filesize` and `post_max_size` directives bound a request + * body, not a fetch the server makes itself. + * + * When `wp_max_upload_size` returns 0, no ceiling is applied. + */ + $max_size = (int) wp_max_upload_size(); + /* * Download the remote file with WordPress's HTTP API, which validates * the host and blocks requests to private or local addresses. This is * the same primitive core's media_sideload_image() relies on. + * + * `limit_response_size` stops the transfer once the limit is passed, + * so an oversized remote file is never written to disk in full. One + * byte over the ceiling is enough to fail the size check below. */ + $limit_response_size = static function ( $args ) use ( $max_size ) { + $args['limit_response_size'] = $max_size + 1; + return $args; + }; + + if ( $max_size > 0 ) { + add_filter( 'http_request_args', $limit_response_size ); + } + $tmp_file = download_url( $url ); + + if ( $max_size > 0 ) { + remove_filter( 'http_request_args', $limit_response_size ); + } + if ( is_wp_error( $tmp_file ) ) { return $tmp_file; } @@ -641,6 +684,27 @@ protected function create_item_from_url( $request ) { 'tmp_name' => $tmp_file, ); + $size_check = self::check_upload_size( $file_array ); + if ( is_wp_error( $size_check ) ) { + if ( file_exists( $tmp_file ) ) { + wp_delete_file( $tmp_file ); + } + return $size_check; + } + + if ( $max_size > 0 && wp_filesize( $tmp_file ) > $max_size ) { + if ( file_exists( $tmp_file ) ) { + wp_delete_file( $tmp_file ); + } + + return new WP_Error( + 'rest_upload_file_too_big', + /* translators: %s: Maximum allowed file size in kilobytes. */ + sprintf( __( 'This file is too big. Files must be less than %s KB in size.' ), number_format( $max_size / KB_IN_BYTES ) ), + array( 'status' => 400 ) + ); + } + $attachment_id = media_handle_sideload( $file_array, $post_id ); if ( is_wp_error( $attachment_id ) ) { @@ -683,6 +747,7 @@ private function remove_client_side_media_processing_filters(): void { remove_filter( 'fallback_intermediate_image_sizes', '__return_empty_array', 100 ); remove_filter( 'wp_image_maybe_exif_rotate', '__return_false', 100 ); remove_filter( 'image_editor_output_format', '__return_empty_array', 100 ); + remove_filter( 'big_image_size_threshold', '__return_false', 100 ); } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php index 65ca4e0018cb6..c0d58160467b2 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php @@ -425,7 +425,7 @@ public function create_post_autosave( $post_data, array $meta = array() ) { $new_autosave['post_author'] = $user_id; /** This action is documented in wp-admin/includes/post.php */ - do_action( 'wp_creating_autosave', $new_autosave ); + do_action( 'wp_creating_autosave', $new_autosave, true ); // wp_update_post() expects escaped array. $revision_id = wp_update_post( wp_slash( $new_autosave ) ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php index 3947bfd6107ce..706e36fb6cc66 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php @@ -453,7 +453,7 @@ protected function handle_auto_add( $menu_id, $request ) { $update = update_option( 'nav_menu_options', $nav_menu_option ); /** This action is documented in wp-includes/nav-menu.php */ - do_action( 'wp_update_nav_menu', $menu_id ); + do_action( 'wp_update_nav_menu', $menu_id, array() ); return $update; } diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php index 73a888d6eac48..0121298105ebf 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php @@ -595,14 +595,29 @@ protected function prepare_items_query( $prepared_args = array(), $request = nul * * @since 4.7.0 * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * @since 7.1.0 The global post is now restored to its previous value before returning. * - * @global WP_Post $post Global post object. + * @global WP_Post|null $post Global post object. * * @param WP_Post $item Post revision object. * @param WP_REST_Request $request Request object. * @return WP_REST_Response Response object. */ public function prepare_item_for_response( $item, $request ) { + /* + * Save the previous global post so it can be restored before returning. + * Preparing the revision sets up the global post and post data, which + * must not leak into the rest of the request (e.g. the autosaves endpoint + * is preloaded in the block editor, where a leaked global post can cause + * the editor to be initialized with the wrong post). + * + * Note that $post is intentionally not declared as a global here. It must + * remain local to this method so that a filter which reassigns the global + * post while the response is being prepared (for example on 'the_content') + * cannot change which post the remaining fields are read from. + */ + $previous_post = isset( $GLOBALS['post'] ) && $GLOBALS['post'] instanceof WP_Post ? $GLOBALS['post'] : null; + // Restores the more descriptive, specific name for use within this method. $post = $item; @@ -613,7 +628,11 @@ public function prepare_item_for_response( $item, $request ) { // Don't prepare the response body for HEAD requests. if ( $request->is_method( 'HEAD' ) ) { /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php */ - return apply_filters( 'rest_prepare_revision', new WP_REST_Response( array() ), $post, $request ); + $response = apply_filters( 'rest_prepare_revision', new WP_REST_Response( array() ), $post, $request ); + + $this->restore_post_data( $previous_post ); + + return $response; } $fields = $this->get_fields_for_response( $request ); @@ -717,7 +736,55 @@ public function prepare_item_for_response( $item, $request ) { * @param WP_Post $post The original revision object. * @param WP_REST_Request $request Request used to generate the response. */ - return apply_filters( 'rest_prepare_revision', $response, $post, $request ); + $response = apply_filters( 'rest_prepare_revision', $response, $post, $request ); + + $this->restore_post_data( $previous_post ); + + return $response; + } + + /** + * Restores the global post to its previous value after preparing a revision. + * + * Preparing a revision overwrites the global post and post data via + * setup_postdata(). This restores the global post that was in place + * beforehand so the change does not leak into the rest of the request. + * + * Only the global post is guaranteed to be restored. When there was no + * previous global post and the main query has no post either, which is the + * usual state during a REST request, wp_reset_postdata() has nothing to + * restore from, so the remaining globals set by setup_postdata() (such as + * $id, $authordata and $pages) are left describing the revision. Clearing + * those would mean unsetting each one by hand, which is beyond what is + * needed to keep the global post from leaking. + * + * @since 7.1.0 + * + * @param WP_Post|null $previous_post The global post to restore, or null if there was none. + */ + private function restore_post_data( ?WP_Post $previous_post ): void { + if ( $previous_post ) { + $GLOBALS['post'] = $previous_post; + setup_postdata( $previous_post ); + return; + } + + /* + * There was no global post to restore, so clear the revision's post data. + * This runs before clearing the global post because wp_reset_postdata() + * repopulates it from the main query whenever that query has a post. Note + * that it is a no-op when the main query has no post, in which case only + * the global post below is cleared. + */ + wp_reset_postdata(); + + /* + * Assigned rather than unset so that any `global $post` binding made before + * this request keeps pointing at the global. Unsetting removes the entry from + * the symbol table, which detaches those bindings, and a later write through + * one of them would no longer be visible to get_post(). + */ + $GLOBALS['post'] = null; } /** @@ -911,7 +978,7 @@ public function get_collection_params() { protected function prepare_excerpt_response( $excerpt, $post ) { /** This filter is documented in wp-includes/post-template.php */ - $excerpt = apply_filters( 'the_excerpt', $excerpt, $post ); + $excerpt = apply_filters( 'the_excerpt', $excerpt ); if ( empty( $excerpt ) ) { return ''; diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php index b821ca09453e3..b6691c588ca7d 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php @@ -668,6 +668,8 @@ protected function prepare_item_for_database( $request ) { * @since 5.9.0 Renamed `$template` to `$item` to match parent class for PHP 8 named parameter support. * @since 6.3.0 Added `modified` property to the response. * @since 7.1.0 Added `date` property to the response. + * @since 7.1.0 The `modified` property is `null` for templates that have no + * modification date. * * @param WP_Block_Template $item Template instance. * @param WP_REST_Request $request Request object. @@ -776,11 +778,23 @@ public function prepare_item_for_response( $item, $request ) { } if ( rest_is_field_included( 'modified', $fields ) ) { - $data['modified'] = mysql_to_rfc3339( $template->modified ); + /* + * File-backed templates have no modification date, and `mysql_to_rfc3339()` + * returns `false` for an empty or malformed value, which the schema does + * not allow. Return `null` in that case. + */ + $modified = mysql_to_rfc3339( $template->modified ); + $data['modified'] = false !== $modified ? $modified : null; } if ( rest_is_field_included( 'date', $fields ) ) { - $data['date'] = mysql_to_rfc3339( $template->date ); + /* + * File-backed templates have no date, and `mysql_to_rfc3339()` returns + * `false` for an empty or malformed value, which the schema does not + * allow. Return `null` in that case. + */ + $date = mysql_to_rfc3339( $template->date ); + $data['date'] = false !== $date ? $date : null; } if ( rest_is_field_included( 'author_text', $fields ) ) { @@ -1154,7 +1168,7 @@ public function get_item_schema() { ), 'modified' => array( 'description' => __( "The date the template was last modified, in the site's timezone." ), - 'type' => 'string', + 'type' => array( 'string', 'null' ), 'format' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -1177,7 +1191,7 @@ public function get_item_schema() { 'user', ), ), - 'date' => array( + 'date' => array( 'description' => __( "The date the template was published, in the site's timezone." ), 'type' => array( 'string', 'null' ), 'format' => 'date-time', diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php index 34cd1572526c6..64c1ebe1ba921 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php @@ -193,10 +193,10 @@ protected function cast_empty_objects( $value, $schema ) { } if ( isset( $schema['oneOf'] ) || isset( $schema['anyOf'] ) ) { - $branches = isset( $schema['oneOf'] ) ? $schema['oneOf'] : $schema['anyOf']; + $branches = $schema['oneOf'] ?? $schema['anyOf']; if ( array() === $value ) { foreach ( $branches as $branch ) { - if ( is_array( $branch ) && in_array( 'object', (array) ( isset( $branch['type'] ) ? $branch['type'] : array() ), true ) ) { + if ( is_array( $branch ) && in_array( 'object', (array) ( $branch['type'] ?? array() ), true ) ) { return (object) array(); } } @@ -204,7 +204,7 @@ protected function cast_empty_objects( $value, $schema ) { return $value; } - $types = (array) ( isset( $schema['type'] ) ? $schema['type'] : array() ); + $types = (array) ( $schema['type'] ?? array() ); if ( in_array( 'array', $types, true ) && isset( $schema['items'] ) ) { foreach ( $value as $index => $item ) { @@ -391,15 +391,15 @@ public function get_item_schema() { /** * Returns the schema properties shared by all view types (ViewBase), excluding 'type'. * + * Note that `search` and `page` are not part of the schema: they are managed + * via the URL, which is their only source of truth. + * * @since 7.1.0 * * @return array Schema properties for the base view configuration. */ protected function get_view_base_schema() { return array( - 'search' => array( - 'type' => 'string', - ), 'filters' => array( 'type' => 'array', 'items' => array( @@ -444,9 +444,6 @@ protected function get_view_base_schema() { ), ), ), - 'page' => array( - 'type' => 'integer', - ), 'perPage' => array( 'type' => 'integer', ), diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index fd1f24a08968d..a364439f0abbb 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -1038,7 +1038,7 @@ function wp_default_scripts( $scripts ) { 'deleted' => __( 'moved to the Trash.' ), /* translators: %s: File name. */ 'error_uploading' => __( '“%s” has failed to upload.' ), - 'unsupported_image' => __( 'This image cannot be displayed in a web browser. For best results convert it to JPEG before uploading.' ), + 'unsupported_image' => __( 'The server cannot process HEIC images. Convert it to JPEG before uploading.' ), 'noneditable_image' => __( 'The web server cannot generate responsive image sizes for this image. Convert it to JPEG or PNG before uploading.' ), 'file_url_copied' => __( 'The file URL has been copied to your clipboard' ), ); @@ -1781,9 +1781,11 @@ function wp_default_styles( $styles ) { 'wp-reusable-blocks', 'wp-patterns', 'wp-preferences', + 'wp-media-utils', ), 'format-library' => array(), 'list-reusable-blocks' => array( 'wp-components' ), + 'media-utils' => array( 'wp-components' ), 'reusable-blocks' => array( 'wp-components' ), 'patterns' => array( 'wp-components' ), 'preferences' => array( 'wp-components' ), @@ -1892,6 +1894,7 @@ function wp_default_styles( $styles ) { 'wp-editor', 'wp-format-library', 'wp-list-reusable-blocks', + 'wp-media-utils', 'wp-reusable-blocks', 'wp-patterns', 'wp-nux', diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 493d303068cf3..29317f0a8bf9b 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2632,11 +2632,11 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { $slug = sanitize_title( $slug, $term_id ); /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edit_terms', $term_id, $taxonomy ); + do_action( 'edit_terms', $term_id, $taxonomy, $args ); $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edited_terms', $term_id, $taxonomy ); + do_action( 'edited_terms', $term_id, $taxonomy, $args ); } /** @var numeric-string|null $tt_id */ @@ -3494,7 +3494,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) { do_action( "edit_{$taxonomy}", $term_id, $tt_id, $args ); /** This filter is documented in wp-includes/taxonomy.php */ - $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id ); + $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id, $args ); clean_term_cache( $term_id, $taxonomy ); @@ -4249,11 +4249,11 @@ function _update_post_term_count( $terms, $taxonomy ) { do_action( 'update_term_count', $tt_id, $taxonomy->name, $count ); /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edit_term_taxonomy', $tt_id, $taxonomy->name ); + do_action( 'edit_term_taxonomy', $tt_id, $taxonomy->name, array() ); $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $tt_id ) ); /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edited_term_taxonomy', $tt_id, $taxonomy->name ); + do_action( 'edited_term_taxonomy', $tt_id, $taxonomy->name, array() ); } } @@ -4279,11 +4279,11 @@ function _update_generic_term_count( $terms, $taxonomy ) { do_action( 'update_term_count', $term, $taxonomy->name, $count ); /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edit_term_taxonomy', $term, $taxonomy->name ); + do_action( 'edit_term_taxonomy', $term, $taxonomy->name, array() ); $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) ); /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edited_term_taxonomy', $term, $taxonomy->name ); + do_action( 'edited_term_taxonomy', $term, $taxonomy->name, array() ); } } diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json index df48a061af01e..1cd9dfa120e89 100644 --- a/src/wp-includes/theme.json +++ b/src/wp-includes/theme.json @@ -319,6 +319,7 @@ "radius": true }, "dimensions": { + "width": true, "dimensionSizes": [ { "name": "25%", diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 2246c53246e53..985bfaf0bf868 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.1-beta3-62828-src'; +$wp_version = '7.1-RC1-63034-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/src/wp-includes/view-config.php b/src/wp-includes/view-config.php index c4d20979b846f..b97b221ec2a32 100644 --- a/src/wp-includes/view-config.php +++ b/src/wp-includes/view-config.php @@ -4,12 +4,33 @@ * * Builds the default view configuration for an entity and exposes it through * the dynamic `get_entity_view_config_{$kind}_{$name}` filter so core and third - * parties can provide the configuration for a specific entity. + * parties can provide the configuration for a specific entity. The dynamic + * portions of the hook name are lowercased, e.g. + * `get_entity_view_config_posttype_page` for the `page` post type. * * @package WordPress * @since 7.1.0 */ +/** + * Builds the name of the dynamic filter that provides the view configuration + * for an entity. + * + * The entity kind and name are embedded in the hook name lowercased, so the + * hook follows the WordPress convention of lowercase hook names regardless of + * how the entity identifiers are spelled: the `postType`/`page` entity maps to + * the `get_entity_view_config_posttype_page` hook. + * + * @since 7.1.0 + * + * @param string $kind The entity kind (e.g. `postType`). + * @param string $name The entity name (e.g. `page`). + * @return string The filter name. + */ +function wp_get_entity_view_config_hook_name( $kind, $name ) { + return strtolower( "get_entity_view_config_{$kind}_{$name}" ); +} + /** * Builds the default `form` configuration for post types that don't provide their own. * @@ -27,7 +48,7 @@ * * @return array The default form configuration. */ -function _wp_get_default_post_type_form() { +function _wp_get_default_posttype_form() { return array( 'layout' => array( 'type' => 'panel' ), 'fields' => array( @@ -97,8 +118,10 @@ function _wp_get_default_post_type_form() { * Returns the view configuration for the given entity. * * Builds the default configuration shared by all entities and then exposes it - * through the dynamic `get_entity_view_config_{$kind}_{$name}` filter so that core - * and third parties can provide the configuration for a specific entity. + * through the dynamic `get_entity_view_config_{$kind}_{$name}` filter — with the + * dynamic portions lowercased, see wp_get_entity_view_config_hook_name() + * — so that core and third parties can provide the configuration for a + * specific entity. * * @since 7.1.0 * @@ -148,7 +171,7 @@ function wp_get_entity_view_config( $kind, $name ) { 'default_view' => $default_view, 'default_layouts' => $default_layouts, 'view_list' => $view_list, - 'form' => 'postType' === $kind ? _wp_get_default_post_type_form() : array(), + 'form' => 'postType' === $kind ? _wp_get_default_posttype_form() : array(), ); $data = new WP_View_Config_Data( $config ); @@ -164,7 +187,7 @@ function wp_get_entity_view_config( $kind, $name ) { * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ -function _wp_get_entity_view_config_post_type_page( $data ) { +function _wp_get_entity_view_config_posttype_page( $data ) { $default_layouts = array( 'table' => array( 'layout' => array( @@ -304,7 +327,7 @@ function _wp_get_entity_view_config_post_type_page( $data ) { * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ -function _wp_get_entity_view_config_post_type_wp_block( $data ) { +function _wp_get_entity_view_config_posttype_wp_block( $data ) { $default_layouts = array( 'table' => array( 'layout' => array( @@ -422,7 +445,7 @@ function _wp_get_entity_view_config_post_type_wp_block( $data ) { * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ -function _wp_get_entity_view_config_post_type_wp_template_part( $data ) { +function _wp_get_entity_view_config_posttype_wp_template_part( $data ) { $default_layouts = array( 'table' => array( 'layout' => array( @@ -524,7 +547,7 @@ function _wp_get_entity_view_config_post_type_wp_template_part( $data ) { * @param WP_View_Config_Data $data The view configuration container for the entity. * @return WP_View_Config_Data The updated view configuration container. */ -function _wp_get_entity_view_config_post_type_wp_template( $data ) { +function _wp_get_entity_view_config_posttype_wp_template( $data ) { $default_view = array( 'type' => 'grid', 'perPage' => 20, diff --git a/src/wp-trackback.php b/src/wp-trackback.php index 76c2a1d4a7285..c666c13e8b823 100644 --- a/src/wp-trackback.php +++ b/src/wp-trackback.php @@ -50,7 +50,7 @@ function trackback_response( $error = 0, $error_message = '' ) { if ( ! isset( $_GET['tb_id'] ) || ! $_GET['tb_id'] ) { $post_id = explode( '/', $_SERVER['REQUEST_URI'] ); - $post_id = (int) $post_id[ count( $post_id ) - 1 ]; + $post_id = (int) array_last( $post_id ); } $trackback_url = isset( $_POST['url'] ) ? sanitize_url( $_POST['url'] ) : ''; diff --git a/tests/e2e/specs/dashboard.test.js b/tests/e2e/specs/dashboard.test.js index 9d290e58a9d50..0481d306f2e0b 100644 --- a/tests/e2e/specs/dashboard.test.js +++ b/tests/e2e/specs/dashboard.test.js @@ -149,11 +149,9 @@ test.describe( 'Quick Draft', () => { await saveDraftButton.click(); // Check that the new draft title appears in the 'Your Recent Drafts' section. - // This test relies on Twenty Twenty-One being the active theme. - // Twenty Twenty-One alters the default post title from "(no title)" to "Untitled". await expect( page.locator( '.drafts .draft-title' ).first().getByRole( 'link' ) - ).toHaveText( 'Untitled' ); + ).toHaveText( '(no title)' ); await expect( page.locator( '.drafts .draft-content' ).first() @@ -164,6 +162,6 @@ test.describe( 'Quick Draft', () => { await expect( page.locator( '.type-post.status-draft .title' ).first() - ).toContainText( 'Untitled' ); + ).toContainText( '(no title)' ); } ); } ); diff --git a/tests/phpstan/ApplyFiltersDynamicFunctionReturnTypeExtension.php b/tests/phpstan/ApplyFiltersDynamicFunctionReturnTypeExtension.php new file mode 100644 index 0000000000000..4d708aa7757df --- /dev/null +++ b/tests/phpstan/ApplyFiltersDynamicFunctionReturnTypeExtension.php @@ -0,0 +1,95 @@ +hookDocBlock = $hook_doc_block; + } + + /** + * Determines whether this extension applies to the given function. + * + * @param FunctionReflection $functionReflection Function being analyzed. + * @return bool + */ + public function isFunctionSupported( FunctionReflection $functionReflection ): bool { + return in_array( $functionReflection->getName(), HookDocBlock::FILTER_FUNCTIONS, true ); + } + + /** + * Resolves the return type of the filter call from its preceding docblock. + * + * @link https://developer.wordpress.org/reference/functions/apply_filters/ + * @link https://developer.wordpress.org/reference/functions/apply_filters_deprecated/ + * @link https://developer.wordpress.org/reference/functions/apply_filters_ref_array/ + * + * @param FunctionReflection $functionReflection Function being analyzed. + * @param FuncCall $functionCall The function call node. + * @param Scope $scope Analysis scope. + * @return Type + * @throws ShouldNotHappenException + */ + public function getTypeFromFunctionCall( FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope ): Type { + $default = new MixedType(); + $resolved_php_doc = $this->hookDocBlock->getNullableHookDocBlock( $functionCall, $scope ); + + if ( null === $resolved_php_doc ) { + return $default; + } + + // The first `@param` describes the value being filtered. + $params = $resolved_php_doc->getParamTags(); + $param = reset( $params ); + + return false === $param ? $default : $param->getType(); + } +} diff --git a/tests/phpstan/HookDocBlock.php b/tests/phpstan/HookDocBlock.php new file mode 100644 index 0000000000000..6d7cca2f69f11 --- /dev/null +++ b/tests/phpstan/HookDocBlock.php @@ -0,0 +1,946 @@ +, + * patterns: list, + * } + * @phpstan-type HookNameMatcher array{ + * kind: 'literal'|'pattern', + * value: string, + * literal: string, + * } + * @phpstan-type HookDocumentationProblem array{ + * path: non-empty-string, + * hook: string, + * problem: self::PROBLEM_FILE_MISSING|self::PROBLEM_HOOK_MISSING, + * } + * @phpstan-type HookDocumentation array{ + * kind: 'inline'|'reference', + * resolved: ResolvedPhpDocBlock|null, + * paramCount: int<0, max>|null, + * problem: HookDocumentationProblem|null, + * } + */ +class HookDocBlock { + + /** + * Hook functions that carry a documenting docblock for their first argument. + */ + public const HOOK_FUNCTIONS = array( + 'apply_filters', + 'apply_filters_deprecated', + 'apply_filters_ref_array', + 'do_action', + 'do_action_deprecated', + 'do_action_ref_array', + ); + + /** + * Hook functions that filter a value, and so always pass at least one argument. + */ + public const FILTER_FUNCTIONS = array( + 'apply_filters', + 'apply_filters_deprecated', + 'apply_filters_ref_array', + ); + + /** + * Directories, relative to the WordPress root, scanned for reference comments + * when hashing the docblocks that call sites can inherit. + * + * @see HookDocBlock::getScannedFiles() + */ + private const SCANNED_DIRECTORIES = array( + 'wp-admin', + 'wp-includes', + 'wp-content/themes', + ); + + /** + * Problem code: the referenced file does not exist. + */ + public const PROBLEM_FILE_MISSING = 'fileMissing'; + + /** + * Problem code: the hook is not documented in the referenced file. + */ + public const PROBLEM_HOOK_MISSING = 'hookMissing'; + + /** + * Pattern matching WordPress core's "documented elsewhere" reference comment. + * Captures the referenced root-relative file path. + */ + private const REFERENCE_PATTERN = '#This (?:filter|action) is documented in (\S+)#'; + + /** + * File type mapper used to resolve docblocks in scope. + * + * @var FileTypeMapper + */ + protected FileTypeMapper $fileTypeMapper; + + /** + * In-memory cache of parsed hook documentation, keyed by absolute file path. + * + * @var array + */ + private array $fileHookDocs = array(); + + /** + * Absolute path to the WordPress root that reference comment paths resolve against. + * + * @var string + */ + private string $wordpressRoot; + + /** + * Canonical form of the WordPress root, with symlinks and dot segments resolved, + * against which a candidate path is tested for being inside the tree. + * + * @var string + */ + private string $canonicalWordpressRoot; + + /** + * Constructor. + * + * @param FileTypeMapper $file_type_mapper File type mapper. + * @param string|null $wordpress_root Absolute path to the WordPress root that + * "documented in " paths are relative to. + * Defaults to the `src` directory of this checkout. + */ + public function __construct( FileTypeMapper $file_type_mapper, ?string $wordpress_root = null ) { + $this->fileTypeMapper = $file_type_mapper; + $this->wordpressRoot = rtrim( $wordpress_root ?? dirname( __DIR__, 2 ) . '/src', '/' ); + + $canonical_root = realpath( $this->wordpressRoot ); + $this->canonicalWordpressRoot = false === $canonical_root ? $this->wordpressRoot : $canonical_root; + } + + /** + * Returns a hash of every hook docblock that a call site can inherit through a + * "documented elsewhere" reference comment. + * + * Those docblocks are read with plain file I/O, so PHPStan's dependency graph + * does not know that the referencing files depend on them: editing a canonical + * docblock re-analyzes only the file it lives in, leaving the cached results of + * every referencing file in place. Folding this hash into the result cache key + * invalidates the cache when an inheritable docblock changes, and only then. + * + * @see HookDocsResultCacheMetaExtension + * + * @return non-falsy-string + */ + public function getReferencedHookDocsHash(): string { + $docs = array(); + + foreach ( $this->getScannedFiles() as $file ) { + $code = file_get_contents( $file ); + + if ( false === $code || ! str_contains( $code, 'is documented in' ) ) { + continue; + } + + if ( ! preg_match_all( self::REFERENCE_PATTERN, $code, $matches ) ) { + continue; + } + + foreach ( $matches[1] as $reference_path ) { + $target = $this->resolveReferencePath( $file, $reference_path ); + + if ( null === $target ) { + continue; + } + + // Key on the path relative to the WordPress root so the hash does not + // depend on where the checkout lives. + $key = $this->getRootRelativePath( $target ); + + if ( ! isset( $docs[ $key ] ) ) { + $docs[ $key ] = $this->getHookDocs( $target ); + } + } + } + + ksort( $docs ); + + return md5( (string) json_encode( $docs ) ); + } + + /** + * Returns the files scanned for reference comments: the WordPress directories + * that can contain them, plus the PHP files at the root of the install. + * + * `wp-content/plugins` is deliberately not scanned. A checkout may have plugins + * carrying large `vendor` and `node_modules` trees, and core's reference comments + * only ever point within core. + * + * @return list Absolute file paths. + */ + private function getScannedFiles(): array { + $files = array(); + + foreach ( self::SCANNED_DIRECTORIES as $directory ) { + $path = $this->wordpressRoot . '/' . $directory; + + if ( ! is_dir( $path ) ) { + continue; + } + + $iterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator( $path, FilesystemIterator::SKIP_DOTS ) + ); + + foreach ( $iterator as $file ) { + if ( $file instanceof SplFileInfo && $file->isFile() && 'php' === strtolower( $file->getExtension() ) ) { + $files[] = $file->getPathname(); + } + } + } + + $root_files = glob( $this->wordpressRoot . '/*.php' ); + + if ( is_array( $root_files ) ) { + $files = array_merge( $files, $root_files ); + } + + return $files; + } + + /** + * Expresses an absolute path relative to the WordPress root when it sits inside + * it, so that hashes do not depend on the checkout location. + * + * Paths reached through a reference comment are canonical, so the canonical root is + * what they are relative to. + * + * @param string $path Absolute path. + * @return string + */ + private function getRootRelativePath( string $path ): string { + $prefix = $this->canonicalWordpressRoot . '/'; + + return str_starts_with( $path, $prefix ) ? substr( $path, strlen( $prefix ) ) : $path; + } + + /** + * Resolves the documentation for a hook call: the docblock written above it, or + * the canonical docblock a "documented elsewhere" comment points at. + * + * This is the one entry point the rules and the return type extension share, so + * all three necessarily agree on what documents a given call. + * + * A reference that cannot be resolved to a canonical docblock leaves `resolved` + * and `paramCount` null rather than falling back to the reference comment itself, + * so an unresolved reference is never mistaken for a hook documented with no + * parameters. `problem` says why it could not be resolved, when the reason is one + * worth reporting. + * + * @param FuncCall $function_call Hook function call node. + * @param Scope $scope Analysis scope. + * @return HookDocumentation|null Null when no docblock precedes the call. + * @throws ShouldNotHappenException + */ + public function getHookDoc( FuncCall $function_call, Scope $scope ): ?array { + $comment = self::getNullableNodeComment( $function_call ); + + if ( null === $comment ) { + return null; + } + + $text = $comment->getText(); + + // A docblock written at the call site documents the hook in place. + if ( ! preg_match( self::REFERENCE_PATTERN, $text, $matches ) ) { + $resolved = $this->resolveInlineDocBlock( $text, $scope ); + + return array( + 'kind' => 'inline', + 'resolved' => $resolved, + 'paramCount' => self::countParamTags( $resolved ), + 'problem' => null, + ); + } + + $hook_doc = array( + 'kind' => 'reference', + 'resolved' => null, + 'paramCount' => null, + 'problem' => null, + ); + + // Without an identifiable hook name there is nothing to look up in the + // referenced file, and so nothing to report either. + $matcher = self::getHookNameMatcher( $function_call ); + if ( null === $matcher ) { + return $hook_doc; + } + + $reference_path = $matches[1]; + $target_file = $this->resolveReferencePath( $scope->getFile(), $reference_path ); + + // The referenced file could not be located up the directory tree. + if ( null === $target_file ) { + $hook_doc['problem'] = array( + 'path' => $reference_path, + 'hook' => self::getHookNameDisplay( $function_call ), + 'problem' => self::PROBLEM_FILE_MISSING, + ); + + return $hook_doc; + } + + $doc_text = $this->findHookDoc( $target_file, $matcher ); + + if ( null === $doc_text ) { + $hook_doc['problem'] = array( + 'path' => $reference_path, + 'hook' => self::getHookNameDisplay( $function_call ), + 'problem' => self::PROBLEM_HOOK_MISSING, + ); + + return $hook_doc; + } + + // Resolve the canonical docblock in the global namespace, with no file + // context. Hook docblocks describe global/plain types (e.g. string[], + // WP_REST_Response), so the referenced file's `use` imports are not needed. + // Passing the referenced file here would also re-enter PHPStan's name-scope + // builder while that file is itself being analyzed, which makes + // getResolvedPhpDoc return an empty docblock (NameScopeAlreadyBeingCreated). + $resolved = $this->fileTypeMapper->getResolvedPhpDoc( null, null, null, null, $doc_text ); + + $hook_doc['resolved'] = $resolved; + $hook_doc['paramCount'] = self::countParamTags( $resolved ); + + return $hook_doc; + } + + /** + * Resolves the docblock preceding the given function call, if any. + * + * @param FuncCall $function_call Hook function call node. + * @param Scope $scope Analysis scope. + * @return ResolvedPhpDocBlock|null Resolved docblock, or null when none precedes + * the call or a reference cannot be resolved. + * @throws ShouldNotHappenException + */ + public function getNullableHookDocBlock( FuncCall $function_call, Scope $scope ): ?ResolvedPhpDocBlock { + $hook_doc = $this->getHookDoc( $function_call, $scope ); + + return null === $hook_doc ? null : $hook_doc['resolved']; + } + + /** + * Resolves a docblock written at a call site, in the scope of that site. + * + * @param string $text Docblock text. + * @param Scope $scope Analysis scope. + * @return ResolvedPhpDocBlock + * @throws ShouldNotHappenException + */ + private function resolveInlineDocBlock( string $text, Scope $scope ): ResolvedPhpDocBlock { + $class_reflection = $scope->getClassReflection(); + $trait_reflection = $scope->getTraitReflection(); + + return $this->fileTypeMapper->getResolvedPhpDoc( + $scope->getFile(), + ( $scope->isInClass() && null !== $class_reflection ) ? $class_reflection->getName() : null, + ( $scope->isInTrait() && null !== $trait_reflection ) ? $trait_reflection->getName() : null, + $scope->getFunctionName(), + $text + ); + } + + /** + * Counts the `@param` tags a resolved docblock declares. + * + * ResolvedPhpDocBlock::getParamTags() is keyed by parameter name, so two tags + * documenting the same name — a copy-and-paste slip — collapse into a single + * entry. That undercounts, which both reports a hook passing the documented + * number of arguments as a mismatch and hides a hook that genuinely passes too + * few. The parsed docblock nodes list every tag, so they are counted instead. + * + * Tags PHPStan cannot parse as a `@param` — one missing its variable name, say — + * are still left out, so a malformed tag continues to surface rather than passing + * for documentation of a parameter. + * + * @param ResolvedPhpDocBlock $resolved_php_doc Resolved docblock. + * @return int<0, max> + */ + private static function countParamTags( ResolvedPhpDocBlock $resolved_php_doc ): int { + $count = 0; + + foreach ( $resolved_php_doc->getPhpDocNodes() as $php_doc_node ) { + $count += count( $php_doc_node->getParamTagValues() ); + } + + return $count; + } + + /** + * Determines whether a filter call resolves to a docblock that documents no + * parameters. + * + * A filter always passes at least the value being filtered, so such a docblock + * does not document the hook. It is either hook documentation with its `@param` + * tags missing, or an unrelated annotation — typically a `@var` block — that + * happens to sit immediately above the call. + * + * This holds wherever the docblock was found, so no argument count is worth + * comparing against it. HookDocumentationRule reports it only for a docblock + * written at the call itself: a hook documented elsewhere is fixed where its + * canonical docblock lives, rather than once per site inheriting it. + * + * @param FuncCall $function_call Hook function call node. + * @param HookDocumentation $hook_doc Documentation resolved for the call. + * @return bool + */ + public static function isFilterMissingParamDocs( FuncCall $function_call, array $hook_doc ): bool { + if ( 0 !== $hook_doc['paramCount'] ) { + return false; + } + + return $function_call->name instanceof Name + && in_array( $function_call->name->toString(), self::FILTER_FUNCTIONS, true ); + } + + /** + * Determines whether a hook call's name can be identified well enough to + * require or locate documentation. + * + * Calls whose hook name carries no literal text (e.g. the generic + * `apply_filters_ref_array( $hook_name, $args )` forwarders in plugin.php) + * cannot be meaningfully documented at the call site and are excluded. + * + * @param FuncCall $function_call Hook function call node. + * @return bool + */ + public static function hasIdentifiableHookName( FuncCall $function_call ): bool { + $args = $function_call->getArgs(); + if ( ! isset( $args[0] ) ) { + return false; + } + + $value = $args[0]->value; + if ( $value instanceof String_ ) { + return true; + } + + return null !== self::buildHookNamePattern( $value ); + } + + /** + * Returns the canonical docblock text for a hook documented in the given file. + * + * @param string $file Absolute path to the file declaring the hook. + * @param HookNameMatcher $matcher Hook name matcher from getHookNameMatcher(). + * @return string|null Docblock text, or null when no documented invocation is found. + */ + private function findHookDoc( string $file, array $matcher ): ?string { + $docs = $this->getHookDocs( $file ); + + if ( 'literal' === $matcher['kind'] ) { + $name = $matcher['value']; + + if ( isset( $docs['exact'][ $name ] ) ) { + return $docs['exact'][ $name ]; + } + + // A literal name may be an instance of a dynamic canonical hook + // (e.g. "index_template_hierarchy" matching "{$type}_template_hierarchy"). + // The most specifically anchored match wins, so a name is not attributed + // to a loosely anchored hook that merely happens to match it as well. + $best = null; + $anchor_len = -1; + foreach ( $docs['patterns'] as $pattern ) { + $literal_len = strlen( $pattern['literal'] ); + + if ( $literal_len <= $anchor_len || ! self::isAnchorableLiteral( $pattern['literal'] ) ) { + continue; + } + + if ( preg_match( $pattern['regex'], $name ) ) { + $best = $pattern['text']; + $anchor_len = $literal_len; + } + } + + return $best; + } + + // A dynamic referencing name matches the same dynamic canonical (identical + // regex), or a literal canonical the pattern covers. + $regex = $matcher['value']; + + foreach ( $docs['patterns'] as $pattern ) { + if ( $pattern['regex'] === $regex ) { + return $pattern['text']; + } + } + + // Covering a literal canonical is only meaningful for a pattern anchored + // specifically enough to identify a hook. + if ( ! self::isAnchorableLiteral( $matcher['literal'] ) ) { + return null; + } + + foreach ( $docs['exact'] as $name => $text ) { + if ( preg_match( $regex, $name ) ) { + return $text; + } + } + + return null; + } + + /** + * Returns the hook documentation declared by a file, parsing each file at most + * once per process. + * + * @param string $file Absolute path to the file. + * @return HookDocs + */ + private function getHookDocs( string $file ): array { + if ( ! isset( $this->fileHookDocs[ $file ] ) ) { + $this->fileHookDocs[ $file ] = self::loadHookDocs( $file ); + } + + return $this->fileHookDocs[ $file ]; + } + + /** + * Reads and parses the hook documentation declared by a file. + * + * @param string $file Absolute path to the file. + * @return HookDocs + */ + private static function loadHookDocs( string $file ): array { + $empty = array( + 'exact' => array(), + 'patterns' => array(), + ); + + if ( ! is_file( $file ) || ! is_readable( $file ) ) { + return $empty; + } + + $code = file_get_contents( $file ); + if ( false === $code ) { + return $empty; + } + + return self::parseHookDocs( $code ); + } + + /** + * Collects the canonical docblock text for each hook invocation documented in + * the given PHP source. + * + * A docblock is treated as canonical when it is not itself a "documented + * elsewhere" reference, so referencing call sites do not count as the source + * of documentation. Hooks with a literal name are indexed exactly; hooks with + * a dynamic name that contains literal text are indexed as a regex, alongside + * that literal text, which findHookDoc() uses to rank how specifically a pattern + * identifies a hook. + * + * @see HookDocBlock::findHookDoc() + * + * @param string $code PHP source code. + * @return HookDocs + */ + private static function parseHookDocs( string $code ): array { + $docs = array( + 'exact' => array(), + 'patterns' => array(), + ); + + // Source that cannot be parsed documents nothing this can read, and must not stop + // the analysis: a file is temporarily incomplete while it is being edited, and may + // use syntax the host PHP version does not know. Collecting the parse errors + // rather than throwing keeps the hooks documented ahead of the error wherever the + // parser can recover, and yields none where it cannot. + $parser = ( new ParserFactory() )->createForHostVersion(); + + try { + $stmts = $parser->parse( $code, new Collecting() ); + } catch ( PhpParserError $parse_error ) { + return $docs; + } + + if ( null === $stmts ) { + return $docs; + } + + // Propagate each docblock down to the nested hook-call node. + $traverser = new NodeTraverser(); + $traverser->addVisitor( new HookDocsVisitor() ); + $stmts = $traverser->traverse( $stmts ); + + $seen = array(); + $calls = ( new NodeFinder() )->findInstanceOf( $stmts, FuncCall::class ); + foreach ( $calls as $call ) { + if ( ! $call instanceof FuncCall || ! $call->name instanceof Name ) { + continue; + } + + if ( ! in_array( $call->name->toString(), self::HOOK_FUNCTIONS, true ) ) { + continue; + } + + $args = $call->getArgs(); + if ( ! isset( $args[0] ) ) { + continue; + } + + $doc = $call->getAttribute( 'latestDocComment' ); + + // Skip reference comments so only the canonical documentation counts. + if ( ! $doc instanceof Doc || preg_match( self::REFERENCE_PATTERN, $doc->getText() ) ) { + continue; + } + + $name_expr = $args[0]->value; + + if ( $name_expr instanceof String_ ) { + if ( ! isset( $docs['exact'][ $name_expr->value ] ) ) { + $docs['exact'][ $name_expr->value ] = $doc->getText(); + } + continue; + } + + $pattern = self::buildHookNamePattern( $name_expr ); + if ( null !== $pattern && ! isset( $seen[ $pattern['regex'] ] ) ) { + $seen[ $pattern['regex'] ] = true; + $docs['patterns'][] = array( + 'regex' => $pattern['regex'], + 'literal' => $pattern['literal'], + 'text' => $doc->getText(), + ); + } + } + + return $docs; + } + + /** + * Builds an anchored regex matching a dynamic hook name expression, together + * with the literal text it is anchored on, or null when the expression carries + * no literal text at all. + * + * @param Expr $expr Hook name expression. + * @return array{ + * regex: non-falsy-string, + * literal: non-empty-string, + * }|null + */ + private static function buildHookNamePattern( Expr $expr ): ?array { + $parts = self::hookNameRegexParts( $expr ); + if ( null === $parts || '' === $parts[1] ) { + return null; + } + + return array( + 'regex' => '#^' . $parts[0] . '$#', + 'literal' => $parts[1], + ); + } + + /** + * Determines whether the literal text of a dynamic hook name identifies a hook + * specifically enough to resolve documentation through it. + * + * A name whose literal text is nothing but separators — e.g. taxonomy.php's + * `"{$taxonomy}_{$field}"`, which becomes `#^.+_.+$#` — matches almost any hook + * name, so honoring it would attribute a call to an unrelated hook's + * documentation and hide a genuinely broken reference comment. The hook is still + * required to be documented at its own call site; only its use as the + * documentation *source* for a differently named hook is refused. + * + * @param string $literal Concatenated literal text of a hook name expression. + * @return bool + */ + private static function isAnchorableLiteral( string $literal ): bool { + return '' !== trim( $literal, "-_ \t\n\r\0\x0B" ); + } + + /** + * Recursively converts a hook name expression into a regex fragment and the + * literal text that fragment is anchored on. + * + * @param Expr $expr Hook name expression. + * @return array{ + * 0: string, + * 1: string, + * }|null Fragment and its literal text, or null if unsupported. + */ + private static function hookNameRegexParts( Expr $expr ): ?array { + if ( $expr instanceof String_ ) { + return array( preg_quote( $expr->value, '#' ), $expr->value ); + } + + if ( $expr instanceof Concat ) { + $left = self::hookNameRegexParts( $expr->left ); + $right = self::hookNameRegexParts( $expr->right ); + if ( null === $left || null === $right ) { + return null; + } + return array( $left[0] . $right[0], $left[1] . $right[1] ); + } + + if ( $expr instanceof InterpolatedString ) { + $fragment = ''; + $literal = ''; + foreach ( $expr->parts as $part ) { + if ( $part instanceof InterpolatedStringPart ) { + $fragment .= preg_quote( $part->value, '#' ); + $literal .= $part->value; + } else { + $fragment .= '.+'; + } + } + return array( $fragment, $literal ); + } + + // Variables, property fetches, etc.: a wildcard with no literal anchor. + return array( '.+', '' ); + } + + /** + * Resolves a WordPress-root-relative reference path against the file + * containing the reference comment. + * + * The reference comment names the exact file (e.g. "wp-includes/media.php"), so + * resolution proceeds in two steps: + * + * 1. Walk up from the current file's directory, as far as the WordPress root, + * until the relative path resolves to a real file inside the tree. This works + * regardless of where in the tree the referencing file lives (core, a bundled + * theme, the install root, ...), and also resolves the sibling references used + * by the bundled themes (e.g. "author.php"). The walk stops at the root because + * a path that only resolves above the tree under analysis is a coincidence + * rather than the file the comment names. + * 2. Fall back to the WordPress root. Step 1 assumes the analysed file sits in + * its real location, which does not hold when an IDE runs PHPStan against a + * temporary copy of the editor buffer. Without this fallback, every + * reference comment in such a copy is reported as naming a missing file. + * + * Only the single named file is ever tested; no directory is enumerated. + * + * @param string $current_file Absolute path to the file with the reference comment. + * @param string $reference_path Root-relative path (e.g. "wp-includes/media.php"). + * @return string|null Absolute path to the referenced file, or null when it cannot be located. + */ + private function resolveReferencePath( string $current_file, string $reference_path ): ?string { + $reference_path = ltrim( $reference_path, '/' ); + $dir = dirname( $current_file ); + + while ( $dir === $this->wordpressRoot || str_starts_with( $dir, $this->wordpressRoot . '/' ) ) { + $target = $this->resolveWithinRoot( $dir . '/' . $reference_path ); + if ( null !== $target ) { + return $target; + } + + // The root has just been tested, so the walk is done. + if ( $dir === $this->wordpressRoot ) { + return null; + } + + $dir = dirname( $dir ); + } + + // The file holding the comment is not in the tree, so resolve against the root. + return $this->resolveWithinRoot( $this->wordpressRoot . '/' . $reference_path ); + } + + /** + * Canonicalizes a candidate path, accepting it only when it is a file inside the + * WordPress tree. + * + * A reference path is usually a plain relative path, but the convention is also + * written with dot segments relative to the file holding the comment: WooCommerce + * references `../wc-user-functions.php` and MainWP `../widgets/…`, so those have to + * keep resolving. WordPress core has never used that form, which is exactly why + * rejecting dot segments outright would look harmless here and break those plugins. + * + * Canonicalizing the candidate and requiring the result to be inside the tree keeps + * them working while ensuring a reference cannot reach a file outside it. That + * matters because whatever resolution finds is then read and parsed. + * + * @param string $candidate Absolute candidate path, possibly containing dot segments. + * @return string|null Canonical path, or null when it is not a file inside the tree. + */ + private function resolveWithinRoot( string $candidate ): ?string { + if ( ! is_file( $candidate ) ) { + return null; + } + + $canonical = realpath( $candidate ); + + if ( false === $canonical ) { + return null; + } + + return str_starts_with( $canonical, $this->canonicalWordpressRoot . '/' ) ? $canonical : null; + } + + /** + * Returns a matcher describing a hook call's name: a literal string to look up + * exactly, or a regex for a dynamic name (e.g. "{$type}_template_hierarchy"). + * + * @param FuncCall $call Hook function call node. + * @return HookNameMatcher|null Null when the name carries no identifiable text + * (e.g. a bare variable). + */ + private static function getHookNameMatcher( FuncCall $call ): ?array { + $args = $call->getArgs(); + if ( ! isset( $args[0] ) ) { + return null; + } + + $expr = $args[0]->value; + + if ( $expr instanceof String_ ) { + return array( + 'kind' => 'literal', + 'value' => $expr->value, + 'literal' => $expr->value, + ); + } + + $pattern = self::buildHookNamePattern( $expr ); + if ( null !== $pattern ) { + return array( + 'kind' => 'pattern', + 'value' => $pattern['regex'], + 'literal' => $pattern['literal'], + ); + } + + return null; + } + + /** + * Renders a hook name expression to a readable string for diagnostics, e.g. + * "default_option_{$option}". + * + * @param FuncCall $call Hook function call node. + * @return string + */ + public static function getHookNameDisplay( FuncCall $call ): string { + $args = $call->getArgs(); + if ( ! isset( $args[0] ) ) { + return ''; + } + + return self::renderHookName( $args[0]->value ); + } + + /** + * Recursively renders a hook name expression to a readable string. + * + * @param Expr $expr Hook name expression. + * @return string + */ + private static function renderHookName( Expr $expr ): string { + if ( $expr instanceof String_ ) { + return $expr->value; + } + + if ( $expr instanceof Concat ) { + return self::renderHookName( $expr->left ) . self::renderHookName( $expr->right ); + } + + if ( $expr instanceof InterpolatedString ) { + $out = ''; + foreach ( $expr->parts as $part ) { + if ( $part instanceof InterpolatedStringPart ) { + $out .= $part->value; + } elseif ( $part instanceof Variable && is_string( $part->name ) ) { + $out .= '{$' . $part->name . '}'; + } else { + $out .= '{...}'; + } + } + return $out; + } + + if ( $expr instanceof Variable && is_string( $expr->name ) ) { + return '$' . $expr->name; + } + + return '...'; + } + + /** + * Returns the docblock attached to the node by HookDocsVisitor, if present. + * + * @param FuncCall $node Function call node. + * @return Doc|null + */ + private static function getNullableNodeComment( FuncCall $node ): ?Doc { + /** @var Doc|null $doc */ + $doc = $node->getAttribute( 'latestDocComment' ); + return $doc; + } +} diff --git a/tests/phpstan/HookDocsResultCacheMetaExtension.php b/tests/phpstan/HookDocsResultCacheMetaExtension.php new file mode 100644 index 0000000000000..ff7b3a9fa068b --- /dev/null +++ b/tests/phpstan/HookDocsResultCacheMetaExtension.php @@ -0,0 +1,99 @@ + *\/` convention and read with plain + * file I/O. A referencing file has no symbol dependency on its reference target, + * so editing a canonical docblock re-analyzes only the file that docblock lives + * in; every call site inheriting it keeps its cached result. + * 2. The tooling's own source files. PHPStan hashes its configuration, but changing + * a rule's logic does not invalidate results that rule already produced. + * + * Both are folded into the result cache key here, so cached results are discarded + * when — and only when — an inheritable docblock or the tooling itself changes. + * + * @see HookDocBlock::getReferencedHookDocsHash() + * + * @package WordPress + */ + +declare(strict_types=1); + +namespace WordPress\PHPStan; + +use PHPStan\Analyser\ResultCache\ResultCacheMetaExtension; + +/** + * Invalidates the result cache when hook documentation read from another file, or + * the tooling reading it, changes. + */ +final class HookDocsResultCacheMetaExtension implements ResultCacheMetaExtension { + + /** + * Hook docblock resolver. + * + * @var HookDocBlock + */ + private HookDocBlock $hookDocBlock; + + /** + * Constructor. + * + * @param HookDocBlock $hook_doc_block Hook docblock resolver. + */ + public function __construct( HookDocBlock $hook_doc_block ) { + $this->hookDocBlock = $hook_doc_block; + } + + /** + * Returns the key identifying this metadata source. + * + * @return non-empty-string + */ + public function getKey(): string { + return 'wordpressHookDocs'; + } + + /** + * Returns a hash of the inheritable hook documentation and of the tooling that + * reads it. + * + * @return non-falsy-string + */ + public function getHash(): string { + return md5( self::getToolingHash() . '|' . $this->hookDocBlock->getReferencedHookDocsHash() ); + } + + /** + * Hashes the PHPStan extension sources in this directory. + * + * @return non-falsy-string + */ + private static function getToolingHash(): string { + $files = glob( __DIR__ . '/*.php' ); + + if ( ! is_array( $files ) ) { + $files = array(); + } + + sort( $files ); + + $parts = array(); + + foreach ( $files as $file ) { + $contents = file_get_contents( $file ); + + if ( false === $contents ) { + continue; + } + + $parts[] = basename( $file ) . ':' . md5( $contents ); + } + + return md5( implode( '|', $parts ) ); + } +} diff --git a/tests/phpstan/HookDocsVisitor.php b/tests/phpstan/HookDocsVisitor.php new file mode 100644 index 0000000000000..a025c1127f402 --- /dev/null +++ b/tests/phpstan/HookDocsVisitor.php @@ -0,0 +1,122 @@ + + */ + private array $stack = array(); + + /** + * Resets state before traversing a new set of nodes. + * + * @param Node[] $nodes Nodes about to be traversed. + * @return Node[]|null + */ + public function beforeTraverse( array $nodes ): ?array { + $this->latestDocComment = null; + $this->stack = array(); + + return null; + } + + /** + * Tracks the applicable docblock and attaches it to function-call nodes. + * + * @param Node $node Node being entered. + * @return Node|null + */ + public function enterNode( Node $node ): ?Node { + $doc = $node->getDocComment(); + + if ( null !== $doc ) { + // A docblock here documents this node and everything nested within it. + $this->stack[] = array( $node, $this->latestDocComment ); + $this->latestDocComment = $doc; + } elseif ( $node instanceof Stmt ) { + // A new statement without its own docblock starts an undocumented scope + // for its subtree, so a preceding docblock does not carry into it. + $this->stack[] = array( $node, $this->latestDocComment ); + $this->latestDocComment = null; + } + + // Attributes are retained for as long as a parsed file is held in memory, so + // the docblock is recorded only where it can be read: on a function call, and + // only when there is one to record. Readers cannot tell an absent attribute + // from a null one, so skipping the write costs them nothing. + if ( null !== $this->latestDocComment && $node instanceof FuncCall ) { + $node->setAttribute( 'latestDocComment', $this->latestDocComment ); + } + + return null; + } + + /** + * Restores the docblock that applied before this node was entered, bounding a + * docblock's reach to the node that introduced it. + * + * @param Node $node Node being left. + * @return Node|null + */ + public function leaveNode( Node $node ): ?Node { + $top = end( $this->stack ); + + if ( false !== $top && $top[0] === $node ) { + $this->latestDocComment = $top[1]; + array_pop( $this->stack ); + } + + return null; + } +} diff --git a/tests/phpstan/HookDocumentationRule.php b/tests/phpstan/HookDocumentationRule.php new file mode 100644 index 0000000000000..7eead6a371321 --- /dev/null +++ b/tests/phpstan/HookDocumentationRule.php @@ -0,0 +1,166 @@ + *\/` reference comment. + * + * When a reference comment is used, the referenced file must exist and must + * actually document a hook of the same name; otherwise an error is reported. + * + * @package WordPress + */ + +declare(strict_types=1); + +namespace WordPress\PHPStan; + +use PhpParser\Node; +use PhpParser\Node\Expr\FuncCall; +use PhpParser\Node\Name; +use PHPStan\Analyser\Scope; +use PHPStan\Rules\IdentifierRuleError; +use PHPStan\Rules\Rule; +use PHPStan\Rules\RuleErrorBuilder; +use PHPStan\ShouldNotHappenException; + +/** + * Reports undocumented hooks and broken "documented elsewhere" references. + * + * @implements Rule + */ +class HookDocumentationRule implements Rule { + + /** + * Hook docblock resolver. + * + * @var HookDocBlock + */ + private HookDocBlock $hookDocBlock; + + /** + * Constructor. + * + * @param HookDocBlock $hook_doc_block Hook docblock resolver. + */ + public function __construct( HookDocBlock $hook_doc_block ) { + $this->hookDocBlock = $hook_doc_block; + } + + /** + * Returns the node type this rule processes. + * + * @return string + */ + public function getNodeType(): string { + return FuncCall::class; + } + + /** + * Processes a function call node. + * + * @param Node $node Function call node. + * @param Scope $scope Analysis scope. + * @return list + * @throws ShouldNotHappenException + */ + public function processNode( Node $node, Scope $scope ): array { + if ( ! $node instanceof FuncCall || ! $node->name instanceof Name ) { + return array(); + } + + if ( ! in_array( $node->name->toString(), HookDocBlock::HOOK_FUNCTIONS, true ) ) { + return array(); + } + + // Skip calls whose hook name carries no literal text, i.e. a bare variable + // such as the generic apply_filters_ref_array( $hook_name, $args ) + // re-dispatch in plugin.php. There is no concrete hook to document or look + // up. Calls naming a hook literally (e.g. apply_filters_ref_array( 'the_posts', + // ... )) or dynamically with literal text (e.g. "{$type}_template_hierarchy") + // remain subject to the documentation requirement. + if ( ! HookDocBlock::hasIdentifiableHookName( $node ) ) { + return array(); + } + + $function_name = $node->name->toString(); + $hook_doc = $this->hookDocBlock->getHookDoc( $node, $scope ); + + // No preceding docblock at all: the hook is undocumented. + if ( null === $hook_doc ) { + return array( + RuleErrorBuilder::message( + sprintf( + '%s() call for hook "%s" is not preceded by a docblock documenting the hook, nor by a "This filter/action is documented in " reference comment.', + $function_name, + HookDocBlock::getHookNameDisplay( $node ) + ) + ) + ->identifier( 'wordpress.hookDocMissing' ) + ->line( $node->getStartLine() ) + ->build(), + ); + } + + // An inline docblock documents the hook in place, provided it describes the + // value being filtered. + if ( 'reference' !== $hook_doc['kind'] ) { + if ( ! HookDocBlock::isFilterMissingParamDocs( $node, $hook_doc ) ) { + return array(); + } + + return array( + RuleErrorBuilder::message( + sprintf( + '%s() call for hook "%s" is preceded by a docblock that documents no parameters. A filter is documented with a `@param` tag for the value being filtered, plus one for each further argument passed.', + $function_name, + HookDocBlock::getHookNameDisplay( $node ) + ) + ) + ->identifier( 'wordpress.hookDocNoParams' ) + ->line( $node->getStartLine() ) + ->build(), + ); + } + + // A reference comment must point at a file that documents this hook. + $problem = $hook_doc['problem']; + if ( null === $problem ) { + return array(); + } + + if ( HookDocBlock::PROBLEM_FILE_MISSING === $problem['problem'] ) { + return array( + RuleErrorBuilder::message( + sprintf( + '%s() call for hook "%s" references documentation in "%s", but no such file exists in the tree being analyzed.', + $function_name, + $problem['hook'], + $problem['path'] + ) + ) + ->identifier( 'wordpress.hookDocReferenceFileMissing' ) + ->line( $node->getStartLine() ) + ->build(), + ); + } + + return array( + RuleErrorBuilder::message( + sprintf( + '%s() call for hook "%s" references documentation in "%s", but no documented "%s" hook is found there.', + $function_name, + $problem['hook'], + $problem['path'], + $problem['hook'] + ) + ) + ->identifier( 'wordpress.hookDocReferenceHookMissing' ) + ->line( $node->getStartLine() ) + ->build(), + ); + } +} diff --git a/tests/phpstan/HookParamCountRule.php b/tests/phpstan/HookParamCountRule.php new file mode 100644 index 0000000000000..4cebe197a7af4 --- /dev/null +++ b/tests/phpstan/HookParamCountRule.php @@ -0,0 +1,218 @@ +" + * reference is checked against its canonical docblock. + * + * @package WordPress + */ + +declare(strict_types=1); + +namespace WordPress\PHPStan; + +use PhpParser\Node; +use PhpParser\Node\Expr\FuncCall; +use PhpParser\Node\Name; +use PHPStan\Analyser\Scope; +use PHPStan\Rules\IdentifierRuleError; +use PHPStan\Rules\Rule; +use PHPStan\Rules\RuleErrorBuilder; +use PHPStan\ShouldNotHappenException; +use PHPStan\Type\Constant\ConstantIntegerType; + +/** + * Reports hook invocations whose argument count does not match the number of + * documented parameters. + * + * @implements Rule + */ +class HookParamCountRule implements Rule { + + /** + * Hook functions that receive the hook arguments as variadic parameters. + */ + private const VARIADIC_FUNCTIONS = array( + 'apply_filters', + 'do_action', + ); + + /** + * Hook functions that receive the hook arguments as an array in their second + * parameter. + */ + private const ARRAY_ARG_FUNCTIONS = array( + 'apply_filters_ref_array', + 'apply_filters_deprecated', + 'do_action_ref_array', + 'do_action_deprecated', + ); + + /** + * Hook docblock resolver. + * + * @var HookDocBlock + */ + private HookDocBlock $hookDocBlock; + + /** + * Constructor. + * + * @param HookDocBlock $hook_doc_block Hook docblock resolver. + */ + public function __construct( HookDocBlock $hook_doc_block ) { + $this->hookDocBlock = $hook_doc_block; + } + + /** + * Returns the node type this rule processes. + * + * @return string + */ + public function getNodeType(): string { + return FuncCall::class; + } + + /** + * Processes a function call node. + * + * @param Node $node Function call node. + * @param Scope $scope Analysis scope. + * @return list + * @throws ShouldNotHappenException + */ + public function processNode( Node $node, Scope $scope ): array { + if ( ! $node instanceof FuncCall || ! $node->name instanceof Name ) { + return array(); + } + + $function_name = $node->name->toString(); + $is_variadic = in_array( $function_name, self::VARIADIC_FUNCTIONS, true ); + if ( ! $is_variadic && ! in_array( $function_name, self::ARRAY_ARG_FUNCTIONS, true ) ) { + return array(); + } + + // Without an identifiable hook name there is nothing to document or look up. + if ( ! HookDocBlock::hasIdentifiableHookName( $node ) ) { + return array(); + } + + // Only compare against documentation that actually resolves. Missing docs and + // unresolvable/broken references (reported by HookDocumentationRule) leave the + // documented count unknown, and are skipped rather than compared against a + // bogus zero count. + $hook_doc = $this->hookDocBlock->getHookDoc( $node, $scope ); + if ( null === $hook_doc || null === $hook_doc['paramCount'] ) { + return array(); + } + + // A filter whose docblock documents no parameters is not documented at all, + // which HookDocumentationRule reports. Comparing counts as well would report + // one defect twice. + if ( HookDocBlock::isFilterMissingParamDocs( $node, $hook_doc ) ) { + return array(); + } + + $documented = $hook_doc['paramCount']; + + $provided = $is_variadic + ? self::countVariadicArguments( $node, $scope ) + : self::countArrayArguments( $node, $scope ); + + // The provided count could not be determined statically; skip rather than + // guess (e.g. arguments spread from a variable of unknown size). + if ( null === $provided || $provided === $documented ) { + return array(); + } + + $hook_name = HookDocBlock::getHookNameDisplay( $node ); + + // An action documented without any `@param` tag reads better as a statement + // about its docblock than as a count of zero. + $message = 0 === $documented + ? sprintf( + '%s() for hook "%s" provides %d argument%s, but its docblock documents no parameters.', + $function_name, + $hook_name, + $provided, + 1 === $provided ? '' : 's' + ) + : sprintf( + '%s() for hook "%s" provides %d argument%s, but the hook is documented with %d parameter%s.', + $function_name, + $hook_name, + $provided, + 1 === $provided ? '' : 's', + $documented, + 1 === $documented ? '' : 's' + ); + + return array( + RuleErrorBuilder::message( $message ) + ->identifier( 'wordpress.hookParamCountMismatch' ) + ->line( $node->getStartLine() ) + ->build(), + ); + } + + /** + * Counts the arguments a variadic hook call passes after the hook name. + * + * @param FuncCall $node Hook function call node. + * @param Scope $scope Analysis scope. + * @return int|null Argument count, or null when it cannot be determined statically. + */ + private static function countVariadicArguments( FuncCall $node, Scope $scope ): ?int { + $args = $node->getArgs(); + $count = 0; + + // Skip index 0, the hook name. + for ( $i = 1, $len = count( $args ); $i < $len; $i++ ) { + $arg = $args[ $i ]; + + if ( $arg->unpack ) { + $size = $scope->getType( $arg->value )->getArraySize(); + if ( ! $size instanceof ConstantIntegerType ) { + return null; + } + $count += $size->getValue(); + continue; + } + + ++$count; + } + + return $count; + } + + /** + * Counts the arguments a hook call passes via its array argument. + * + * @param FuncCall $node Hook function call node. + * @param Scope $scope Analysis scope. + * @return int|null Argument count, or null when it cannot be determined statically. + */ + private static function countArrayArguments( FuncCall $node, Scope $scope ): ?int { + $args = $node->getArgs(); + if ( ! isset( $args[1] ) ) { + return null; + } + + $size = $scope->getType( $args[1]->value )->getArraySize(); + if ( ! $size instanceof ConstantIntegerType ) { + return null; + } + + return $size->getValue(); + } +} diff --git a/tests/phpstan/README.md b/tests/phpstan/README.md index 967c4a9d0195d..edf96fefdc093 100644 --- a/tests/phpstan/README.md +++ b/tests/phpstan/README.md @@ -39,6 +39,8 @@ composer run phpstan -- src/wp-includes/template.php composer run phpstan -- -vvv --debug ``` +Note the `--` in each of those. Composer needs it in order to pass the flags on to PHPStan rather than reading them as its own, and without it they are discarded silently. The npm script supplies it, which is why only one is needed there. + For available flags, see https://phpstan.org/user-guide/command-line-usage. ## The PHPStan configuration @@ -49,6 +51,38 @@ You can create a local copy at `phpstan.neon` to override the default configurat For more information about configuring PHPStan, see the [PHPStan documentation's Config reference](https://phpstan.org/config-reference). +## WordPress-specific extensions + +This directory also contains extensions that teach PHPStan conventions specific to WordPress. They are registered in [`base.neon`](base.neon), so they apply to the default configuration and to any local override of it. + +### Global variables in function docblocks + +Core documents the globals a function uses with `@global Type $varname`. `GlobalDocBlockVisitor` bridges that convention to PHPStan's variable type resolution, so those globals are typed rather than `mixed` inside the function. + +### Hook documentation + +The remaining extensions read the docblock documenting a hook where the hook is fired, which is where WordPress documents its hooks. They cover `apply_filters()`, `do_action()` and their `_deprecated` and `_ref_array` variants. + +- **The value a filter returns is typed from its documentation.** `apply_filters()` returns the type of the first `@param` its docblock documents, rather than `mixed`. This assumes callbacks honor the documented type; one that returns something else is treated as the unusual case. +- **Hooks documented elsewhere are resolved.** Core's `/** This filter is documented in */` convention is followed, in its action form as well, so a hook documented in another file is analyzed against its canonical docblock. A dynamic canonical name such as `"{$type}_template_hierarchy"` is matched against the literal name used at the referencing site. +- **Two rules check the documentation itself**: that a hook is documented at all, and that it is fired with as many arguments as its documentation describes. + +Calls whose hook name contains no literal text, such as the `apply_filters_ref_array( $hook_name, $args )` re-dispatch in `plugin.php`, name no concrete hook and are skipped. + +One consequence worth knowing: because a hook's documentation may live in a different file than the call inheriting it, editing a hook docblock in a file that reference comments point at discards PHPStan's result cache. Every call site inheriting that docblock has to be analyzed again, and PHPStan cannot infer that dependency on its own. + +### Errors these rules report + +These identifiers are specific to WordPress, and can be ignored or baselined like any other error, as described [below](#ignoring-and-baselining-errors). + +| Identifier | What it means | +| --- | --- | +| `wordpress.hookDocMissing` | The hook is fired with neither a docblock documenting it nor a reference comment. Document it, or point at wherever it is documented. | +| `wordpress.hookDocNoParams` | A filter's docblock documents no parameters. A filter always passes at least the value being filtered, so document that value with `@param`, plus one for each further argument. This also fires when an unrelated docblock, such as a `@var` annotation, happens to sit immediately above the call. | +| `wordpress.hookDocReferenceFileMissing` | A reference comment names a file that does not exist in the tree being analyzed. The path is resolved relative to the file holding the comment and to the WordPress root; one that resolves outside the tree counts as missing, since the analysis does not read it. | +| `wordpress.hookDocReferenceHookMissing` | The referenced file exists, but documents no hook of that name. Either the reference is stale, or the canonical docblock has moved. | +| `wordpress.hookParamCountMismatch` | The call passes a different number of arguments than the docblock documents `@param` tags for. Passing fewer risks an `ArgumentCountError` in a callback registered for the documented count; passing more silently drops the extra argument and leaves the documentation misleading. | + ## Ignoring and baselining errors As we adopt PHPStan iteratively, you may be faced with false positives due to legacy code, or code that is not worth changing at this time. @@ -59,20 +93,70 @@ PHPStan errors can be ignored in the following ways: - Adding the error pattern to the `ignoreErrors` section of the `phpstan.neon.dist` configuration file. This should be used to handle conflicts with WordPress Coding Standards or similar project decisions, or to allowlist legacy code that is not worth refactoring solely to satisfy the tests. -- Adding an error to the "tech debt" baseline. This should be used for code that needs to be addressed eventually - by fixing, refactoring, or ignoring via one of the above methods - but is not worth addressing right now. +- Adding an error to a "tech debt" baseline. This should be used for code that needs to be addressed eventually - by fixing, refactoring, or ignoring via one of the above methods - but is not worth addressing right now. Baselines are a useful triage tool for handling PHPStan errors in legacy code, as they allow us to enforce stricter code quality checks on new code, while gradually chipping away at the existing issues over time. **Avoid adding PHPStan errors from new code whenever possible, and use baselines as a last resort.** - The baseline file is located at `tests/phpstan/baseline.php` and generated by running PHPStan with the `--generate-baseline` flag: +### How the baselines are organized + +The baselines live in [`baselines/`](baselines), one file per error identifier, such as `variable.undefined.neon`. Splitting them this way keeps each kind of error visible as a single file that should shrink to nothing and then be deleted, rather than as part of one large file in which every kind is mixed together. + +Every entry is scoped to the file the error occurs in and carries an exact occurrence count: + +```neon +- + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 4 + path: ../../../src/wp-trackback.php +``` + +Both the path and the count matter. A new occurrence of an already baselined error does not match the entry, even in a file that is already listed, and is reported as a new error. That is the point of recording them this way: the baselines describe exactly what exists today, so nothing new slips in behind them. + +The consequence is that **fixing a baselined error means regenerating its baseline as part of the same change**, because the count no longer matches. A count that no longer matches is reported as an `ignore.count` error, which PHPStan does not allow to be ignored or baselined. + +### Regenerating the baselines + +The baselines are generated, and should not be edited by hand. Regenerate them with: + +```bash +npm run typecheck:php:baselines +``` + +which will run the generator in the Docker container. + +As with the analysis itself, flags are passed by adding `--` followed by the flags themselves: + +```bash +# a single identifier: +npm run typecheck:php:baselines -- --identifier=variable.undefined + +# several, either comma separated or by repeating the option: +npm run typecheck:php:baselines -- --identifier=variable.undefined,isset.variable +npm run typecheck:php:baselines -- --identifier=isset.variable --identifier=empty.variable + +# print every error as one baseline, writing nothing: +npm run typecheck:php:baselines -- --combined + +# the remaining options: +npm run typecheck:php:baselines -- --help +``` + +If you are not using the Docker environment, you can run the generator via Composer directly: + +```bash +composer phpstan:baselines + +composer phpstan:baselines -- --identifier=variable.undefined +composer phpstan:baselines -- --combined +composer phpstan:baselines -- --help +``` - ```bash - npm run typecheck:php -- --generate-baseline=tests/phpstan/baseline.php +Note the `--` in each of those. Composer needs it in order to pass the flags on to the script rather than reading them as its own, and without it they are discarded silently, so `composer phpstan:baselines --identifier=variable.undefined` regenerates every baseline rather than that one. The npm script supplies it, which is why only one is needed there. - # or, with Composer directly: - composer run phpstan -- --generate-baseline=tests/phpstan/baseline.php - ``` +A run also deletes any baseline whose identifier no longer reports anything, and rewrites the list of them between the `# phpstan:baselines` markers in the `includes` of [`phpstan.neon.dist`](../../phpstan.neon.dist) to match. Adding a newly split out baseline, and retiring one that has reached zero, therefore need no edit of the configuration. - This will regenerate the baseline file with any new errors added to the existing ones. You can then commit the updated baseline file. +PHPStan's own `--generate-baseline` is deliberately not used directly. It captures every error a run reports, with no way to restrict it to one identifier, so it cannot refresh a single baseline without sweeping every other kind of error into it. ## Performance and troubleshooting diff --git a/tests/phpstan/base.neon b/tests/phpstan/base.neon index 0210e0618d785..1c416cb3fe643 100644 --- a/tests/phpstan/base.neon +++ b/tests/phpstan/base.neon @@ -12,6 +12,48 @@ services: tags: - phpstan.parser.richParserNodeVisitor + # Attaches the docblock documenting a hook to the hook's call, so that the return + # type extension and the rules below can all read it. + - + class: WordPress\PHPStan\HookDocsVisitor + tags: + - phpstan.parser.richParserNodeVisitor + + # Resolves a hook call's documentation, whether written at the call or inherited + # through the "This filter is documented in " convention. + - + class: WordPress\PHPStan\HookDocBlock + + # Types the return value of apply_filters() (and variants) from the `@param` type + # documented for the value being filtered. Adapted from szepeviktor/phpstan-wordpress. + - + class: WordPress\PHPStan\ApplyFiltersDynamicFunctionReturnTypeExtension + tags: + - phpstan.broker.dynamicFunctionReturnTypeExtension + + # Enforces that every hook invocation is preceded by a documenting docblock or + # a valid "This filter is documented in " reference comment. + - + class: WordPress\PHPStan\HookDocumentationRule + tags: + - phpstan.rules.rule + + # Enforces that a hook invocation passes as many arguments as its documentation + # (inline or referenced) describes. + - + class: WordPress\PHPStan\HookParamCountRule + tags: + - phpstan.rules.rule + + # Docblocks inherited from another file, and the sources above that read them, + # are invisible to PHPStan's dependency graph, so both are folded into the result + # cache key. Without this, editing a canonical hook docblock leaves the cached + # results of every call site inheriting it in place. + - + class: WordPress\PHPStan\HookDocsResultCacheMetaExtension + tags: + - phpstan.resultCacheMetaExtension + parameters: # Cache is stored locally, so it's available for CI. tmpDir: ../../.cache @@ -33,6 +75,8 @@ parameters: - ALLOW_SUBDIRECTORY_INSTALL - AUTH_SALT - AUTOMATIC_UPDATER_DISABLED + - BACKGROUND_COLOR + - BACKGROUND_IMAGE - COOKIEPATH - CUSTOM_TAGS - DISALLOW_FILE_EDIT @@ -40,8 +84,13 @@ parameters: - EMPTY_TRASH_DAYS - ENFORCE_GZIP - FORCE_SSL_LOGIN + - HEADER_IMAGE + - HEADER_IMAGE_HEIGHT + - HEADER_IMAGE_WIDTH + - HEADER_TEXTCOLOR - MEDIA_TRASH - MULTISITE + - NO_HEADER_TEXT - NOBLOGREDIRECT - SAVEQUERIES - SCRIPT_DEBUG @@ -99,6 +148,12 @@ parameters: - ../../src/wp-trackback.php - ../../src/xmlrpc.php - GlobalDocBlockVisitor.php + - HookDocsVisitor.php + - HookDocBlock.php + - ApplyFiltersDynamicFunctionReturnTypeExtension.php + - HookDocumentationRule.php + - HookParamCountRule.php + - HookDocsResultCacheMetaExtension.php bootstrapFiles: - bootstrap.php scanFiles: @@ -119,6 +174,8 @@ parameters: - ../../src/wp-admin/load-styles.php # These files are autogenerated by tools/gutenberg/copy.js. - ../../src/wp-includes/blocks + # Generated output from the Gutenberg plugin's wp-build templates. + - ../../src/wp-includes/build # Third-party libraries. - ../../src/wp-admin/includes/class-ftp-pure.php - ../../src/wp-admin/includes/class-ftp-sockets.php diff --git a/tests/phpstan/baseline.php b/tests/phpstan/baseline.php deleted file mode 100644 index 646cbdbef630c..0000000000000 --- a/tests/phpstan/baseline.php +++ /dev/null @@ -1,3 +0,0 @@ -\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-activate.php + - + message: '#^Parameter \#3 \$subject of function str_replace expects array\\|string, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/admin-header.php + - + message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/comment.php + - + message: '#^Parameter \#1 \$post of function get_post_status expects int\|WP_Post\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/comment.php + - + message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/comment.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, bool given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/customize.php + - + message: '#^Parameter \#1 \$position of function wp_comment_reply expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/edit-form-advanced.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-form-advanced.php + - + message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-form-comment.php + - + message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/edit-form-comment.php + - + message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-form-comment.php + - + message: '#^Parameter \#1 \$screen of function do_meta_boxes expects string\|WP_Screen, null given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/edit-link-form.php + - + message: '#^Parameter \#3 \$name of function submit_button expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit-tag-form.php + - + message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit.php + - + message: '#^Parameter \#1 \$post of function get_post_type expects int\|WP_Post\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/edit.php + - + message: '#^Parameter \#1 \$attachment of function wp_get_attachment_id3_keys expects WP_Post, stdClass given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Parameter \#1 \$comment_id of function _wp_ajax_delete_comment_response expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Parameter \#2 \$compare_from of function wp_get_revision_ui_diff expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Parameter \#3 \$compare_to of function wp_get_revision_ui_diff expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Parameter \#2 \$gmt of function current_time expects bool, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/bookmark.php + - + message: '#^Parameter \#2 \$allowed_html of function wp_kses expects array\\|string, array\\|true\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-automatic-upgrader-skin.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-bulk-upgrader-skin.php + - + message: '#^Parameter \#1 \$text of function esc_js expects string, int given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-admin/includes/class-bulk-upgrader-skin.php + - + message: '#^Parameter \#1 \$text of function submit_button expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-custom-background.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, \(float\|int\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-custom-image-header.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, float\|int given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-admin/includes/class-custom-image-header.php + - + message: '#^Parameter \#1 \$text of function submit_button expects string, null given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-custom-image-header.php + - + message: '#^Parameter \#1 \$language_updates of method Language_Pack_Upgrader\:\:bulk_upgrade\(\) expects array\, list\\|string\|false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-language-pack-upgrader.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Parameter \#1 \$str of function md5 expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Parameter \#1 \$post of function post_password_required expects int\|WP_Post\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-comments-list-table.php + - + message: '#^Parameter \#3 \$post of function get_comment_class expects int\|WP_Post\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-comments-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-ms-users-list-table.php + - + message: '#^Parameter \#3 \$number of function _nx expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-plugin-install-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-plugins-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/class-wp-privacy-requests-table.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-screen.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-screen.php + - + message: '#^Parameter \#1 \$version of function get_core_checksums expects string, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health-auto-updates.php + - + message: '#^Parameter \#1 \$bytes of function size_format expects int\|string, float\|false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Parameter \#2 \$allowed_html of function wp_kses expects array\\|string, array\\|true\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Parameter \#2 \$allowed_html of function wp_kses expects array\\|string, array\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Parameter \#1 \$args of function WP_Filesystem expects array\|false, true given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/class-wp-upgrader.php + - + message: '#^Parameter \#1 \$post of function _draft_or_post_title expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/dashboard.php + - + message: '#^Parameter \#1 \$post of function get_the_permalink expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/dashboard.php + - + message: '#^Parameter \#1 \$post of function post_password_required expects int\|WP_Post\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/dashboard.php + - + message: '#^Parameter \#3 \$name of function submit_button expects string, false given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/dashboard.php + - + message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(stdClass\)\: mixed\)\|null, ''get_comment'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/export.php + - + message: '#^Parameter \#1 \$term of function get_term expects int\|object, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/export.php + - + message: '#^Parameter \#2 \$callback of function add_filter expects callable\(\)\: mixed, ''wxr_filter_postmeta'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/export.php + - + message: '#^Parameter \#1 \$str of function md5 expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/file.php + - + message: '#^Parameter \#1 \$image of function is_gd_image expects GdImage\|resource\|false, WP_Image_Editor given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#1 \$width of function wp_imagecreatetruecolor expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#2 \$height of function wp_imagecreatetruecolor expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#5 \$src_x of function imagecopy expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#6 \$src_y of function imagecopy expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#7 \$src_w of function imagecopy expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#8 \$src_h of function imagecopy expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \#1 \$post_id of function wp_delete_attachment expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/import.php + - + message: '#^Parameter \#1 \$number of function number_format_i18n expects float, string given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Parameter \#1 \$post_id of function get_media_items expects int, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Parameter \#2 \$result of function wp_parse_str expects array, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/menu.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/meta-boxes.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 8 + path: ../../../src/wp-admin/includes/misc.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/misc.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<1, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/misc.php + - + message: '#^Parameter \#1 \$link_id of function wp_delete_link expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ms.php + - + message: '#^Parameter \#1 \$post_id of function wp_delete_post expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ms.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ms.php + - + message: '#^Parameter \#3 \$value of function update_blog_status expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/ms.php + - + message: '#^Parameter \#1 \$post_id of function wp_delete_post expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/nav-menu.php + - + message: '#^Parameter \#2 \$arr2 of function array_intersect expects an array of values castable to string, array\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/nav-menu.php + - + message: '#^Parameter \#7 \$callback_args of function add_meta_box expects array\|null, WP_Post_Type given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/nav-menu.php + - + message: '#^Parameter \#1 \$tags of function wp_generate_tag_cloud expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Parameter \#3 \$name of function submit_button expects string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Parameter \#3 \$number of function _nx expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Parameter \#2 \$allowed_html of function wp_kses expects array\\|string, array\\|true\> given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Parameter \#2 \$fallback_title of function sanitize_title expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Parameter \#1 \$user_id of function switch_to_user_locale expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/privacy-tools.php + - + message: '#^Parameter \#2 \$user_id of function get_the_author_meta expects int\|false, ''''\|numeric\-string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/revision.php + - + message: '#^Parameter \#1 \$str of function md5 expects string, int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/schema.php + - + message: '#^Parameter \#2 \$multiplier of function str_repeat expects int, float given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-admin/includes/template.php + - + message: '#^Parameter \#2 \$title of function add_meta_box expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/template.php + - + message: '#^Parameter \#3 \$callback of function add_meta_box expects callable\(\)\: mixed, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/template.php + - + message: '#^Parameter \#1 \$update of method Language_Pack_Upgrader\:\:upgrade\(\) expects string\|false, stdClass given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/translation-install.php + - + message: '#^Parameter \#3 \$overwrite of method WP_Filesystem_Base\:\:copy\(\) expects bool, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/update-core.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/update.php + - + message: '#^Parameter \#1 \$timestamp of function wp_schedule_event expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/upgrade.php + - + message: '#^Parameter \#3 \$deprecated of function add_option expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/upgrade.php + - + message: '#^Parameter \#1 \$bookmark_id of function clean_bookmark_cache expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/user.php + - + message: '#^Parameter \#1 \$link_id of function wp_delete_link expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/user.php + - + message: '#^Parameter \#1 \$post of function clean_post_cache expects int\|WP_Post, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/user.php + - + message: '#^Parameter \#1 \$post_id of function wp_delete_post expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/user.php + - + message: '#^Parameter \#1 \$user of function wp_get_user_contact_methods expects WP_User\|null, stdClass given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/user.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/includes/user.php + - + message: '#^Parameter \#4 \$is_public of function wp_install expects bool, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/install.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 5 + path: ../../../src/wp-admin/nav-menus.php + - + message: '#^Parameter \#2 \$menu_data of function wp_save_nav_menu_items expects array\, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/nav-menus.php + - + message: '#^Parameter \#1 \$network_id of function can_edit_network expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/network/site-info.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/network/site-info.php + - + message: '#^Parameter \#1 \$network_id of function can_edit_network expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/network/site-settings.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/network/site-settings.php + - + message: '#^Parameter \#1 \$network_id of function can_edit_network expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/network/site-themes.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/network/site-themes.php + - + message: '#^Parameter \#1 \$network_id of function can_edit_network expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/network/site-users.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-admin/network/site-users.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-admin/network/sites.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<2, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/options-discussion.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, bool given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/options-general.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, 6\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/options-general.php + - + message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(mixed\)\: bool\)\|null, ''validate_file'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Parameter \#2 \$newvalue of function ini_set expects string, true given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Parameter \#2 \$newvalue of function ini_set expects string, true given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/update.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 10 + path: ../../../src/wp-admin/users.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/author.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/content-image.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-content/themes/twentyeleven/content-single.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/functions.php + - + message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/functions.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/image.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/image.php + - + message: '#^Parameter \#1 \$screen of function add_contextual_help expects string, WP_Screen\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/theme-options.php + - + message: '#^Parameter \#3 \$args of function register_setting expects array, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/theme-options.php + - + message: '#^Parameter \#3 \$deps of function wp_enqueue_style expects array\, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/theme-options.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/widgets.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/showcase.php + - + message: '#^Parameter \#2 \$instance of function the_widget expects array, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/showcase.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/author-bio.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/image.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/image.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/inc/template-tags.php + - + message: '#^Parameter \#3 \$number of function _n expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/functions.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/image.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/image.php + - + message: '#^Parameter \#1 \$text of function esc_html expects string, int\<1, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-content/themes/twentyfourteen/image.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/template-tags.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/widgets.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/widgets.php + - + message: '#^Parameter \#3 \$deps of function wp_enqueue_style expects array\, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/functions.php + - + message: '#^Parameter \#1 \$num of function dechex expects int, float given\.$#' + identifier: argument.type + count: 6 + path: ../../../src/wp-content/themes/twentynineteen/inc/helper-functions.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/inc/helper-functions.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/inc/template-tags.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/template-parts/post/author-bio.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/inc/color-patterns.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/inc/template-tags.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, \(float\|int\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, \(float\|int\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/image.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/image.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/inc/template-tags.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/template-parts/biography.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/author.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/functions.php + - + message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/functions.php + - + message: '#^Parameter \#1 \$wp_head_callback of function add_custom_image_header expects callable\(\)\: mixed, '''' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/functions.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-attachment.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-attachment.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-attachment.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-single.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/author-bio.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/author.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/functions.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/image.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/image.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/author.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/content.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/functions.php + - + message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/functions.php + - + message: '#^Parameter \#1 \$size of function next_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/image.php + - + message: '#^Parameter \#1 \$size of function previous_image_link expects array\\|string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/image.php + - + message: '#^Parameter \#4 \$prefix of function twentytwenty_generate_css expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php + - + message: '#^Parameter \#5 \$suffix of function twentytwenty_generate_css expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-content/themes/twentytwenty/functions.php + - + message: '#^Parameter \#3 \$deps of function wp_enqueue_style expects array\, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/functions.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/inc/template-tags.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\|false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/inc/template-functions.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/inc/template-tags.php + - + message: '#^Parameter \#1 \$author_id of function get_author_posts_url expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php + - + message: '#^Parameter \#2 \$size of function get_avatar expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php + - + message: '#^Parameter \#1 \$userid of function count_user_posts expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/author-template.php + - + message: '#^Parameter \#1 \$separator of function explode expects string, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/block-supports/layout.php + - + message: '#^Parameter \#1 \$block of function filter_block_kses expects WP_Block_Parser_Block, array given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/blocks.php + - + message: '#^Parameter \#4 \$block_context of function filter_block_kses_value expects array\|null, WP_Block_Parser_Block given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/blocks.php + - + message: '#^Parameter \#1 \$post of function get_permalink expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/canonical.php + - + message: '#^Parameter \#1 \$post_id of function get_post_comments_feed_link expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/canonical.php + - + message: '#^Parameter \#2 \$callback of function preg_replace_callback expects callable\(array\\)\: string, ''lowercase_octets'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/canonical.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/capabilities.php + - + message: '#^Parameter \#1 \$name of class WP_Block_Parser_Block constructor expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-block-parser.php + - + message: '#^Parameter \#1 \$child_id of method WP_Comment\:\:get_child\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-comment-query.php + - + message: '#^Parameter \#1 \$ids of function _prime_post_caches expects array\, list\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-comment-query.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-customize-control.php + - + message: '#^Parameter \#1 \$ajax_message of method WP_Customize_Manager\:\:wp_die\(\) expects string\|WP_Error, int given\.$#' + identifier: argument.type + count: 6 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Parameter \#1 \$month of function wp_checkdate expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Parameter \#2 \$day of function wp_checkdate expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Parameter \#3 \$year of function wp_checkdate expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Parameter \#1 \$text of function esc_html expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-date-query.php + - + message: '#^Parameter \#2 \$parent_query of method WP_Date_Query\:\:get_sql_for_clause\(\) expects array, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-date-query.php + - + message: '#^Parameter \#2 \$timestamp of function gmdate expects int, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-date-query.php + - + message: '#^Parameter \#2 \$value of method WP_Date_Query\:\:build_value\(\) expects array\|string, int given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-includes/class-wp-date-query.php + - + message: '#^Parameter \#2 \$value of method WP_Date_Query\:\:build_value\(\) expects array\|string, int\|null given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-includes/class-wp-date-query.php + - + message: '#^Parameter \#1 \$value of static method WP_Duotone\:\:colord_parse_hue\(\) expects float, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-duotone.php + - + message: '#^Parameter \#3 \$priority of function _wp_filter_build_unique_id expects int, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-hook.php + - + message: '#^Parameter \#3 \$value of function curl_setopt expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-http-curl.php + - + message: '#^Parameter \#2 \$mode of function stream_set_blocking expects bool, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-http-streams.php + - + message: '#^Parameter \#2 \$callback of method WP_Image_Editor_GD\:\:make_image\(\) expects callable\(\)\: mixed, ''imageavif'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-gd.php + - + message: '#^Parameter \#2 \$interlace of function imageinterlace expects int, bool given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-gd.php + - + message: '#^Parameter \#2 \$limit of static method Imagick\:\:setResourceLimit\(\) expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Parameter \#2 \$value of method Imagick\:\:setOption\(\) expects string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Parameter \#2 \$value of method Imagick\:\:setOption\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Parameter \#2 \$value of method Imagick\:\:setOption\(\) expects string, true given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Parameter \#1 \$ids of function _prime_post_caches expects array\, list\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Parameter \#1 \$pages of function get_page_hierarchy expects array\, list\\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-rewrite.php + - + message: '#^Parameter \#1 \$new_blog_id of function switch_to_blog expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-site.php + - + message: '#^Parameter \#1 \$metadata of method WP_Theme_JSON\:\:get_feature_declarations_for_node\(\) expects object, array given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Parameter \#1 \$node of method WP_Theme_JSON\:\:process_pseudo_selectors\(\) expects array, object given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Parameter \#1 \$styles of static method WP_Theme_JSON\:\:compute_style_properties\(\) expects array, object given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Parameter \#2 \$data of method WP_Theme\:\:cache_add\(\) expects array\|string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-theme.php + - + message: '#^Parameter \#1 \$str of function strtoupper expects string, bool given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-token-map.php + - + message: '#^Parameter \#1 \$level of method WP_User\:\:translate_level_to_cap\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-user.php + - + message: '#^Parameter \#1 \$number of method WP_Widget\:\:_set\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-widget.php + - + message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-xmlrpc-server.php + - + message: '#^Parameter \#1 \$term_id of method wp_xmlrpc_server\:\:get_term_custom_fields\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-xmlrpc-server.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/class-wp-xmlrpc-server.php + - + message: '#^Parameter \#1 \$comment_id of function get_page_of_comment expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment-template.php + - + message: '#^Parameter \#1 \$post of function get_permalink expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment-template.php + - + message: '#^Parameter \#1 \$post of function post_password_required expects int\|WP_Post\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment-template.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/comment-template.php + - + message: '#^Parameter \#1 \$comment of function get_comment_link expects int\|WP_Comment\|null, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$comment_id of function add_comment_meta expects int, string given\.$#' + identifier: argument.type + count: 5 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$comment_id of function delete_comment_meta expects int, string given\.$#' + identifier: argument.type + count: 8 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$comment_id of function get_comment_text expects int\|WP_Comment, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$comment_id of function get_page_of_comment expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$comments of function update_comment_cache expects array\, list\\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$content of function pingback expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$ids of function clean_comment_cache expects array\|int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$post_id of function wp_update_comment_count expects int\|null, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#2 \$object_ids of function update_meta_cache expects array\\|string, list\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Parameter \#1 \$gmt_time of function spawn_cron expects int, float given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/cron.php + - + message: '#^Parameter \#1 \$container_context of method WP_Customize_Partial\:\:render\(\) expects array, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-selective-refresh.php + - + message: '#^Parameter \#1 \$response of method WP_REST_Server\:\:response_to_data\(\) expects WP_REST_Response, WP_HTTP_Response given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/embed.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/embed.php + - + message: '#^Parameter \#1 \$post_id of function get_post_comments_feed_link expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/feed-atom-comments.php + - + message: '#^Parameter \#1 \$post_id of function get_post_comments_feed_link expects int, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/feed-rss2.php + - + message: '#^Parameter \#1 \$post of function get_the_guid expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/feed.php + - + message: '#^Parameter \#2 \$message of class WP_Error constructor expects string, list\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/feed.php + - + message: '#^Parameter \#2 \$callback of function preg_replace_callback expects callable\(array\\)\: string, ''_links_add_base'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Parameter \#2 \$callback of function preg_replace_callback expects callable\(array\\)\: string, ''_links_add_target'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Parameter \#1 \$prefix of function uniqid expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#1 \$weekday_number of method WP_Locale\:\:get_weekday\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#2 \$fallback_url of function wp_validate_redirect expects string, false given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#3 \$number of function _n expects int, string given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#4 \$mon of function mktime expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#5 \$day of function mktime expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#6 \$year of function mktime expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Parameter \#1 \$string of function strlen expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#1 \$string of function substr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#1 \$string of function substr expects string, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, float given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#2 \$replace of function str_replace expects array\\|string, int\<1, max\> given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#2 \$replace of function str_replace expects array\\|string, int\\|int\<2, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#3 \$url of function wp_admin_css_color expects string, false given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Parameter \#1 \$name of method WP_HTML_Tag_Processor\:\:set_bookmark\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php + - + message: '#^Parameter \#4 \$length of function substr_compare expects int, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Parameter \#2 \$replace of function str_replace expects array\\|string, array\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Parameter \#1 \$str of function md5 expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/load.php + - + message: '#^Parameter \#2 \$newvalue of function ini_set expects string, int given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-includes/load.php + - + message: '#^Parameter \#3 \$subject of function str_replace expects array\\|string, array\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/load.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int\<1, 9\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/media-template.php + - + message: '#^Parameter \#1 \$text of function esc_html expects string, int\<1, 9\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/media-template.php + - + message: '#^Parameter \#5 \$text of function wp_get_attachment_link expects string\|false, bool given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/media.php + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(non\-empty\-string\|null, int\<0, max\>\)\: mixed, ''clean_bookmark_cache'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-functions.php + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(non\-empty\-string\|null, int\<0, max\>\)\: mixed, ''clean_post_cache'' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-functions.php + - + message: '#^Parameter \#3 \$value of function update_blog_status expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-functions.php + - + message: '#^Parameter \#1 \$network_id of static method WP_Network\:\:get_instance\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-load.php + - + message: '#^Parameter \#1 \$month of function wp_checkdate expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-site.php + - + message: '#^Parameter \#2 \$day of function wp_checkdate expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-site.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-site.php + - + message: '#^Parameter \#2 \$object_id of function delete_metadata expects int, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-site.php + - + message: '#^Parameter \#3 \$year of function wp_checkdate expects int, \(string\|false\) given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/ms-site.php + - + message: '#^Parameter \#1 \$post_id of function wp_delete_post expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/nav-menu.php + - + message: '#^Parameter \#2 \$value of function setcookie expects string, int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/option.php + - + message: '#^Parameter \#1 \$engine of class Text_Diff constructor expects string, list\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#1 \$number of function number_format_i18n expects float, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#1 \$post of function get_edit_post_link expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#1 \$post of function get_permalink expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 4 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#1 \$user of function user_can expects int\|WP_User, string given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#1 \$user_id of function get_userdata expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#3 \$number of function _n expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Parameter \#1 \$attachment of function is_attachment expects array\\|int\|string, WP_Post given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Parameter \#1 \$url of function user_trailingslashit expects string, int\\|int\<2, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Parameter \#2 \$fallback of function sanitize_html_class expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Parameter \#2 \$replace of function str_replace expects array\\|string, int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Parameter \#2 \$user_id of function get_the_author_meta expects int\|false, ''''\|numeric\-string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Parameter \#1 \$comment_id of function wp_delete_comment expects int\|WP_Comment, string\|null given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$month of function wp_checkdate expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$post of function clean_post_cache expects int\|WP_Post, stdClass given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$post of function get_post expects int\|numeric\-string\|WP_Post\|null, stdClass given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$post_id of function wp_delete_post expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$posts of function update_post_cache expects array\, list\ given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$revision of function wp_delete_post_revision expects int\|WP_Post, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$string of function strlen expects string, int\<2, max\> given\.$#' + identifier: argument.type + count: 3 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#2 \$day of function wp_checkdate expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#2 \$object_id of function delete_metadata expects int, null given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#3 \$year of function wp_checkdate expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Parameter \#1 \$response of method WP_REST_Server\:\:response_to_data\(\) expects WP_REST_Response, WP_HTTP_Response given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api.php + - + message: '#^Parameter \#1 \$haystack of function str_starts_with expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/class-wp-rest-server.php + - + message: '#^Parameter \#1 \$response of method WP_REST_Server\:\:envelope_response\(\) expects WP_REST_Response, WP_HTTP_Response given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/class-wp-rest-server.php + - + message: '#^Parameter \#1 \$response of method WP_REST_Server\:\:response_to_data\(\) expects WP_REST_Response, WP_HTTP_Response given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/class-wp-rest-server.php + - + message: '#^Parameter \#1 \$data_object of method WP_REST_Controller\:\:update_additional_fields_for_object\(\) expects object, array given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php + - + message: '#^Parameter \#1 \$comment_id of function get_comment_type expects int\|WP_Comment, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^Parameter \#1 \$comment_id of function wp_delete_comment expects int\|WP_Comment, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^Parameter \#1 \$comment_id of function wp_trash_comment expects int\|WP_Comment, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^Parameter \#1 \$object_id of method WP_REST_Meta_Fields\:\:get_value\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^Parameter \#2 \$comment_id of method WP_REST_Comments_Controller\:\:handle_status_param\(\) expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^Parameter \#2 \$object_id of method WP_REST_Meta_Fields\:\:update_value\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php + - + message: '#^Parameter \#1 \$data_object of method WP_REST_Controller\:\:update_additional_fields_for_object\(\) expects object, array given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php + - + message: '#^Parameter \#1 \$args of function get_taxonomies expects array, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php + - + message: '#^Parameter \#1 \$id of function get_block_template expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php + - + message: '#^Parameter \#1 \$id of method WP_REST_Templates_Controller\:\:prepare_links\(\) expects int, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php + - + message: '#^Parameter \#2 \$value of method WP_HTTP_Response\:\:header\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php + - + message: '#^Parameter \#2 \$src of method WP_Dependencies\:\:add\(\) expects string\|false, true given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/script-loader.php + - + message: '#^Parameter \#1 \$object_id of function wp_remove_object_terms expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#1 \$object_id of function wp_set_object_terms expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#1 \$object_ids of function wp_get_object_terms expects array\\|int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#1 \$post_id of function update_post_meta expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#1 \$terms of function update_term_cache expects array\, list\\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#1 \$terms of function wp_update_term_count expects array\|int, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#2 \$fallback_title of function sanitize_title expects string, int given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#2 \$meta_id of function delete_metadata_by_mid expects int, string\|null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#2 \$taxonomy of function wp_update_term_count expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Parameter \#2 \$newvalue of function ini_set expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/template.php + - + message: '#^Parameter \#3 \$replacement of function _deprecated_file expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/theme-compat/comments.php + - + message: '#^Parameter \#3 \$replacement of function _deprecated_file expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/theme-compat/footer.php + - + message: '#^Parameter \#3 \$replacement of function _deprecated_file expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/theme-compat/header.php + - + message: '#^Parameter \#3 \$replacement of function _deprecated_file expects string, null given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/theme-compat/sidebar.php + - + message: '#^Parameter \#1 \$string of function strlen expects string, int\<2, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/theme-templates.php + - + message: '#^Parameter \#1 \$string of function mb_strlen expects string, int\<2, max\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/user.php + - + message: '#^Parameter \#1 \$user_id of function switch_to_user_locale expects int, string given\.$#' + identifier: argument.type + count: 2 + path: ../../../src/wp-includes/user.php + - + message: '#^Parameter \#3 \$control_callback of function wp_register_widget_control expects callable\(\)\: mixed, '''' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/widgets.php + - + message: '#^Parameter \#3 \$output_callback of function wp_register_sidebar_widget expects callable\(\)\: mixed, '''' given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/widgets.php + - + message: '#^Parameter \#1 \$text of function esc_attr expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-nav-menu-widget.php + - + message: '#^Parameter \#1 \$post of function get_the_title expects int\|WP_Post, string given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-recent-comments.php + - + message: '#^Parameter \#1 \$text of function esc_html expects string, int given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/wp-mail.php diff --git a/tests/phpstan/baselines/argument.unresolvableType.neon b/tests/phpstan/baselines/argument.unresolvableType.neon new file mode 100644 index 0000000000000..b6015731f858b --- /dev/null +++ b/tests/phpstan/baselines/argument.unresolvableType.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `argument.unresolvableType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/argument.unresolvableType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=argument.unresolvableType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Parameter \#1 \$array_arg of function uksort contains unresolvable type\.$#' + identifier: argument.unresolvableType + count: 2 + path: ../../../src/wp-includes/cron.php diff --git a/tests/phpstan/baselines/arguments.count.neon b/tests/phpstan/baselines/arguments.count.neon new file mode 100644 index 0000000000000..e3cab51b3621e --- /dev/null +++ b/tests/phpstan/baselines/arguments.count.neon @@ -0,0 +1,50 @@ +# PHPStan baseline for the `arguments.count` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/arguments.count +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=arguments.count +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Method WP_List_Table\:\:display_rows\(\) invoked with 2 parameters, 0 required\.$#' + identifier: arguments.count + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Method WP_List_Table\:\:single_row\(\) invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count + count: 2 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Method WP_List_Table\:\:single_row\(\) invoked with 3 parameters, 1 required\.$#' + identifier: arguments.count + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Method WP_Upgrader_Skin\:\:before\(\) invoked with 1 parameter, 0 required\.$#' + identifier: arguments.count + count: 2 + path: ../../../src/wp-admin/includes/class-plugin-upgrader.php + - + message: '#^Method WP_Upgrader_Skin\:\:before\(\) invoked with 1 parameter, 0 required\.$#' + identifier: arguments.count + count: 2 + path: ../../../src/wp-admin/includes/class-theme-upgrader.php + - + message: '#^Method WP_List_Table\:\:display\(\) invoked with 1 parameter, 0 required\.$#' + identifier: arguments.count + count: 1 + path: ../../../src/wp-admin/includes/meta-boxes.php diff --git a/tests/phpstan/baselines/arrayValues.list.neon b/tests/phpstan/baselines/arrayValues.list.neon new file mode 100644 index 0000000000000..630c8e6bd1879 --- /dev/null +++ b/tests/phpstan/baselines/arrayValues.list.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `arrayValues.list` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/arrayValues.list +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=arrayValues.list +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Parameter \#1 \$array \(non\-empty\-list\\) of array_values is already a list, call has no effect\.$#' + identifier: arrayValues.list + count: 1 + path: ../../../src/wp-admin/includes/image.php diff --git a/tests/phpstan/baselines/assign.propertyType.neon b/tests/phpstan/baselines/assign.propertyType.neon new file mode 100644 index 0000000000000..f53f802b7d1da --- /dev/null +++ b/tests/phpstan/baselines/assign.propertyType.neon @@ -0,0 +1,160 @@ +# PHPStan baseline for the `assign.propertyType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/assign.propertyType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=assign.propertyType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_Comment\:\:\$comment_ID \(numeric\-string\) does not accept int\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-admin/includes/comment.php + - + message: '#^Property WP_Comment\:\:\$comment_post_ID \(numeric\-string\) does not accept int\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-admin/includes/comment.php + - + message: '#^Property WP_Block_Template\:\:\$author \(int\|null\) does not accept string\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/block-template-utils.php + - + message: '#^Property WP_Customize_Control\:\:\$settings \(array\) does not accept string\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-customize-control.php + - + message: '#^Property WP_Customize_Setting\:\:\$default \(string\) does not accept stdClass\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-customize-setting.php + - + message: '#^Property WP_Image_Editor_Imagick\:\:\$image \(Imagick\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Property WP_Query\:\:\$posts \(array\\|null\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Property WP_Query\:\:\$posts \(array\\|null\) does not accept list\\|null\.$#' + identifier: assign.propertyType + count: 2 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Property WP_Query\:\:\$posts \(array\\|null\) does not accept list\\.$#' + identifier: assign.propertyType + count: 2 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Property WP_Rewrite\:\:\$rules \(array\\) does not accept string\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-rewrite.php + - + message: '#^Property WP_Term_Query\:\:\$terms \(array\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-term-query.php + - + message: '#^Static property WP_Theme_JSON_Resolver\:\:\$blocks \(WP_Theme_JSON\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Static property WP_Theme_JSON_Resolver\:\:\$core \(WP_Theme_JSON\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Static property WP_Theme_JSON_Resolver\:\:\$i18n_schema \(array\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Static property WP_Theme_JSON_Resolver\:\:\$theme \(WP_Theme_JSON\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Static property WP_Theme_JSON_Resolver\:\:\$user \(WP_Theme_JSON\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Static property WP_Theme_JSON_Resolver\:\:\$user_custom_post_type_id \(int\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Property WP_User\:\:\$roles \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wp-user.php + - + message: '#^Property wpdb\:\:\$col_info \(array\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wpdb.php + - + message: '#^Property wpdb\:\:\$last_query \(string\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/class-wpdb.php + - + message: '#^Property WP_Customize_Header_Image_Control\:\:\$default_headers \(string\) does not accept array\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-header-image-control.php + - + message: '#^Property WP_Customize_Header_Image_Control\:\:\$uploaded_headers \(string\) does not accept array\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-header-image-control.php + - + message: '#^Property WP_HTML_Tag_Processor\:\:\$is_closing_tag \(bool\) does not accept null\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Property WP_Translation_File\:\:\$entries \(array\\) does not accept array\\>\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/l10n/class-wp-translation-file.php + - + message: '#^Property WP_REST_Autosaves_Controller\:\:\$revisions_controller \(WP_REST_Revisions_Controller\) does not accept WP_REST_Controller\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php + - + message: '#^Property WP_REST_Template_Autosaves_Controller\:\:\$revisions_controller \(WP_REST_Revisions_Controller\) does not accept WP_REST_Controller\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php + - + message: '#^Property WP_Taxonomy\:\:\$labels \(stdClass\) does not accept array\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Static property WP_Widget_Media\:\:\$l10n_defaults \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-media.php diff --git a/tests/phpstan/baselines/binaryOp.invalid.neon b/tests/phpstan/baselines/binaryOp.invalid.neon new file mode 100644 index 0000000000000..167f159cffb34 --- /dev/null +++ b/tests/phpstan/baselines/binaryOp.invalid.neon @@ -0,0 +1,35 @@ +# PHPStan baseline for the `binaryOp.invalid` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/binaryOp.invalid +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=binaryOp.invalid +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Binary operation "/" between string and 2 results in an error\.$#' + identifier: binaryOp.invalid + count: 2 + path: ../../../src/wp-content/themes/twentytwenty/functions.php + - + message: '#^Binary operation "\+" between array\\|WP_Comment\>\|int\<1, max\> and 1 results in an error\.$#' + identifier: binaryOp.invalid + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Binary operation "\+" between string and int results in an error\.$#' + identifier: binaryOp.invalid + count: 1 + path: ../../../src/wp-includes/user.php diff --git a/tests/phpstan/baselines/booleanAnd.alwaysFalse.neon b/tests/phpstan/baselines/booleanAnd.alwaysFalse.neon new file mode 100644 index 0000000000000..4bbff3cdb566b --- /dev/null +++ b/tests/phpstan/baselines/booleanAnd.alwaysFalse.neon @@ -0,0 +1,30 @@ +# PHPStan baseline for the `booleanAnd.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanAnd.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanAnd.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 1 + path: ../../../src/wp-admin/themes.php + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php diff --git a/tests/phpstan/baselines/booleanAnd.alwaysTrue.neon b/tests/phpstan/baselines/booleanAnd.alwaysTrue.neon new file mode 100644 index 0000000000000..52bae4992b186 --- /dev/null +++ b/tests/phpstan/baselines/booleanAnd.alwaysTrue.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `booleanAnd.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanAnd.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanAnd.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Result of && is always true\.$#' + identifier: booleanAnd.alwaysTrue + count: 2 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php diff --git a/tests/phpstan/baselines/booleanAnd.leftAlwaysTrue.neon b/tests/phpstan/baselines/booleanAnd.leftAlwaysTrue.neon new file mode 100644 index 0000000000000..c64a48177e085 --- /dev/null +++ b/tests/phpstan/baselines/booleanAnd.leftAlwaysTrue.neon @@ -0,0 +1,45 @@ +# PHPStan baseline for the `booleanAnd.leftAlwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanAnd.leftAlwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanAnd.leftAlwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../src/wp-admin/network/users.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../src/wp-admin/themes.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../src/wp-includes/block-template-utils.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../src/wp-includes/canonical.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php diff --git a/tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon b/tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon new file mode 100644 index 0000000000000..367c8dd35051c --- /dev/null +++ b/tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `booleanAnd.rightAlwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanAnd.rightAlwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanAnd.rightAlwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Right side of && is always false\.$#' + identifier: booleanAnd.rightAlwaysFalse + count: 1 + path: ../../../src/wp-includes/class-wpdb.php diff --git a/tests/phpstan/baselines/booleanAnd.rightAlwaysTrue.neon b/tests/phpstan/baselines/booleanAnd.rightAlwaysTrue.neon new file mode 100644 index 0000000000000..64071efcf3d23 --- /dev/null +++ b/tests/phpstan/baselines/booleanAnd.rightAlwaysTrue.neon @@ -0,0 +1,65 @@ +# PHPStan baseline for the `booleanAnd.rightAlwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanAnd.rightAlwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanAnd.rightAlwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/schema.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/header.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../src/wp-includes/block-supports/typography.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-walker.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 2 + path: ../../../src/wp-includes/functions.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 3 + path: ../../../src/wp-includes/l10n.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 4 + path: ../../../src/wp-includes/load.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 2 + path: ../../../src/wp-includes/user.php diff --git a/tests/phpstan/baselines/booleanNot.alwaysFalse.neon b/tests/phpstan/baselines/booleanNot.alwaysFalse.neon new file mode 100644 index 0000000000000..57e8a715cfc8d --- /dev/null +++ b/tests/phpstan/baselines/booleanNot.alwaysFalse.neon @@ -0,0 +1,50 @@ +# PHPStan baseline for the `booleanNot.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanNot.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanNot.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../src/wp-admin/includes/theme.php + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../src/wp-admin/link-manager.php + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 2 + path: ../../../src/wp-admin/network/users.php + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../src/wp-includes/class-wp-comment-query.php + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../src/wp-includes/nav-menu.php diff --git a/tests/phpstan/baselines/booleanNot.alwaysTrue.neon b/tests/phpstan/baselines/booleanNot.alwaysTrue.neon new file mode 100644 index 0000000000000..ae0b0afe52c56 --- /dev/null +++ b/tests/phpstan/baselines/booleanNot.alwaysTrue.neon @@ -0,0 +1,60 @@ +# PHPStan baseline for the `booleanNot.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanNot.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanNot.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-custom-image-header.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-language-pack-upgrader.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-wp-upgrader.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/file.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-block-templates-registry.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-block.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Negated boolean expression is always true\.$#' + identifier: booleanNot.alwaysTrue + count: 1 + path: ../../../src/wp-includes/option.php diff --git a/tests/phpstan/baselines/booleanOr.alwaysFalse.neon b/tests/phpstan/baselines/booleanOr.alwaysFalse.neon new file mode 100644 index 0000000000000..86e1740697619 --- /dev/null +++ b/tests/phpstan/baselines/booleanOr.alwaysFalse.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `booleanOr.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanOr.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanOr.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Result of \|\| is always false\.$#' + identifier: booleanOr.alwaysFalse + count: 1 + path: ../../../src/wp-includes/class-wp-http-cookie.php diff --git a/tests/phpstan/baselines/booleanOr.alwaysTrue.neon b/tests/phpstan/baselines/booleanOr.alwaysTrue.neon new file mode 100644 index 0000000000000..6ee9845afe5be --- /dev/null +++ b/tests/phpstan/baselines/booleanOr.alwaysTrue.neon @@ -0,0 +1,30 @@ +# PHPStan baseline for the `booleanOr.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanOr.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanOr.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Result of \|\| is always true\.$#' + identifier: booleanOr.alwaysTrue + count: 1 + path: ../../../src/wp-includes/block-supports/position.php + - + message: '#^Result of \|\| is always true\.$#' + identifier: booleanOr.alwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-block.php diff --git a/tests/phpstan/baselines/booleanOr.rightAlwaysTrue.neon b/tests/phpstan/baselines/booleanOr.rightAlwaysTrue.neon new file mode 100644 index 0000000000000..3234f5ad209b0 --- /dev/null +++ b/tests/phpstan/baselines/booleanOr.rightAlwaysTrue.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `booleanOr.rightAlwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/booleanOr.rightAlwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=booleanOr.rightAlwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Right side of \|\| is always true\.$#' + identifier: booleanOr.rightAlwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php diff --git a/tests/phpstan/baselines/catch.neverThrown.neon b/tests/phpstan/baselines/catch.neverThrown.neon new file mode 100644 index 0000000000000..30c8a4a7cfe4b --- /dev/null +++ b/tests/phpstan/baselines/catch.neverThrown.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `catch.neverThrown` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/catch.neverThrown +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=catch.neverThrown +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Dead catch \- Exception is never thrown in the try block\.$#' + identifier: catch.neverThrown + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php diff --git a/tests/phpstan/baselines/class.nameCase.neon b/tests/phpstan/baselines/class.nameCase.neon new file mode 100644 index 0000000000000..dd88c5b677aa8 --- /dev/null +++ b/tests/phpstan/baselines/class.nameCase.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `class.nameCase` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/class.nameCase +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=class.nameCase +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Class MO referenced with incorrect case\: Mo\.$#' + identifier: class.nameCase + count: 1 + path: ../../../src/wp-includes/class-wp-locale-switcher.php diff --git a/tests/phpstan/baselines/class.notFound.neon b/tests/phpstan/baselines/class.notFound.neon new file mode 100644 index 0000000000000..560ceafb56573 --- /dev/null +++ b/tests/phpstan/baselines/class.notFound.neon @@ -0,0 +1,90 @@ +# PHPStan baseline for the `class.notFound` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/class.notFound +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=class.notFound +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_Filesystem_FTPext\:\:\$link has unknown class FTP\\Connection as its type\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-wp-filesystem-ftpext.php + - + message: '#^Function _crop_image_resource\(\) has invalid return type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Function _flip_image_resource\(\) has invalid return type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Function _rotate_image_resource\(\) has invalid return type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \$img of function _crop_image_resource\(\) has invalid type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \$img of function _flip_image_resource\(\) has invalid type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Parameter \$img of function _rotate_image_resource\(\) has invalid type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image-edit.php + - + message: '#^Function load_image_to_edit\(\) has invalid return type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/includes/image.php + - + message: '#^Call to method html\(\) on an unknown class WP_Press_This_Plugin\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-admin/press-this.php + - + message: '#^Method WP_Image_Editor_GD\:\:_resize\(\) has invalid return type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-gd.php + - + message: '#^Parameter \$image of method WP_Image_Editor_GD\:\:_save\(\) has invalid type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-gd.php + - + message: '#^Property WP_Image_Editor_GD\:\:\$image has unknown class GdImage as its type\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-gd.php + - + message: '#^Function wp_imagecreatetruecolor\(\) has invalid return type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-includes/media.php + - + message: '#^Parameter \$image of function is_gd_image\(\) has invalid type GdImage\.$#' + identifier: class.notFound + count: 1 + path: ../../../src/wp-includes/media.php diff --git a/tests/phpstan/baselines/deadCode.unreachable.neon b/tests/phpstan/baselines/deadCode.unreachable.neon new file mode 100644 index 0000000000000..f8a2c6671a783 --- /dev/null +++ b/tests/phpstan/baselines/deadCode.unreachable.neon @@ -0,0 +1,305 @@ +# PHPStan baseline for the `deadCode.unreachable` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/deadCode.unreachable +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=deadCode.unreachable +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-admin/about.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-admin/credits.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 3 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-admin/includes/class-wp-internal-pointers.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 2 + path: ../../../src/wp-admin/includes/dashboard.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 2 + path: ../../../src/wp-admin/post.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/author.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/category.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/widgets.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/showcase.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/tag.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/author.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/category.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/widgets.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/tag.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/taxonomy-post_format.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/author.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/category.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/tag.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/taxonomy-post_format.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/author.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/category.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/tag.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/archive.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/index.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/search.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-includes/capabilities.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-includes/class-wp-block.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 31 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: ../../../src/wp-includes/sitemaps/class-wp-sitemaps.php diff --git a/tests/phpstan/baselines/empty.offset.neon b/tests/phpstan/baselines/empty.offset.neon new file mode 100644 index 0000000000000..ac1410fad0869 --- /dev/null +++ b/tests/phpstan/baselines/empty.offset.neon @@ -0,0 +1,30 @@ +# PHPStan baseline for the `empty.offset` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/empty.offset +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=empty.offset +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Offset mixed on array\{\} in empty\(\) does not exist\.$#' + identifier: empty.offset + count: 1 + path: ../../../src/wp-admin/includes/class-wp-internal-pointers.php + - + message: '#^Offset ''created_timestamp'' on array\{\}\|array\{lossless\?\: mixed, bitrate\?\: int, bitrate_mode\?\: mixed, filesize\?\: int, mime_type\?\: mixed, length\?\: int, length_formatted\?\: mixed, width\?\: int, \.\.\.\} in empty\(\) does not exist\.$#' + identifier: empty.offset + count: 1 + path: ../../../src/wp-admin/includes/media.php diff --git a/tests/phpstan/baselines/empty.property.neon b/tests/phpstan/baselines/empty.property.neon new file mode 100644 index 0000000000000..5bc6d4e3cbdd3 --- /dev/null +++ b/tests/phpstan/baselines/empty.property.neon @@ -0,0 +1,65 @@ +# PHPStan baseline for the `empty.property` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/empty.property +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=empty.property +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_Block_Type\:\:\$render_callback \(callable\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/blocks.php + - + message: '#^Property WP_Customize_Control\:\:\$active_callback \(callable\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-control.php + - + message: '#^Property WP_Customize_Manager\:\:\$nav_menus \(WP_Customize_Nav_Menus\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 4 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Property WP_Customize_Manager\:\:\$widgets \(WP_Customize_Widgets\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Property WP_Customize_Panel\:\:\$active_callback \(callable\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-panel.php + - + message: '#^Property WP_Customize_Section\:\:\$active_callback \(callable\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-section.php + - + message: '#^Property WP_Customize_Manager\:\:\$nav_menus \(WP_Customize_Nav_Menus\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^Property WP_Customize_Manager\:\:\$nav_menus \(WP_Customize_Nav_Menus\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-setting.php + - + message: '#^Property WP_Customize_Partial\:\:\$render_callback \(callable\) in empty\(\) is not falsy\.$#' + identifier: empty.property + count: 2 + path: ../../../src/wp-includes/customize/class-wp-customize-partial.php diff --git a/tests/phpstan/baselines/empty.variable.neon b/tests/phpstan/baselines/empty.variable.neon new file mode 100644 index 0000000000000..28186fb9fc850 --- /dev/null +++ b/tests/phpstan/baselines/empty.variable.neon @@ -0,0 +1,65 @@ +# PHPStan baseline for the `empty.variable` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/empty.variable +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=empty.variable +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Variable \$class in empty\(\) always exists and is always falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-admin/includes/class-wp-posts-list-table.php + - + message: '#^Variable \$title in empty\(\) always exists and is always falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Variable \$parent_file in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-admin/themes.php + - + message: '#^Variable \$addl_path in empty\(\) always exists and is always falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-includes/canonical.php + - + message: '#^Variable \$search in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Variable \$status_type_clauses in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Variable \$schema in empty\(\) is never defined\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php + - + message: '#^Variable \$the_parent in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Variable \$old_user_data in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../src/wp-includes/user.php diff --git a/tests/phpstan/baselines/encapsedStringPart.nonString.neon b/tests/phpstan/baselines/encapsedStringPart.nonString.neon new file mode 100644 index 0000000000000..707a2192a4c8a --- /dev/null +++ b/tests/phpstan/baselines/encapsedStringPart.nonString.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `encapsedStringPart.nonString` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/encapsedStringPart.nonString +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=encapsedStringPart.nonString +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Part \$form_fields\[''_final''\] \(non\-empty\-array\\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString + count: 1 + path: ../../../src/wp-admin/includes/media.php diff --git a/tests/phpstan/baselines/foreach.nonIterable.neon b/tests/phpstan/baselines/foreach.nonIterable.neon new file mode 100644 index 0000000000000..be8bba17a113c --- /dev/null +++ b/tests/phpstan/baselines/foreach.nonIterable.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `foreach.nonIterable` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/foreach.nonIterable +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=foreach.nonIterable +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Argument of an invalid type stdClass supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: ../../../src/wp-includes/class-wp-post-type.php diff --git a/tests/phpstan/baselines/function.alreadyNarrowedType.neon b/tests/phpstan/baselines/function.alreadyNarrowedType.neon new file mode 100644 index 0000000000000..5d0293fde3b5b --- /dev/null +++ b/tests/phpstan/baselines/function.alreadyNarrowedType.neon @@ -0,0 +1,105 @@ +# PHPStan baseline for the `function.alreadyNarrowedType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/function.alreadyNarrowedType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=function.alreadyNarrowedType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 2 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Call to function is_wp_error\(\) with WP_Error will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Call to function method_exists\(\) with ''ParagonIE_Sodium…'' and ''runtime_speed_test'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-admin/includes/file.php + - + message: '#^Call to function is_callable\(\) with ''exif_read_data'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-admin/includes/image.php + - + message: '#^Call to function is_callable\(\) with ''iptcparse'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-admin/includes/image.php + - + message: '#^Call to function is_numeric\(\) with float\|int\|numeric\-string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/block-editor.php + - + message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/class-wp-block-bindings-registry.php + - + message: '#^Call to function method_exists\(\) with ''Imagick'' and ''setIteratorIndex'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Call to function is_callable\(\) with ''exif_read_data'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor.php + - + message: '#^Call to function method_exists\(\) with ''SimplePie_Cache'' and ''register'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/feed.php + - + message: '#^Call to function is_callable\(\) with ''exif_imagetype'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/interactivity-api/class-wp-interactivity-api.php + - + message: '#^Call to function is_string\(\) with non\-falsy\-string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 2 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Call to function wp_die\(\) with arguments non\-falsy\-string, mixed and array\{exit\: false, code\: ''mysql_not_found''\} will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/load.php + - + message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/ms-functions.php + - + message: '#^Call to function is_array\(\) with array\{non\-falsy\-string, non\-falsy\-string&numeric\-string, numeric\-string, numeric\-string\} will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: ../../../src/wp-includes/post.php diff --git a/tests/phpstan/baselines/function.impossibleType.neon b/tests/phpstan/baselines/function.impossibleType.neon new file mode 100644 index 0000000000000..b096e7ff399bd --- /dev/null +++ b/tests/phpstan/baselines/function.impossibleType.neon @@ -0,0 +1,40 @@ +# PHPStan baseline for the `function.impossibleType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/function.impossibleType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=function.impossibleType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Call to function is_string\(\) with bool will always evaluate to false\.$#' + identifier: function.impossibleType + count: 1 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Call to function is_wp_error\(\) with 0\|0\.0\|''''\|''0''\|array\{\}\|false\|null will always evaluate to false\.$#' + identifier: function.impossibleType + count: 2 + path: ../../../src/wp-admin/update.php + - + message: '#^Call to function is_wp_error\(\) with array will always evaluate to false\.$#' + identifier: function.impossibleType + count: 2 + path: ../../../src/wp-includes/class-wp-tax-query.php + - + message: '#^Call to function is_string\(\) with bool will always evaluate to false\.$#' + identifier: function.impossibleType + count: 1 + path: ../../../src/wp-includes/load.php diff --git a/tests/phpstan/baselines/function.resultUnused.neon b/tests/phpstan/baselines/function.resultUnused.neon new file mode 100644 index 0000000000000..1ad6a84dbfa4c --- /dev/null +++ b/tests/phpstan/baselines/function.resultUnused.neon @@ -0,0 +1,40 @@ +# PHPStan baseline for the `function.resultUnused` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/function.resultUnused +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=function.resultUnused +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Call to function wp_cache_add_non_persistent_groups\(\) on a separate line has no effect\.$#' + identifier: function.resultUnused + count: 1 + path: ../../../src/wp-includes/class-wp-theme.php + - + message: '#^Call to function wp_cache_add_non_persistent_groups\(\) on a separate line has no effect\.$#' + identifier: function.resultUnused + count: 1 + path: ../../../src/wp-includes/load.php + - + message: '#^Call to function wp_cache_close\(\) on a separate line has no effect\.$#' + identifier: function.resultUnused + count: 1 + path: ../../../src/wp-includes/load.php + - + message: '#^Call to function wp_cache_add_non_persistent_groups\(\) on a separate line has no effect\.$#' + identifier: function.resultUnused + count: 1 + path: ../../../src/wp-includes/ms-blogs.php diff --git a/tests/phpstan/baselines/greater.invalid.neon b/tests/phpstan/baselines/greater.invalid.neon new file mode 100644 index 0000000000000..bf9ca0aa0250f --- /dev/null +++ b/tests/phpstan/baselines/greater.invalid.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `greater.invalid` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/greater.invalid +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=greater.invalid +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Comparison operation "\>" between \*NEVER\* and 0 results in an error\.$#' + identifier: greater.invalid + count: 1 + path: ../../../src/wp-admin/includes/upgrade.php diff --git a/tests/phpstan/baselines/greaterOrEqual.alwaysTrue.neon b/tests/phpstan/baselines/greaterOrEqual.alwaysTrue.neon new file mode 100644 index 0000000000000..9b0969a81be78 --- /dev/null +++ b/tests/phpstan/baselines/greaterOrEqual.alwaysTrue.neon @@ -0,0 +1,60 @@ +# PHPStan baseline for the `greaterOrEqual.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/greaterOrEqual.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=greaterOrEqual.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Comparison operation "\>\=" between int\<70400, 80500\> and 70300 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/fonts/class-wp-font-utils.php + - + message: '#^Comparison operation "\>\=" between int\<70400, 80500\> and 70400 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/fonts/class-wp-font-utils.php + - + message: '#^Comparison operation "\>\=" between int\<2592000, 31535999\> and 2592000 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Comparison operation "\>\=" between int\<31536000, max\> and 31536000 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Comparison operation "\>\=" between int\<3600, 86399\> and 3600 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Comparison operation "\>\=" between int\<60, 3599\> and 60 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Comparison operation "\>\=" between int\<604800, 2591999\> and 604800 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/formatting.php + - + message: '#^Comparison operation "\>\=" between int\<86400, 604799\> and 86400 is always true\.$#' + identifier: greaterOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/formatting.php diff --git a/tests/phpstan/baselines/identical.alwaysFalse.neon b/tests/phpstan/baselines/identical.alwaysFalse.neon new file mode 100644 index 0000000000000..47e10c0e67b9a --- /dev/null +++ b/tests/phpstan/baselines/identical.alwaysFalse.neon @@ -0,0 +1,45 @@ +# PHPStan baseline for the `identical.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/identical.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=identical.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Strict comparison using \=\=\= between ''update\-selected'' and mixed~\(''activate''\|''activate\-selected''\|''deactivate''\|''deactivate\-selected''\|''delete\-selected''\|''disable\-auto\-update''\|''disable\-auto\-update\-selected''\|''enable\-auto\-update''\|''enable\-auto\-update\-selected''\|''error_scrape''\|''resume''\|''update\-selected''\) will always evaluate to false\.$#' + identifier: identical.alwaysFalse + count: 1 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Strict comparison using \=\=\= between ''exceeded\-max…'' and null will always evaluate to false\.$#' + identifier: identical.alwaysFalse + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php + - + message: '#^Strict comparison using \=\=\= between ''STATE_INCOMPLETE…'' and ''STATE_READY'' will always evaluate to false\.$#' + identifier: identical.alwaysFalse + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Strict comparison using \=\=\= between 3000000000 and 2147483647 will always evaluate to false\.$#' + identifier: identical.alwaysFalse + count: 1 + path: ../../../src/wp-includes/pluggable.php + - + message: '#^Strict comparison using \=\=\= between false and mixed will always evaluate to false\.$#' + identifier: identical.alwaysFalse + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php diff --git a/tests/phpstan/baselines/identical.alwaysTrue.neon b/tests/phpstan/baselines/identical.alwaysTrue.neon new file mode 100644 index 0000000000000..59b590acc867e --- /dev/null +++ b/tests/phpstan/baselines/identical.alwaysTrue.neon @@ -0,0 +1,40 @@ +# PHPStan baseline for the `identical.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/identical.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=identical.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Strict comparison using \=\=\= between ''themezip'' and ''themezip'' will always evaluate to true\.$#' + identifier: identical.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-file-upload-upgrader.php + - + message: '#^Strict comparison using \=\=\= between ''sticky'' and ''sticky'' will always evaluate to true\.$#' + identifier: identical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/block-supports/position.php + - + message: '#^Strict comparison using \=\=\= between ''404'' and ''404'' will always evaluate to true\.$#' + identifier: identical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp.php + - + message: '#^Strict comparison using \=\=\= between true and true will always evaluate to true\.$#' + identifier: identical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/rest-api.php diff --git a/tests/phpstan/baselines/if.alwaysFalse.neon b/tests/phpstan/baselines/if.alwaysFalse.neon new file mode 100644 index 0000000000000..d0346f40c526c --- /dev/null +++ b/tests/phpstan/baselines/if.alwaysFalse.neon @@ -0,0 +1,55 @@ +# PHPStan baseline for the `if.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/if.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=if.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 1 + path: ../../../src/wp-admin/install.php + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 2 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 1 + path: ../../../src/wp-includes/load.php + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 1 + path: ../../../src/wp-includes/template.php + - + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse + count: 1 + path: ../../../src/wp-login.php diff --git a/tests/phpstan/baselines/if.alwaysTrue.neon b/tests/phpstan/baselines/if.alwaysTrue.neon new file mode 100644 index 0000000000000..f049efde2d19d --- /dev/null +++ b/tests/phpstan/baselines/if.alwaysTrue.neon @@ -0,0 +1,55 @@ +# PHPStan baseline for the `if.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/if.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=if.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../src/wp-admin/my-sites.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 2 + path: ../../../src/wp-admin/upload.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/comments.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/template-parts/footer/footer-widgets.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/functions.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/template-parts/modal-menu.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 2 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php diff --git a/tests/phpstan/baselines/instanceof.alwaysTrue.neon b/tests/phpstan/baselines/instanceof.alwaysTrue.neon new file mode 100644 index 0000000000000..087710cdf012e --- /dev/null +++ b/tests/phpstan/baselines/instanceof.alwaysTrue.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `instanceof.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/instanceof.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=instanceof.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Instanceof between Imagick and Imagick will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php diff --git a/tests/phpstan/baselines/isset.offset.neon b/tests/phpstan/baselines/isset.offset.neon new file mode 100644 index 0000000000000..1db99c69fbf03 --- /dev/null +++ b/tests/phpstan/baselines/isset.offset.neon @@ -0,0 +1,40 @@ +# PHPStan baseline for the `isset.offset` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/isset.offset +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=isset.offset +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Offset \(float\|int\) on non\-empty\-array\ in isset\(\) always exists and is not nullable\.$#' + identifier: isset.offset + count: 1 + path: ../../../src/wp-admin/nav-menus.php + - + message: '#^Offset int\<1, max\> on non\-empty\-list\ in isset\(\) always exists and is not nullable\.$#' + identifier: isset.offset + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Offset 2 on array\{string, non\-empty\-string, non\-empty\-string\} in isset\(\) always exists and is not nullable\.$#' + identifier: isset.offset + count: 1 + path: ../../../src/wp-includes/media.php + - + message: '#^Offset ''orderby'' on array\{post_parent\: mixed, post_type\: ''revision'', post_status\: ''inherit'', posts_per_page\: mixed, orderby\: mixed, order\: mixed, suppress_filters\: true, post__not_in\?\: mixed, \.\.\.\} in isset\(\) always exists and is not nullable\.$#' + identifier: isset.offset + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php diff --git a/tests/phpstan/baselines/isset.property.neon b/tests/phpstan/baselines/isset.property.neon new file mode 100644 index 0000000000000..2a0c8971ceb55 --- /dev/null +++ b/tests/phpstan/baselines/isset.property.neon @@ -0,0 +1,220 @@ +# PHPStan baseline for the `isset.property` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/isset.property +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=isset.property +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_Post\:\:\$post_type \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 3 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Property WP_Post\:\:\$post_status \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Property WP_Post\:\:\$post_title \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-admin/includes/class-wp-posts-list-table.php + - + message: '#^Property WP_Screen\:\:\$post_type \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-admin/includes/class-wp-screen.php + - + message: '#^Property WP_Taxonomy\:\:\$meta_box_sanitize_cb \(callable\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Property WP_Site\:\:\$domain \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-admin/my-sites.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/theme-options.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/inc/customizer.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/customizer.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/inc/customizer.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/inc/customizer.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/functions.php + - + message: '#^Property WP_Customize_Manager\:\:\$selective_refresh \(WP_Customize_Selective_Refresh\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/functions.php + - + message: '#^Property WP_Block_Type\:\:\$editor_style_handles \(array\\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/block-editor.php + - + message: '#^Property WP_Block_Type\:\:\$selectors \(array\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/block-supports/states.php + - + message: '#^Property WP_Customize_Control\:\:\$settings \(array\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-control.php + - + message: '#^Property WP_Customize_Manager\:\:\$_changeset_post_id \(int\|false\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Property WP_Customize_Manager\:\:\$_changeset_uuid \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Property WP_Customize_Manager\:\:\$_post_values \(array\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Property WP_Customize_Setting\:\:\$_previewed_blog_id \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 2 + path: ../../../src/wp-includes/class-wp-customize-setting.php + - + message: '#^Property WP_Customize_Widgets\:\:\$selective_refreshable_widgets \(array\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-customize-widgets.php + - + message: '#^Property WP_Http_Cookie\:\:\$domain \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-http-cookie.php + - + message: '#^Property WP_Http_Cookie\:\:\$name \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-http-cookie.php + - + message: '#^Property WP_Http_Cookie\:\:\$value \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-http-cookie.php + - + message: '#^Property WP_Post\:\:\$ID \(int\<0, max\>\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Static property WP_Theme\:\:\$persistently_cache \(bool\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-theme.php + - + message: '#^Static property WP_User\:\:\$back_compat_keys \(array\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-user.php + - + message: '#^Property WP_Widget\:\:\$alt_option_name \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wp-widget.php + - + message: '#^Property wpdb\:\:\$base_prefix \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/class-wpdb.php + - + message: '#^Property WP_Customize_Partial\:\:\$settings \(array\\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-partial.php + - + message: '#^Property WP_HTML_Text_Replacement\:\:\$text \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 2 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Property WP_Post\:\:\$post_status \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Property WP_Object_Cache\:\:\$cache \(array\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/ms-blogs.php + - + message: '#^Property WP_Object_Cache\:\:\$global_groups \(array\\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/ms-blogs.php + - + message: '#^Property WP_Post\:\:\$ID \(int\<0, max\>\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/nav-menu.php + - + message: '#^Property WP_Term\:\:\$term_id \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/nav-menu.php + - + message: '#^Property WP_Post\:\:\$post_name \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php + - + message: '#^Property WP_Post\:\:\$post_title \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php + - + message: '#^Property WP_Query\:\:\$max_num_pages \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php + - + message: '#^Property WP_Site\:\:\$domain \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: ../../../src/wp-includes/user.php diff --git a/tests/phpstan/baselines/isset.variable.neon b/tests/phpstan/baselines/isset.variable.neon new file mode 100644 index 0000000000000..f14ef0755fdb9 --- /dev/null +++ b/tests/phpstan/baselines/isset.variable.neon @@ -0,0 +1,50 @@ +# PHPStan baseline for the `isset.variable` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/isset.variable +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=isset.variable +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Variable \$_POST in isset\(\) always exists and is not nullable\.$#' + identifier: isset.variable + count: 1 + path: ../../../src/wp-admin/includes/class-custom-image-header.php + - + message: '#^Variable \$stylesheet in isset\(\) always exists and is not nullable\.$#' + identifier: isset.variable + count: 1 + path: ../../../src/wp-admin/includes/file.php + - + message: '#^Variable \$_POST in isset\(\) always exists and is not nullable\.$#' + identifier: isset.variable + count: 1 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Variable \$namespace in isset\(\) always exists and is not nullable\.$#' + identifier: isset.variable + count: 1 + path: ../../../src/wp-includes/class-wp-block-parser.php + - + message: '#^Variable \$loader in isset\(\) always exists and is not nullable\.$#' + identifier: isset.variable + count: 1 + path: ../../../src/wp-includes/class-wp-oembed.php + - + message: '#^Variable \$s in isset\(\) is never defined\.$#' + identifier: isset.variable + count: 1 + path: ../../../src/wp-includes/template.php diff --git a/tests/phpstan/baselines/method.childParameterType.neon b/tests/phpstan/baselines/method.childParameterType.neon new file mode 100644 index 0000000000000..7ddc1325be94c --- /dev/null +++ b/tests/phpstan/baselines/method.childParameterType.neon @@ -0,0 +1,55 @@ +# PHPStan baseline for the `method.childParameterType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/method.childParameterType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=method.childParameterType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Parameter \#1 \$comment_status \(bool\) of method WP_Post_Comments_List_Table\:\:get_per_page\(\) should be compatible with parameter \$comment_status \(string\) of method WP_Comments_List_Table\:\:get_per_page\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-admin/includes/class-wp-post-comments-list-table.php + - + message: '#^Parameter \#3 \$args \(stdClass\) of method Walker_Nav_Menu\:\:end_lvl\(\) should be compatible with parameter \$args \(array\) of method Walker\:\:end_lvl\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Parameter \#3 \$args \(stdClass\) of method Walker_Nav_Menu\:\:start_lvl\(\) should be compatible with parameter \$args \(array\) of method Walker\:\:start_lvl\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Parameter \#4 \$args \(stdClass\) of method Walker_Nav_Menu\:\:end_el\(\) should be compatible with parameter \$args \(array\) of method Walker\:\:end_el\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Parameter \#4 \$args \(stdClass\) of method Walker_Nav_Menu\:\:start_el\(\) should be compatible with parameter \$args \(array\) of method Walker\:\:start_el\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Parameter \#1 \$id \(int\) of method WP_REST_Global_Styles_Controller\:\:prepare_links\(\) should be compatible with parameter \$post \(WP_Post\) of method WP_REST_Posts_Controller\:\:prepare_links\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php + - + message: '#^Parameter \#1 \$parent_template_id \(string\) of method WP_REST_Template_Revisions_Controller\:\:get_parent\(\) should be compatible with parameter \$parent_post_id \(int\) of method WP_REST_Revisions_Controller\:\:get_parent\(\)$#' + identifier: method.childParameterType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php diff --git a/tests/phpstan/baselines/method.nonObject.neon b/tests/phpstan/baselines/method.nonObject.neon new file mode 100644 index 0000000000000..4d0727f8950f1 --- /dev/null +++ b/tests/phpstan/baselines/method.nonObject.neon @@ -0,0 +1,55 @@ +# PHPStan baseline for the `method.nonObject` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/method.nonObject +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=method.nonObject +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Cannot call method inline_edit\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/edit-tags.php + - + message: '#^Cannot call method inline_edit\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/edit.php + - + message: '#^Cannot call method embed_scripts\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/erase-personal-data.php + - + message: '#^Cannot call method process_bulk_action\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/erase-personal-data.php + - + message: '#^Cannot call method embed_scripts\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/export-personal-data.php + - + message: '#^Cannot call method process_bulk_action\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/export-personal-data.php + - + message: '#^Cannot call method theme_installer_single\(\) on WP_List_Table\|false\.$#' + identifier: method.nonObject + count: 1 + path: ../../../src/wp-admin/includes/theme-install.php diff --git a/tests/phpstan/baselines/method.notFound.neon b/tests/phpstan/baselines/method.notFound.neon new file mode 100644 index 0000000000000..5d6bccb070ecb --- /dev/null +++ b/tests/phpstan/baselines/method.notFound.neon @@ -0,0 +1,45 @@ +# PHPStan baseline for the `method.notFound` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/method.notFound +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=method.notFound +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Call to an undefined method WP_Upgrader\:\:get_name_for_update\(\)\.$#' + identifier: method.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-language-pack-upgrader-skin.php + - + message: '#^Call to an undefined method WP_Upgrader\:\:plugin_info\(\)\.$#' + identifier: method.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-plugin-installer-skin.php + - + message: '#^Call to an undefined method WP_Upgrader\:\:plugin_info\(\)\.$#' + identifier: method.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-plugin-upgrader-skin.php + - + message: '#^Call to an undefined method WP_Upgrader\:\:theme_info\(\)\.$#' + identifier: method.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-theme-installer-skin.php + - + message: '#^Call to an undefined method WP_Upgrader\:\:theme_info\(\)\.$#' + identifier: method.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-theme-upgrader-skin.php diff --git a/tests/phpstan/baselines/method.unused.neon b/tests/phpstan/baselines/method.unused.neon new file mode 100644 index 0000000000000..f4314a8b42a5c --- /dev/null +++ b/tests/phpstan/baselines/method.unused.neon @@ -0,0 +1,45 @@ +# PHPStan baseline for the `method.unused` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/method.unused +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=method.unused +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Static method WP_Internal_Pointers\:\:print_js\(\) is unused\.$#' + identifier: method.unused + count: 1 + path: ../../../src/wp-admin/includes/class-wp-internal-pointers.php + - + message: '#^Method WP_Http\:\:_dispatch_request\(\) is unused\.$#' + identifier: method.unused + count: 1 + path: ../../../src/wp-includes/class-wp-http.php + - + message: '#^Method WP_Script_Modules\:\:get_marked_for_enqueue\(\) is unused\.$#' + identifier: method.unused + count: 1 + path: ../../../src/wp-includes/class-wp-script-modules.php + - + message: '#^Method WP_HTML_Tag_Processor\:\:skip_rawtext\(\) is unused\.$#' + identifier: method.unused + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Method WP_HTML_Tag_Processor\:\:skip_script_data\(\) is unused\.$#' + identifier: method.unused + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php diff --git a/tests/phpstan/baselines/notIdentical.alwaysTrue.neon b/tests/phpstan/baselines/notIdentical.alwaysTrue.neon new file mode 100644 index 0000000000000..5fed187271bfc --- /dev/null +++ b/tests/phpstan/baselines/notIdentical.alwaysTrue.neon @@ -0,0 +1,75 @@ +# PHPStan baseline for the `notIdentical.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/notIdentical.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=notIdentical.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Strict comparison using \!\=\= between ''all'' and int will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/class-wp-links-list-table.php + - + message: '#^Strict comparison using \!\=\= between null and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/block-supports/layout.php + - + message: '#^Strict comparison using \!\=\= between null and int\|string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 2 + path: ../../../src/wp-includes/class-wp-rewrite.php + - + message: '#^Strict comparison using \!\=\= between array\{\} and non\-empty\-array\ will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-view-config-data.php + - + message: '#^Strict comparison using \!\=\= between ''Etc'' and ''Africa''\|''America''\|''Antarctica''\|''Arctic''\|''Asia''\|''Atlantic''\|''Australia''\|''Europe''\|''Indian''\|''Pacific'' will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Strict comparison using \!\=\= between ''STATE_COMPLETE'' and ''STATE_READY'' will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Strict comparison using \!\=\= between ''STATE_INCOMPLETE…'' and ''STATE_READY'' will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Strict comparison using \!\=\= between ''STATE_MATCHED_TAG'' and ''STATE_READY'' will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php + - + message: '#^Strict comparison using \!\=\= between 0 and int\\|int\<1, max\> will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/nav-menu.php + - + message: '#^Strict comparison using \!\=\= between float\|int\|numeric\-string and ''bottom''\|''footer''\|''header''\|''main''\|''menu\-1''\|''menu\-2''\|''navigation''\|''primary''\|''secondary''\|''social''\|''subsidiary''\|''top'' will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 2 + path: ../../../src/wp-includes/nav-menu.php + - + message: '#^Strict comparison using \!\=\= between false and int will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: ../../../src/wp-includes/pluggable.php diff --git a/tests/phpstan/baselines/nullCoalesce.offset.neon b/tests/phpstan/baselines/nullCoalesce.offset.neon new file mode 100644 index 0000000000000..cdf94447df8f3 --- /dev/null +++ b/tests/phpstan/baselines/nullCoalesce.offset.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `nullCoalesce.offset` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/nullCoalesce.offset +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=nullCoalesce.offset +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Offset 1 on array\{list\, list\\} on left side of \?\? always exists and is not nullable\.$#' + identifier: nullCoalesce.offset + count: 1 + path: ../../../src/wp-includes/block-supports/block-style-variations.php diff --git a/tests/phpstan/baselines/nullCoalesce.property.neon b/tests/phpstan/baselines/nullCoalesce.property.neon new file mode 100644 index 0000000000000..3b30d530a3ab3 --- /dev/null +++ b/tests/phpstan/baselines/nullCoalesce.property.neon @@ -0,0 +1,55 @@ +# PHPStan baseline for the `nullCoalesce.property` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/nullCoalesce.property +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=nullCoalesce.property +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_User\:\:\$ID \(int\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/author-template.php + - + message: '#^Property WP_Http_Cookie\:\:\$path \(string\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/class-wp-http-cookie.php + - + message: '#^Property WP_Http_Cookie\:\:\$port \(int\|string\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/class-wp-http-cookie.php + - + message: '#^Property WP_Locale\:\:\$word_count_type \(string\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/class-wp-locale.php + - + message: '#^Property WP_Query\:\:\$max_num_pages \(int\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Property WP_Post_Type\:\:\$template \(array\\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php + - + message: '#^Property WP_User\:\:\$ID \(int\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property + count: 1 + path: ../../../src/wp-includes/user.php diff --git a/tests/phpstan/baselines/offsetAccess.nonOffsetAccessible.neon b/tests/phpstan/baselines/offsetAccess.nonOffsetAccessible.neon new file mode 100644 index 0000000000000..5b2396b941816 --- /dev/null +++ b/tests/phpstan/baselines/offsetAccess.nonOffsetAccessible.neon @@ -0,0 +1,35 @@ +# PHPStan baseline for the `offsetAccess.nonOffsetAccessible` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/offsetAccess.nonOffsetAccessible +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=offsetAccess.nonOffsetAccessible +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Cannot access offset ''new_version'' on bool\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 4 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Cannot access offset mixed on bool\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Cannot access offset ''new_version'' on bool\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: ../../../src/wp-admin/update-core.php diff --git a/tests/phpstan/baselines/offsetAccess.notFound.neon b/tests/phpstan/baselines/offsetAccess.notFound.neon new file mode 100644 index 0000000000000..a5e2eb0698cc8 --- /dev/null +++ b/tests/phpstan/baselines/offsetAccess.notFound.neon @@ -0,0 +1,40 @@ +# PHPStan baseline for the `offsetAccess.notFound` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/offsetAccess.notFound +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=offsetAccess.notFound +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Offset float does not exist on list\.$#' + identifier: offsetAccess.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Offset ''preview'' does not exist on array\{activate\: non\-falsy\-string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-wp-themes-list-table.php + - + message: '#^Offset ''basedir'' does not exist on string\.$#' + identifier: offsetAccess.notFound + count: 2 + path: ../../../src/wp-includes/fonts.php + - + message: '#^Offset ''baseurl'' does not exist on string\.$#' + identifier: offsetAccess.notFound + count: 2 + path: ../../../src/wp-includes/fonts.php diff --git a/tests/phpstan/baselines/offsetAssign.valueType.neon b/tests/phpstan/baselines/offsetAssign.valueType.neon new file mode 100644 index 0000000000000..8a28f7d980320 --- /dev/null +++ b/tests/phpstan/baselines/offsetAssign.valueType.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `offsetAssign.valueType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/offsetAssign.valueType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=offsetAssign.valueType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^WpOrg\\Requests\\Cookie\\Jar does not accept WpOrg\\Requests\\Cookie\.$#' + identifier: offsetAssign.valueType + count: 2 + path: ../../../src/wp-includes/class-wp-http.php diff --git a/tests/phpstan/baselines/parameter.defaultValue.neon b/tests/phpstan/baselines/parameter.defaultValue.neon new file mode 100644 index 0000000000000..34b6b678fc447 --- /dev/null +++ b/tests/phpstan/baselines/parameter.defaultValue.neon @@ -0,0 +1,105 @@ +# PHPStan baseline for the `parameter.defaultValue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/parameter.defaultValue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=parameter.defaultValue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Default value of the parameter \#1 \$admin_header_callback \(''''\) of method Custom_Background\:\:__construct\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/class-custom-background.php + - + message: '#^Default value of the parameter \#2 \$admin_image_div_callback \(''''\) of method Custom_Background\:\:__construct\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/class-custom-background.php + - + message: '#^Default value of the parameter \#2 \$admin_image_div_callback \(''''\) of method Custom_Image_Header\:\:__construct\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/class-custom-image-header.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_comments_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_dashboard_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_links_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_management_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_media_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_menu_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_options_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_pages_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_plugins_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_posts_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_theme_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#5 \$callback \(''''\) of function add_users_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#6 \$callback \(''''\) of function add_submenu_page\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Default value of the parameter \#3 \$deprecated \(''''\) of function unregister_setting\(\) is incompatible with type callable\(\)\: mixed\.$#' + identifier: parameter.defaultValue + count: 1 + path: ../../../src/wp-includes/option.php diff --git a/tests/phpstan/baselines/parameter.notFound.neon b/tests/phpstan/baselines/parameter.notFound.neon new file mode 100644 index 0000000000000..c3835cd7903c4 --- /dev/null +++ b/tests/phpstan/baselines/parameter.notFound.neon @@ -0,0 +1,35 @@ +# PHPStan baseline for the `parameter.notFound` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/parameter.notFound +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=parameter.notFound +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^PHPDoc tag @param references unknown parameter\: \$key$#' + identifier: parameter.notFound + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^PHPDoc tag @param references unknown parameter\: \$url$#' + identifier: parameter.notFound + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^PHPDoc tag @param references unknown parameter\: \$value$#' + identifier: parameter.notFound + count: 1 + path: ../../../src/wp-includes/functions.php diff --git a/tests/phpstan/baselines/parameter.phpDocType.neon b/tests/phpstan/baselines/parameter.phpDocType.neon new file mode 100644 index 0000000000000..db8a7f3b32466 --- /dev/null +++ b/tests/phpstan/baselines/parameter.phpDocType.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `parameter.phpDocType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/parameter.phpDocType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=parameter.phpDocType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^PHPDoc tag @param for parameter \$block_type with type array\ is incompatible with native type string\.$#' + identifier: parameter.phpDocType + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php diff --git a/tests/phpstan/baselines/parameter.unresolvableType.neon b/tests/phpstan/baselines/parameter.unresolvableType.neon new file mode 100644 index 0000000000000..1193e163ca555 --- /dev/null +++ b/tests/phpstan/baselines/parameter.unresolvableType.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `parameter.unresolvableType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/parameter.unresolvableType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=parameter.unresolvableType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^PHPDoc tag @param for parameter \$type contains unresolvable type\.$#' + identifier: parameter.unresolvableType + count: 1 + path: ../../../src/wp-includes/class-wp-feed-cache-transient.php diff --git a/tests/phpstan/baselines/parameterByRef.type.neon b/tests/phpstan/baselines/parameterByRef.type.neon new file mode 100644 index 0000000000000..8b7394add3c7e --- /dev/null +++ b/tests/phpstan/baselines/parameterByRef.type.neon @@ -0,0 +1,50 @@ +# PHPStan baseline for the `parameterByRef.type` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/parameterByRef.type +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=parameterByRef.type +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Parameter &\$stored_results by\-ref type of method WP_Scripts\:\:get_highest_fetchpriority_with_dependents\(\) expects array\, array\ given\.$#' + identifier: parameterByRef.type + count: 1 + path: ../../../src/wp-includes/class-wp-scripts.php + - + message: '#^Parameter &\$query by\-ref type of method WP_Tax_Query\:\:clean_query\(\) expects array, WP_Error given\.$#' + identifier: parameterByRef.type + count: 2 + path: ../../../src/wp-includes/class-wp-tax-query.php + - + message: '#^Parameter &\$query by\-ref type of method WP_Tax_Query\:\:transform_query\(\) expects array, WP_Error given\.$#' + identifier: parameterByRef.type + count: 1 + path: ../../../src/wp-includes/class-wp-tax-query.php + - + message: '#^Parameter &\$matched_token_byte_length by\-ref type of method WP_Token_Map\:\:read_token\(\) expects int\|null, \(float\|int\) given\.$#' + identifier: parameterByRef.type + count: 1 + path: ../../../src/wp-includes/class-wp-token-map.php + - + message: '#^Parameter &\$has_noncharacters by\-ref type of function _wp_scan_utf8\(\) expects bool\|null, int given\.$#' + identifier: parameterByRef.type + count: 2 + path: ../../../src/wp-includes/compat-utf8.php + - + message: '#^Parameter &\$result by\-ref type of function _page_traverse_name\(\) expects array\, array given\.$#' + identifier: parameterByRef.type + count: 1 + path: ../../../src/wp-includes/post.php diff --git a/tests/phpstan/baselines/parameterByRef.unusedType.neon b/tests/phpstan/baselines/parameterByRef.unusedType.neon new file mode 100644 index 0000000000000..73746ef20c078 --- /dev/null +++ b/tests/phpstan/baselines/parameterByRef.unusedType.neon @@ -0,0 +1,30 @@ +# PHPStan baseline for the `parameterByRef.unusedType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/parameterByRef.unusedType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=parameterByRef.unusedType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Function _wp_scan_utf8\(\) never assigns null to &\$has_noncharacters so it can be removed from the by\-ref type\.$#' + identifier: parameterByRef.unusedType + count: 1 + path: ../../../src/wp-includes/compat-utf8.php + - + message: '#^Function _wp_utf8_codepoint_span\(\) never assigns null to &\$found_code_points so it can be removed from the by\-ref type\.$#' + identifier: parameterByRef.unusedType + count: 1 + path: ../../../src/wp-includes/compat-utf8.php diff --git a/tests/phpstan/baselines/property.defaultValue.neon b/tests/phpstan/baselines/property.defaultValue.neon new file mode 100644 index 0000000000000..e604833eade20 --- /dev/null +++ b/tests/phpstan/baselines/property.defaultValue.neon @@ -0,0 +1,110 @@ +# PHPStan baseline for the `property.defaultValue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.defaultValue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.defaultValue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property Walker_Nav_Menu\:\:\$tree_type \(string\) does not accept default value of type array\\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Property WP_Block\:\:\$inner_blocks \(WP_Block_List\) does not accept default value of type array\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-block.php + - + message: '#^Property WP_Comment_Query\:\:\$date_query \(WP_Date_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-comment-query.php + - + message: '#^Property WP_Comment_Query\:\:\$meta_query \(WP_Meta_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-comment-query.php + - + message: '#^Property WP_Customize_Control\:\:\$active_callback \(callable\(\)\: mixed\) does not accept default value of type ''''\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-control.php + - + message: '#^Property WP_Customize_Panel\:\:\$active_callback \(callable\(\)\: mixed\) does not accept default value of type ''''\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-panel.php + - + message: '#^Property WP_Customize_Panel\:\:\$theme_supports \(array\\) does not accept default value of type string\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-panel.php + - + message: '#^Property WP_Customize_Section\:\:\$active_callback \(callable\(\)\: mixed\) does not accept default value of type ''''\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-section.php + - + message: '#^Property WP_Customize_Setting\:\:\$sanitize_callback \(callable\(\)\: mixed\) does not accept default value of type ''''\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-setting.php + - + message: '#^Property WP_Customize_Setting\:\:\$sanitize_js_callback \(callable\(\)\: mixed\) does not accept default value of type ''''\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-setting.php + - + message: '#^Property WP_Customize_Setting\:\:\$validate_callback \(callable\(\)\: mixed\) does not accept default value of type ''''\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-customize-setting.php + - + message: '#^Property WP_Query\:\:\$date_query \(WP_Date_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Property WP_Query\:\:\$meta_query \(WP_Meta_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Property WP_Site_Query\:\:\$date_query \(WP_Date_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-site-query.php + - + message: '#^Property WP_Site_Query\:\:\$meta_query \(WP_Meta_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-site-query.php + - + message: '#^Property WP_Term_Query\:\:\$meta_query \(WP_Meta_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-term-query.php + - + message: '#^Property WP_Term\:\:\$term_group \(int\) does not accept default value of type string\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-term.php + - + message: '#^Property WP_User_Query\:\:\$meta_query \(WP_Meta_Query\) does not accept default value of type false\.$#' + identifier: property.defaultValue + count: 1 + path: ../../../src/wp-includes/class-wp-user-query.php diff --git a/tests/phpstan/baselines/property.nonObject.neon b/tests/phpstan/baselines/property.nonObject.neon new file mode 100644 index 0000000000000..81a4af3e09511 --- /dev/null +++ b/tests/phpstan/baselines/property.nonObject.neon @@ -0,0 +1,255 @@ +# PHPStan baseline for the `property.nonObject` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.nonObject +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.nonObject +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Cannot access property \$download_link on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Cannot access property \$id on int\|string\|WP_Term\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Cannot access property \$link on int\|string\|WP_Term\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Cannot access property \$name on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Cannot access property \$themes on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Cannot access property \$download_link on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-theme-upgrader.php + - + message: '#^Cannot access property \$name on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-theme-upgrader.php + - + message: '#^Cannot access property \$version on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-theme-upgrader.php + - + message: '#^Cannot access property \$current on array\|object\.$#' + identifier: property.nonObject + count: 3 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Cannot access property \$response on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Cannot access property \$version on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Cannot access property \$info on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-plugin-install-list-table.php + - + message: '#^Cannot access property \$plugins on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-plugin-install-list-table.php + - + message: '#^Cannot access property \$parent on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-terms-list-table.php + - + message: '#^Cannot access property \$term_id on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/class-wp-terms-list-table.php + - + message: '#^Cannot access property \$info on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-theme-install-list-table.php + - + message: '#^Cannot access property \$themes on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/class-wp-theme-install-list-table.php + - + message: '#^Cannot access property \$author on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$downloaded on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$external on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$homepage on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$name on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$requires on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$sections on array\|object\.$#' + identifier: property.nonObject + count: 5 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$slug on array\|object\.$#' + identifier: property.nonObject + count: 3 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$tested on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$version on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Cannot access property \$meta_key on object\|true\.$#' + identifier: property.nonObject + count: 4 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Cannot access property \$post_id on object\|true\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Cannot access property \$download_link on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/update.php + - + message: '#^Cannot access property \$name on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/update.php + - + message: '#^Cannot access property \$version on array\|object\.$#' + identifier: property.nonObject + count: 2 + path: ../../../src/wp-admin/update.php + - + message: '#^Cannot access property \$comment_shortcuts on WP_User\|false\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Cannot access property \$infinite_scrolling on WP_User\|false\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Cannot access property \$id on int\|string\|WP_Term\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/category-template.php + - + message: '#^Cannot access property \$link on int\|string\|WP_Term\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/category-template.php + - + message: '#^Cannot access property \$themes on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Cannot access property \$object_id on array\|WP_Error\|WP_Term\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/class-wp-term-query.php + - + message: '#^Cannot access property \$term_id on string\|WP_Customize_Setting\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-control.php + - + message: '#^Cannot access property \$link_id on array\|object\.$#' + identifier: property.nonObject + count: 3 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Cannot access property \$plugins on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php + - + message: '#^Cannot access property \$auto_add on WP_Term\|false\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php + - + message: '#^Cannot access property \$download_link on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php + - + message: '#^Cannot access property \$language_packs on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php + - + message: '#^Cannot access property \$parent on array\|object\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Cannot access property \$template_name on array\.$#' + identifier: property.nonObject + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Cannot access property \$term_id on array\|object\.$#' + identifier: property.nonObject + count: 4 + path: ../../../src/wp-includes/taxonomy.php diff --git a/tests/phpstan/baselines/property.notFound.neon b/tests/phpstan/baselines/property.notFound.neon new file mode 100644 index 0000000000000..7893a2dd24bb6 --- /dev/null +++ b/tests/phpstan/baselines/property.notFound.neon @@ -0,0 +1,330 @@ +# PHPStan baseline for the `property.notFound` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.notFound +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.notFound +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Access to an undefined property WP_Upgrader_Skin\:\:\$language_update\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/includes/class-language-pack-upgrader.php + - + message: '#^Access to an undefined property WP_Upgrader\:\:\$new_plugin_data\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-plugin-installer-skin.php + - + message: '#^Access to an undefined property WP_Upgrader_Skin\:\:\$plugin_active\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-plugin-upgrader.php + - + message: '#^Access to an undefined property WP_Upgrader_Skin\:\:\$plugin_info\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-plugin-upgrader.php + - + message: '#^Access to an undefined property WP_Upgrader\:\:\$new_theme_data\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-theme-installer-skin.php + - + message: '#^Access to an undefined property WP_Upgrader_Skin\:\:\$api\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/includes/class-theme-upgrader.php + - + message: '#^Access to an undefined property WP_Upgrader_Skin\:\:\$theme_info\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-theme-upgrader.php + - + message: '#^Access to an undefined property WP_Post\:\:\$attr_title\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$classes\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$menu_item_parent\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$object\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$object_id\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$target\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$title\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$type\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$url\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$xfn\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-checklist.php + - + message: '#^Access to an undefined property WP_Post\:\:\$classes\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$description\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$menu_item_parent\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$object\.$#' + identifier: property.notFound + count: 4 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$object_id\.$#' + identifier: property.notFound + count: 3 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$target\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$title\.$#' + identifier: property.notFound + count: 4 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$type\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$type_label\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$url\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Post\:\:\$xfn\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-walker-nav-menu-edit.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$author\.$#' + identifier: property.notFound + count: 3 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$name\.$#' + identifier: property.notFound + count: 4 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$parent_theme\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$version\.$#' + identifier: property.notFound + count: 5 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$auto_update_forced\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$update_supported\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$name\.$#' + identifier: property.notFound + count: 8 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Access to an undefined property WP_Post\:\:\$_wp_attachment_image_alt\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/includes/image.php + - + message: '#^Access to an undefined property WP_Post\:\:\$front_or_home\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/nav-menu.php + - + message: '#^Access to an undefined property WP_Post\:\:\$privacy_policy_page\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/nav-menu.php + - + message: '#^Access to an undefined property wpdb\:\:\$categories\.$#' + identifier: property.notFound + count: 4 + path: ../../../src/wp-admin/includes/upgrade.php + - + message: '#^Access to an undefined property wpdb\:\:\$link2cat\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/includes/upgrade.php + - + message: '#^Access to an undefined property wpdb\:\:\$post2cat\.$#' + identifier: property.notFound + count: 4 + path: ../../../src/wp-admin/includes/upgrade.php + - + message: '#^Access to an undefined property WP_Term\:\:\$truncated_name\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-admin/nav-menus.php + - + message: '#^Access to an undefined property WP_Theme\:\:\$version\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-admin/update-core.php + - + message: '#^Access to an undefined property WP_Post\:\:\$description\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/functions.php + - + message: '#^Access to an undefined property WP_Post\:\:\$classes\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-content/themes/twentynineteen/inc/icon-functions.php + - + message: '#^Access to an undefined property WP_Post\:\:\$url\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/inc/icon-functions.php + - + message: '#^Access to an undefined property WP_Post\:\:\$classes\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/inc/template-functions.php + - + message: '#^Access to an undefined property WP_Post\:\:\$classes\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/inc/icon-functions.php + - + message: '#^Access to an undefined property WP_Post\:\:\$classes\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-content/themes/twentytwenty/inc/template-tags.php + - + message: '#^Access to an undefined property WP_Post\:\:\$url\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/inc/template-tags.php + - + message: '#^Access to an undefined property WP_Post\:\:\$url\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/inc/menu-functions.php + - + message: '#^Access to an undefined property WP_Post_Type\:\:\$capabilities\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-includes/capabilities.php + - + message: '#^Access to an undefined property WP_Term\:\:\$link\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-includes/category-template.php + - + message: '#^Access to an undefined property WP_Post\:\:\$current\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Access to an undefined property WP_Post\:\:\$title\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-includes/class-walker-nav-menu.php + - + message: '#^Access to an undefined property WP_Query\:\:\$comments_by_type\.$#' + identifier: property.notFound + count: 3 + path: ../../../src/wp-includes/comment-template.php + - + message: '#^Access to an undefined property WP_Post\:\:\$attr_title\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^Access to an undefined property WP_Post\:\:\$db_id\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^Access to an undefined property WP_Post\:\:\$description\.$#' + identifier: property.notFound + count: 2 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^Access to an undefined property WP_Post\:\:\$type\.$#' + identifier: property.notFound + count: 3 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^Access to an undefined property WP_Post\:\:\$type_label\.$#' + identifier: property.notFound + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^Access to an undefined property WP_Post\:\:\$url\.$#' + identifier: property.notFound + count: 4 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php diff --git a/tests/phpstan/baselines/property.onlyWritten.neon b/tests/phpstan/baselines/property.onlyWritten.neon new file mode 100644 index 0000000000000..f4b740e1bdf02 --- /dev/null +++ b/tests/phpstan/baselines/property.onlyWritten.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `property.onlyWritten` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.onlyWritten +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.onlyWritten +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_REST_Template_Autosaves_Controller\:\:\$parent_post_type is never read, only written\.$#' + identifier: property.onlyWritten + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php diff --git a/tests/phpstan/baselines/property.phpDocType.neon b/tests/phpstan/baselines/property.phpDocType.neon new file mode 100644 index 0000000000000..2f69939d19f8b --- /dev/null +++ b/tests/phpstan/baselines/property.phpDocType.neon @@ -0,0 +1,45 @@ +# PHPStan baseline for the `property.phpDocType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.phpDocType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.phpDocType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^PHPDoc type array of property WP_Customize_Nav_Menu_Item_Setting\:\:\$default is not covariant with PHPDoc type string of overridden property WP_Customize_Setting\:\:\$default\.$#' + identifier: property.phpDocType + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php + - + message: '#^PHPDoc type array of property WP_Customize_Nav_Menu_Setting\:\:\$default is not covariant with PHPDoc type string of overridden property WP_Customize_Setting\:\:\$default\.$#' + identifier: property.phpDocType + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-setting.php + - + message: '#^PHPDoc type false of property WP_REST_Attachments_Controller\:\:\$allow_batch is not covariant with PHPDoc type array of overridden property WP_REST_Posts_Controller\:\:\$allow_batch\.$#' + identifier: property.phpDocType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php + - + message: '#^PHPDoc type false of property WP_REST_Font_Faces_Controller\:\:\$allow_batch is not covariant with PHPDoc type array of overridden property WP_REST_Posts_Controller\:\:\$allow_batch\.$#' + identifier: property.phpDocType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php + - + message: '#^PHPDoc type false of property WP_REST_Font_Families_Controller\:\:\$allow_batch is not covariant with PHPDoc type array of overridden property WP_REST_Posts_Controller\:\:\$allow_batch\.$#' + identifier: property.phpDocType + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php diff --git a/tests/phpstan/baselines/property.private.neon b/tests/phpstan/baselines/property.private.neon new file mode 100644 index 0000000000000..900a8e51dc423 --- /dev/null +++ b/tests/phpstan/baselines/property.private.neon @@ -0,0 +1,60 @@ +# PHPStan baseline for the `property.private` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.private +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.private +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Access to private property WP_Theme\:\:\$stylesheet\.$#' + identifier: property.private + count: 20 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to private property WP_Theme\:\:\$template\.$#' + identifier: property.private + count: 2 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to private property WP_Block_Type\:\:\$uses_context\.$#' + identifier: property.private + count: 1 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Access to private property WP_Block_Type\:\:\$variations\.$#' + identifier: property.private + count: 1 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Access to private property WP_Block_Type\:\:\$uses_context\.$#' + identifier: property.private + count: 1 + path: ../../../src/wp-includes/class-wp-block.php + - + message: '#^Access to private property WP_Object_Cache\:\:\$cache\.$#' + identifier: property.private + count: 2 + path: ../../../src/wp-includes/ms-blogs.php + - + message: '#^Access to private property WP_Block_Type\:\:\$uses_context\.$#' + identifier: property.private + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php + - + message: '#^Access to private property WP_Block_Type\:\:\$variations\.$#' + identifier: property.private + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php diff --git a/tests/phpstan/baselines/property.protected.neon b/tests/phpstan/baselines/property.protected.neon new file mode 100644 index 0000000000000..b29d125bd2a7a --- /dev/null +++ b/tests/phpstan/baselines/property.protected.neon @@ -0,0 +1,60 @@ +# PHPStan baseline for the `property.protected` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.protected +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.protected +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Access to protected property WP_List_Table\:\:\$screen\.$#' + identifier: property.protected + count: 1 + path: ../../../src/wp-admin/erase-personal-data.php + - + message: '#^Access to protected property WP_List_Table\:\:\$screen\.$#' + identifier: property.protected + count: 1 + path: ../../../src/wp-admin/export-personal-data.php + - + message: '#^Access to protected property WP_List_Table\:\:\$screen\.$#' + identifier: property.protected + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Access to protected property wpdb\:\:\$dbh\.$#' + identifier: property.protected + count: 3 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to protected property wpdb\:\:\$dbhost\.$#' + identifier: property.protected + count: 1 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to protected property wpdb\:\:\$dbname\.$#' + identifier: property.protected + count: 1 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to protected property wpdb\:\:\$dbuser\.$#' + identifier: property.protected + count: 1 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php + - + message: '#^Access to protected property WP_Object_Cache\:\:\$global_groups\.$#' + identifier: property.protected + count: 2 + path: ../../../src/wp-includes/ms-blogs.php diff --git a/tests/phpstan/baselines/property.unusedType.neon b/tests/phpstan/baselines/property.unusedType.neon new file mode 100644 index 0000000000000..9f1bd06e86c8f --- /dev/null +++ b/tests/phpstan/baselines/property.unusedType.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `property.unusedType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/property.unusedType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=property.unusedType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Property WP_HTML_Tag_Processor\:\:\$skip_newline_at \(int\|null\) is never assigned int so it can be removed from the property type\.$#' + identifier: property.unusedType + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-tag-processor.php diff --git a/tests/phpstan/baselines/return.empty.neon b/tests/phpstan/baselines/return.empty.neon new file mode 100644 index 0000000000000..5abf2badb5636 --- /dev/null +++ b/tests/phpstan/baselines/return.empty.neon @@ -0,0 +1,30 @@ +# PHPStan baseline for the `return.empty` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/return.empty +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=return.empty +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Function twentytwenty_generate_css\(\) should return string but empty return statement found\.$#' + identifier: return.empty + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/inc/custom-css.php + - + message: '#^Function wp_dropdown_languages\(\) should return string but empty return statement found\.$#' + identifier: return.empty + count: 1 + path: ../../../src/wp-includes/l10n.php diff --git a/tests/phpstan/baselines/return.missing.neon b/tests/phpstan/baselines/return.missing.neon new file mode 100644 index 0000000000000..11bb654bafb2c --- /dev/null +++ b/tests/phpstan/baselines/return.missing.neon @@ -0,0 +1,225 @@ +# PHPStan baseline for the `return.missing` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/return.missing +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=return.missing +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Method Twenty_Eleven_Ephemera_Widget\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/widgets.php + - + message: '#^Method Twenty_Fourteen_Ephemera_Widget\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/widgets.php + - + message: '#^Function get_category_by_path\(\) should return array\|WP_Error\|WP_Term\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/category.php + - + message: '#^Method WP_Customize_Manager\:\:get_control\(\) should return WP_Customize_Control\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Method WP_Customize_Manager\:\:get_panel\(\) should return WP_Customize_Panel\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Method WP_Customize_Manager\:\:get_section\(\) should return WP_Customize_Section\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Method WP_Customize_Manager\:\:get_setting\(\) should return WP_Customize_Setting\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/class-wp-customize-manager.php + - + message: '#^Method WP_Customize_Widgets\:\:get_setting_type\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/class-wp-customize-widgets.php + - + message: '#^Method WP_Image_Editor_Imagick\:\:set_imagick_time_limit\(\) should return int\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Method WP_Customize_Header_Image_Control\:\:get_current_image_src\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-header-image-control.php + - + message: '#^Function post_type_archive_title\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function single_month_title\(\) should return string\|false\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function single_post_title\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function single_term_title\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function the_date\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function the_modified_date\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function wp_title\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function edit_term_link\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function get_next_posts_link\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function get_next_posts_page_link\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 2 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function get_previous_posts_link\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function get_previous_posts_page_link\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function next_posts\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function previous_posts\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Function wp_list_users\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/user.php + - + message: '#^Method WP_Nav_Menu_Widget\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-nav-menu-widget.php + - + message: '#^Method WP_Widget_Archives\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-archives.php + - + message: '#^Method WP_Widget_Block\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-block.php + - + message: '#^Method WP_Widget_Calendar\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-calendar.php + - + message: '#^Method WP_Widget_Categories\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-categories.php + - + message: '#^Method WP_Widget_Custom_HTML\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-custom-html.php + - + message: '#^Method WP_Widget_Links\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-links.php + - + message: '#^Method WP_Widget_Media\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-media.php + - + message: '#^Method WP_Widget_Meta\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-meta.php + - + message: '#^Method WP_Widget_Pages\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-pages.php + - + message: '#^Method WP_Widget_Recent_Comments\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-recent-comments.php + - + message: '#^Method WP_Widget_Recent_Posts\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-recent-posts.php + - + message: '#^Method WP_Widget_RSS\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-rss.php + - + message: '#^Method WP_Widget_Search\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: ../../../src/wp-includes/widgets/class-wp-widget-search.php + - + message: '#^Method WP_Widget_Tag_Cloud\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 2 + path: ../../../src/wp-includes/widgets/class-wp-widget-tag-cloud.php + - + message: '#^Method WP_Widget_Text\:\:form\(\) should return string\|null but return statement is missing\.$#' + identifier: return.missing + count: 2 + path: ../../../src/wp-includes/widgets/class-wp-widget-text.php diff --git a/tests/phpstan/baselines/return.type.neon b/tests/phpstan/baselines/return.type.neon new file mode 100644 index 0000000000000..9d99e94d0abd6 --- /dev/null +++ b/tests/phpstan/baselines/return.type.neon @@ -0,0 +1,165 @@ +# PHPStan baseline for the `return.type` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/return.type +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=return.type +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Method WP_Automatic_Updater\:\:update\(\) should return WP_Error\|null but returns false\.$#' + identifier: return.type + count: 2 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Function convert_to_screen\(\) should return WP_Screen but returns object\{id\: string, base\: string\}&stdClass\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-admin/includes/template.php + - + message: '#^Function twentytwenty_get_color_for_area\(\) should return string but returns false\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/functions.php + - + message: '#^Function filter_block_kses\(\) should return array but returns ArrayAccess&WP_Block_Parser_Block\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/blocks.php + - + message: '#^Method WP_Block_Processor\:\:extract_full_block_and_advance\(\) should return array\\|null but returns array\\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Method WP_Block_Processor\:\:extract_full_block_and_advance\(\) should return array\\|null but returns array\\|string\|null\>\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Method WP_Block_Type\:\:__get\(\) should return array\\|string\|null but returns array\\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-block-type.php + - + message: '#^Method WP_Image_Editor_Imagick\:\:set_imagick_time_limit\(\) should return int\|null but returns float\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Method WP_Image_Editor_Imagick\:\:write_image\(\) should return WP_Error\|true but returns bool\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor-imagick.php + - + message: '#^Method WP_Term_Query\:\:get_terms\(\) should return array\\|string but returns int\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-term-query.php + - + message: '#^Method wp_xmlrpc_server\:\:mw_newPost\(\) should return int\|IXR_Error but returns string\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-xmlrpc-server.php + - + message: '#^Method wp_xmlrpc_server\:\:wp_newTerm\(\) should return int\|IXR_Error but returns string\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/class-wp-xmlrpc-server.php + - + message: '#^Function _upgrade_cron_array\(\) should return array\{version\: 2, \.\.\.\, interval\?\: int\<0, max\>\}\>\>\>\} but returns non\-empty\-array\<''version''\|int, array\, interval\?\: int\<0, max\>\}\>\|int\>\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/cron.php + - + message: '#^Method WP_Customize_Nav_Menu_Setting\:\:filter_wp_get_nav_menu_object\(\) should return object\|null but returns false\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/customize/class-wp-customize-nav-menu-setting.php + - + message: '#^Function _wp_filter_font_directory\(\) should return string but returns array\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/fonts.php + - + message: '#^Method WP_Translation_Controller\:\:get_entries\(\) should return array\ but returns array\\>\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/l10n/class-wp-translation-controller.php + - + message: '#^Method WP_Translation_File\:\:entries\(\) should return array\\> but returns array\\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/l10n/class-wp-translation-file.php + - + message: '#^Function update_meta_cache\(\) should return array\|false but returns bool\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/meta.php + - + message: '#^Function wp_post_revision_title\(\) should return string\|false but returns null\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Function wp_post_revision_title_expanded\(\) should return string\|false but returns null\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/post-template.php + - + message: '#^Function wp_set_post_categories\(\) should return array\|WP_Error\|false but returns true\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Function wp_trash_post\(\) should return WP_Post\|false\|null but returns bool\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Function wp_untrash_post\(\) should return WP_Post\|false\|null but returns bool\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Method WP_REST_Autosaves_Controller\:\:get_item\(\) should return WP_Error\|WP_Post but returns WP_REST_Response\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php + - + message: '#^Method WP_REST_Controller\:\:get_object_type\(\) should return string but returns null\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php + - + message: '#^Method WP_REST_Template_Autosaves_Controller\:\:get_item\(\) should return WP_Error\|WP_Post but returns WP_REST_Response\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php + - + message: '#^Function _wp_preview_post_thumbnail_filter\(\) should return array\|null but returns string\.$#' + identifier: return.type + count: 2 + path: ../../../src/wp-includes/revision.php + - + message: '#^Function term_exists\(\) should return array\{term_id\: numeric\-string, term_taxonomy_id\: numeric\-string\}\|int\|null but returns string\.$#' + identifier: return.type + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Function _wp_get_current_user\(\) should return WP_User but returns null\.$#' + identifier: return.type + count: 2 + path: ../../../src/wp-includes/user.php diff --git a/tests/phpstan/baselines/return.unusedType.neon b/tests/phpstan/baselines/return.unusedType.neon new file mode 100644 index 0000000000000..2acebf529a781 --- /dev/null +++ b/tests/phpstan/baselines/return.unusedType.neon @@ -0,0 +1,100 @@ +# PHPStan baseline for the `return.unusedType` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/return.unusedType +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=return.unusedType +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Function plugins_api\(\) never returns array so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-admin/includes/plugin-install.php + - + message: '#^Function _fix_attachment_links\(\) never returns WP_Error so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Function get_preferred_from_update_core\(\) never returns array so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-admin/includes/update.php + - + message: '#^Function get_the_tag_list\(\) never returns WP_Error so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/category-template.php + - + message: '#^Function get_the_tag_list\(\) never returns false so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/category-template.php + - + message: '#^Function get_category\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/category.php + - + message: '#^Method WP_Recovery_Mode_Cookie_Service\:\:recovery_mode_hash\(\) never returns false so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/class-wp-recovery-mode-cookie-service.php + - + message: '#^Function wp_get_code_editor_settings\(\) never returns false so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Function get_post_gallery\(\) never returns string so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/media.php + - + message: '#^Function wp_imagecreatetruecolor\(\) never returns GdImage so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/media.php + - + message: '#^Function wp_mime_type_icon\(\) never returns false so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Function _set_preview\(\) never returns false so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/revision.php + - + message: '#^Function get_term_to_edit\(\) never returns int so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Function get_term_to_edit\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/taxonomy.php + - + message: '#^Function wp_is_password_reset_allowed_for_user\(\) never returns WP_Error so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-includes/user.php + - + message: '#^Function validate_another_blog_signup\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: ../../../src/wp-signup.php diff --git a/tests/phpstan/baselines/smallerOrEqual.alwaysTrue.neon b/tests/phpstan/baselines/smallerOrEqual.alwaysTrue.neon new file mode 100644 index 0000000000000..aed03b30ea48d --- /dev/null +++ b/tests/phpstan/baselines/smallerOrEqual.alwaysTrue.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `smallerOrEqual.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/smallerOrEqual.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=smallerOrEqual.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Comparison operation "\<\=" between 0 and int\<0, max\>\|false is always true\.$#' + identifier: smallerOrEqual.alwaysTrue + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php diff --git a/tests/phpstan/baselines/staticClassAccess.privateMethod.neon b/tests/phpstan/baselines/staticClassAccess.privateMethod.neon new file mode 100644 index 0000000000000..c3a8969643a94 --- /dev/null +++ b/tests/phpstan/baselines/staticClassAccess.privateMethod.neon @@ -0,0 +1,190 @@ +# PHPStan baseline for the `staticClassAccess.privateMethod` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/staticClassAccess.privateMethod +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=staticClassAccess.privateMethod +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Unsafe call to private method WP_Classic_To_Block_Menu_Converter\:\:group_by_parent_id\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-classic-to-block-menu-converter.php + - + message: '#^Unsafe call to private method WP_Classic_To_Block_Menu_Converter\:\:to_blocks\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/class-wp-classic-to-block-menu-converter.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:create_classic_menu_fallback\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:create_default_fallback\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:get_default_fallback_blocks\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:get_fallback_classic_menu\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:get_most_recently_created_nav_menu\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:get_most_recently_published_navigation\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 3 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:get_nav_menu_at_primary_location\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Navigation_Fallback\:\:get_nav_menu_with_primary_slug\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-navigation-fallback.php + - + message: '#^Unsafe call to private method WP_Theme_JSON_Resolver\:\:inject_variations_from_block_style_variation_files\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Unsafe call to private method WP_Theme_JSON_Resolver\:\:inject_variations_from_block_styles_registry\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Unsafe call to private method WP_Theme_JSON_Resolver\:\:recursively_iterate_json\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Unsafe call to private method WP_Theme_JSON_Resolver\:\:remove_json_comments\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Unsafe call to private method WP_Theme_JSON_Resolver\:\:style_variation_has_scope\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json-resolver.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:compute_spacing_sizes\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 3 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:get_block_name_from_metadata_path\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:get_block_nodes\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 3 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:get_feature_selector\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:get_viewport_breakpoint_value_in_pixels\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:is_valid_viewport_breakpoint_size\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:merge_spacing_sizes\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:remove_indirect_properties\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:resolve_custom_css_format\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:sanitize_viewport_settings\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 3 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:unwrap_shared_block_style_variations\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:update_button_width_declarations\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 4 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:update_paragraph_text_indent_selector\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 4 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Theme_JSON\:\:update_separator_declarations\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/class-wp-theme-json.php + - + message: '#^Unsafe call to private method WP_Font_Face_Resolver\:\:convert_font_face_properties\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/fonts/class-wp-font-face-resolver.php + - + message: '#^Unsafe call to private method WP_Font_Face_Resolver\:\:maybe_parse_name_from_comma_separated_list\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/fonts/class-wp-font-face-resolver.php + - + message: '#^Unsafe call to private method WP_Font_Face_Resolver\:\:parse_settings\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 2 + path: ../../../src/wp-includes/fonts/class-wp-font-face-resolver.php + - + message: '#^Unsafe call to private method WP_Font_Face_Resolver\:\:to_kebab_case\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/fonts/class-wp-font-face-resolver.php + - + message: '#^Unsafe call to private method WP_Font_Face_Resolver\:\:to_theme_file_uri\(\) through static\:\:\.$#' + identifier: staticClassAccess.privateMethod + count: 1 + path: ../../../src/wp-includes/fonts/class-wp-font-face-resolver.php diff --git a/tests/phpstan/baselines/ternary.alwaysFalse.neon b/tests/phpstan/baselines/ternary.alwaysFalse.neon new file mode 100644 index 0000000000000..b73c48bc42724 --- /dev/null +++ b/tests/phpstan/baselines/ternary.alwaysFalse.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `ternary.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/ternary.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=ternary.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Ternary operator condition is always false\.$#' + identifier: ternary.alwaysFalse + count: 2 + path: ../../../src/wp-admin/includes/class-wp-debug-data.php diff --git a/tests/phpstan/baselines/ternary.alwaysTrue.neon b/tests/phpstan/baselines/ternary.alwaysTrue.neon new file mode 100644 index 0000000000000..295254051f683 --- /dev/null +++ b/tests/phpstan/baselines/ternary.alwaysTrue.neon @@ -0,0 +1,30 @@ +# PHPStan baseline for the `ternary.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/ternary.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=ternary.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 1 + path: ../../../src/wp-admin/menu-header.php + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 1 + path: ../../../src/wp-admin/theme-install.php diff --git a/tests/phpstan/baselines/varTag.noVariable.neon b/tests/phpstan/baselines/varTag.noVariable.neon new file mode 100644 index 0000000000000..36e0f9fed1382 --- /dev/null +++ b/tests/phpstan/baselines/varTag.noVariable.neon @@ -0,0 +1,60 @@ +# PHPStan baseline for the `varTag.noVariable` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/varTag.noVariable +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=varTag.noVariable +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: ../../../src/wp-admin/install.php + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: ../../../src/wp-admin/profile.php + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: ../../../src/wp-admin/upgrade.php + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: ../../../src/wp-cron.php + - + message: '#^PHPDoc tag @var above assignment does not specify variable name\.$#' + identifier: varTag.noVariable + count: 9 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: ../../../src/wp-includes/kses.php + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 2 + path: ../../../src/wp-includes/rest-api.php + - + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: ../../../src/xmlrpc.php diff --git a/tests/phpstan/baselines/variable.undefined.neon b/tests/phpstan/baselines/variable.undefined.neon new file mode 100644 index 0000000000000..dca18ebe74acc --- /dev/null +++ b/tests/phpstan/baselines/variable.undefined.neon @@ -0,0 +1,995 @@ +# PHPStan baseline for the `variable.undefined` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/variable.undefined +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=variable.undefined +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^Variable \$wp_query might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-activate.php + - + message: '#^Variable \$pagenow might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/admin.php + - + message: '#^Variable \$wp_db_version might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/admin.php + - + message: '#^Variable \$comment_ids might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Variable \$comment_status might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Variable \$messages might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-comments.php + - + message: '#^Variable \$is_IE might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-form-advanced.php + - + message: '#^Variable \$title might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-form-advanced.php + - + message: '#^Variable \$cat_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-link-form.php + - + message: '#^Variable \$link might not be defined\.$#' + identifier: variable.undefined + count: 10 + path: ../../../src/wp-admin/edit-link-form.php + - + message: '#^Variable \$title might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-link-form.php + - + message: '#^Variable \$message might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-tag-form.php + - + message: '#^Variable \$tag might not be defined\.$#' + identifier: variable.undefined + count: 19 + path: ../../../src/wp-admin/edit-tag-form.php + - + message: '#^Variable \$tag_ID might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/edit-tag-form.php + - + message: '#^Variable \$tax might not be defined\.$#' + identifier: variable.undefined + count: 7 + path: ../../../src/wp-admin/edit-tag-form.php + - + message: '#^Variable \$taxonomy might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-tag-form.php + - + message: '#^Variable \$current_screen might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-tags.php + - + message: '#^Variable \$message might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-tags.php + - + message: '#^Variable \$taxnow might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/edit-tags.php + - + message: '#^Variable \$taxonomy might not be defined\.$#' + identifier: variable.undefined + count: 9 + path: ../../../src/wp-admin/edit-tags.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 4 + path: ../../../src/wp-admin/export.php + - + message: '#^Variable \$_object might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Variable \$callback might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Variable \$parent might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Variable \$stat might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Variable \$type might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/ajax-actions.php + - + message: '#^Variable \$original_result might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/class-core-upgrader.php + - + message: '#^Variable \$rollback_result might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/class-core-upgrader.php + - + message: '#^Variable \$wp_version might not be defined\.$#' + identifier: variable.undefined + count: 9 + path: ../../../src/wp-admin/includes/class-core-upgrader.php + - + message: '#^Variable \$context might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Variable \$item_name might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Variable \$subject might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Variable \$upgrader might not be defined\.$#' + identifier: variable.undefined + count: 8 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Variable \$was_active might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-automatic-updater.php + - + message: '#^Variable \$wp_version might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-community-events.php + - + message: '#^Variable \$key might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-importer.php + - + message: '#^Variable \$text might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-ms-themes-list-table.php + - + message: '#^Variable \$description might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-plugins-list-table.php + - + message: '#^Variable \$plugin_name might not be defined\.$#' + identifier: variable.undefined + count: 5 + path: ../../../src/wp-admin/includes/class-wp-plugins-list-table.php + - + message: '#^Variable \$authors_dropdown might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-posts-list-table.php + - + message: '#^Variable \$badge_class might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-privacy-policy-content.php + - + message: '#^Variable \$badge_title might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-privacy-policy-content.php + - + message: '#^Variable \$wp_version might not be defined\.$#' + identifier: variable.undefined + count: 6 + path: ../../../src/wp-admin/includes/class-wp-site-health-auto-updates.php + - + message: '#^Variable \$output might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/class-wp-site-health.php + - + message: '#^Variable \$taxonomy might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/edit-tag-messages.php + - + message: '#^Variable \$resized might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/image.php + - + message: '#^Variable \$class might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Variable \$html might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Variable \$num_posts might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Variable \$result might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/media.php + - + message: '#^Variable \$network_current might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/plugin.php + - + message: '#^Variable \$metakey might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/includes/post.php + - + message: '#^Variable \$revision might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/includes/revision.php + - + message: '#^Variable \$required_mysql_version might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/includes/update-core.php + - + message: '#^Variable \$required_php_version might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/includes/update-core.php + - + message: '#^Variable \$working_dir_local might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/includes/update-core.php + - + message: '#^Variable \$wp_version might not be defined\.$#' + identifier: variable.undefined + count: 9 + path: ../../../src/wp-admin/includes/update-core.php + - + message: '#^Variable \$id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/includes/upgrade.php + - + message: '#^Variable \$compat might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/install.php + - + message: '#^Variable \$linkcheck might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/link.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 9 + path: ../../../src/wp-admin/maint/repair.php + - + message: '#^Variable \$update_data might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/menu.php + - + message: '#^Variable \$current_user might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/my-sites.php + - + message: '#^Variable \$current_user might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/nav-menus.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/network.php + - + message: '#^Variable \$current_blog might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/network/admin.php + - + message: '#^Variable \$current_site might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/network/admin.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/network/site-new.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 5 + path: ../../../src/wp-admin/network/site-settings.php + - + message: '#^Variable \$update might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/network/site-users.php + - + message: '#^Variable \$s might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/network/sites.php + - + message: '#^Variable \$page might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/network/themes.php + - + message: '#^Variable \$status might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/network/themes.php + - + message: '#^Variable \$usersearch might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/network/users.php + - + message: '#^Variable \$user_email might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/options-discussion.php + - + message: '#^Variable \$is_caddy might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/options-permalink.php + - + message: '#^Variable \$is_nginx might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/options-permalink.php + - + message: '#^Variable \$wp_rewrite might not be defined\.$#' + identifier: variable.undefined + count: 8 + path: ../../../src/wp-admin/options-permalink.php + - + message: '#^Variable \$options_to_update might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/options.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/options.php + - + message: '#^Variable \$page might not be defined\.$#' + identifier: variable.undefined + count: 18 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Variable \$plugins might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Variable \$status might not be defined\.$#' + identifier: variable.undefined + count: 18 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Variable \$user_ID might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/plugins.php + - + message: '#^Variable \$typenow might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/post.php + - + message: '#^Variable \$h1 might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/revision.php + - + message: '#^Variable \$return_to_post might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/revision.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 7 + path: ../../../src/wp-admin/setup-config.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/site-editor.php + - + message: '#^Variable \$taxnow might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/term.php + - + message: '#^Variable \$docs_select might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/theme-editor.php + - + message: '#^Variable \$paged might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/theme-install.php + - + message: '#^Variable \$self might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/themes.php + - + message: '#^Variable \$submenu might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/themes.php + - + message: '#^Variable \$auto_update_notice might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/update-core.php + - + message: '#^Variable \$wp_version might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/update-core.php + - + message: '#^Variable \$message might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/upgrade.php + - + message: '#^Variable \$version_url might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/upgrade.php + - + message: '#^Variable \$wp_db_version might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/upgrade.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/upload.php + - + message: '#^Variable \$_wp_admin_css_colors might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Variable \$user_login might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Variable \$wp_roles might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 12 + path: ../../../src/wp-admin/user-edit.php + - + message: '#^Variable \$blog_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/user-new.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/user-new.php + - + message: '#^Variable \$current_blog might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/user/admin.php + - + message: '#^Variable \$current_site might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/user/admin.php + - + message: '#^Variable \$blog_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/users.php + - + message: '#^Variable \$current_user might not be defined\.$#' + identifier: variable.undefined + count: 7 + path: ../../../src/wp-admin/users.php + - + message: '#^Variable \$redirect might not be defined\.$#' + identifier: variable.undefined + count: 10 + path: ../../../src/wp-admin/users.php + - + message: '#^Variable \$usersearch might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/users.php + - + message: '#^Variable \$wp_roles might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/users.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 6 + path: ../../../src/wp-admin/users.php + - + message: '#^Variable \$title might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/widgets-form-blocks.php + - + message: '#^Variable \$control might not be defined\.$#' + identifier: variable.undefined + count: 4 + path: ../../../src/wp-admin/widgets-form.php + - + message: '#^Variable \$control_callback might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/widgets-form.php + - + message: '#^Variable \$title might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-admin/widgets-form.php + - + message: '#^Variable \$wp_registered_sidebars might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-admin/widgets-form.php + - + message: '#^Variable \$wp_registered_widget_controls might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/widgets-form.php + - + message: '#^Variable \$wp_registered_widget_updates might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-admin/widgets-form.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-content/themes/twentyeleven/header.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 6 + path: ../../../src/wp-content/themes/twentyeleven/image.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/showcase.php + - + message: '#^Variable \$next_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/functions.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-content/themes/twentyfourteen/image.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-content/themes/twentyten/header.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-content/themes/twentyten/loop-attachment.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-content/themes/twentyten/loop.php + - + message: '#^Variable \$wp_query might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-content/themes/twentyten/loop.php + - + message: '#^Variable \$next_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/functions.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-content/themes/twentythirteen/image.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 6 + path: ../../../src/wp-content/themes/twentytwelve/image.php + - + message: '#^Variable \$comments might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/comments.php + - + message: '#^Variable \$post_meta might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/inc/template-tags.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 4 + path: ../../../src/wp-content/themes/twentytwentyone/image.php + - + message: '#^Variable \$wp_query might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-content/themes/twentytwentyone/search.php + - + message: '#^Variable \$original_content might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/blocks.php + - + message: '#^Variable \$name might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-walker-category.php + - + message: '#^Variable \$comment_closing_at might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$comment_opening_at might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$has_closer might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$has_void_flag might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$json_at might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$json_length might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$name_at might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$name_length might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$namespace_at might not be defined\.$#' + identifier: variable.undefined + count: 5 + path: ../../../src/wp-includes/class-wp-block-processor.php + - + message: '#^Variable \$section_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-customize-widgets.php + - + message: '#^Variable \$filter_id might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-duotone.php + - + message: '#^Variable \$processed_response might not be defined\.$#' + identifier: variable.undefined + count: 5 + path: ../../../src/wp-includes/class-wp-http-streams.php + - + message: '#^Variable \$response might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-http-streams.php + - + message: '#^Variable \$result might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-image-editor.php + - + message: '#^Variable \$network might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-network.php + - + message: '#^Variable \$cache_found might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Variable \$cache_key might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Variable \$post_type_cap might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/class-wp-query.php + - + message: '#^Variable \$end might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/class-wp-walker.php + - + message: '#^Variable \$excerpt might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp-xmlrpc-server.php + - + message: '#^Variable \$matches might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp.php + - + message: '#^Variable \$query might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/class-wp.php + - + message: '#^Variable \$_comments might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/comment-template.php + - + message: '#^Variable \$post_author might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/comment.php + - + message: '#^Variable \$comment might not be defined\.$#' + identifier: variable.undefined + count: 4 + path: ../../../src/wp-includes/feed-atom-comments.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/feed-rdf.php + - + message: '#^Variable \$comment might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/feed-rss2-comments.php + - + message: '#^Variable \$mime might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/functions.php + - + message: '#^Variable \$gen might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Variable \$my_year might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/general-template.php + - + message: '#^Variable \$cache_key might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/global-styles-and-settings.php + - + message: '#^Variable \$cached might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/global-styles-and-settings.php + - + message: '#^Variable \$token_length might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/html-api/class-wp-html-decoder.php + - + message: '#^Variable \$node might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/html-api/class-wp-html-processor.php + - + message: '#^Variable \$parts might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/kses.php + - + message: '#^Variable \$post might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/link-template.php + - + message: '#^Variable \$current_blog might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/ms-files.php + - + message: '#^Variable \$current_blog might not be defined\.$#' + identifier: variable.undefined + count: 7 + path: ../../../src/wp-includes/ms-settings.php + - + message: '#^Variable \$table_prefix might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/ms-settings.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 3 + path: ../../../src/wp-includes/ms-settings.php + - + message: '#^Variable \$icon might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/post.php + - + message: '#^Variable \$wp_version might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/script-loader.php + - + message: '#^Variable \$wp_template_path might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-includes/template.php + - + message: '#^Variable \$manage_url might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-includes/user.php + - + message: '#^Variable \$error might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-login.php + - + message: '#^Variable \$rp_key might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-login.php + - + message: '#^Variable \$rp_login might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-login.php + - + message: '#^Variable \$user_login might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: ../../../src/wp-login.php + - + message: '#^Variable \$subject might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-mail.php + - + message: '#^Variable \$table_prefix might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-settings.php + - + message: '#^Variable \$wp_filter might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-settings.php + - + message: '#^Variable \$wp_query might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-signup.php + - + message: '#^Variable \$posts might not be defined\.$#' + identifier: variable.undefined + count: 1 + path: ../../../src/wp-trackback.php + - + message: '#^Variable \$wpdb might not be defined\.$#' + identifier: variable.undefined + count: 4 + path: ../../../src/wp-trackback.php diff --git a/tests/phpstan/baselines/while.alwaysFalse.neon b/tests/phpstan/baselines/while.alwaysFalse.neon new file mode 100644 index 0000000000000..3c924003ea783 --- /dev/null +++ b/tests/phpstan/baselines/while.alwaysFalse.neon @@ -0,0 +1,25 @@ +# PHPStan baseline for the `while.alwaysFalse` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/while.alwaysFalse +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=while.alwaysFalse +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^While loop condition is always false\.$#' + identifier: while.alwaysFalse + count: 1 + path: ../../../src/wp-includes/feed-rdf.php diff --git a/tests/phpstan/baselines/while.alwaysTrue.neon b/tests/phpstan/baselines/while.alwaysTrue.neon new file mode 100644 index 0000000000000..5da6550e89cc0 --- /dev/null +++ b/tests/phpstan/baselines/while.alwaysTrue.neon @@ -0,0 +1,300 @@ +# PHPStan baseline for the `while.alwaysTrue` errors in WordPress core. +# +# https://phpstan.org/error-identifiers/while.alwaysTrue +# +# Each entry is scoped to a single file and carries an exact occurrence count, +# so that a new instance is reported as a new error rather than being absorbed +# silently. Fixing an occurrence therefore means decrementing or removing its +# entry here as part of the same change. +# +# The goal is to empty this file and delete it, along with the `includes` entry +# for it in phpstan.neon.dist. +# +# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with +# +# composer phpstan:baselines -- --identifier=while.alwaysTrue +# +# which reruns the analysis with this file suppressed so the errors surface again. + +parameters: + ignoreErrors: + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/dashboard.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-admin/includes/nav-menu.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/author.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/category.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/inc/widgets.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/showcase.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyeleven/tag.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfifteen/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/author.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/category.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/inc/widgets.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/tag.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyfourteen/taxonomy-post_format.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentynineteen/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/front-page.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentysixteen/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-attachment.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-page.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentyten/loop-single.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/author.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/category.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/tag.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentythirteen/taxonomy-post_format.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/author.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/category.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwelve/tag.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/singular.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwenty/templates/template-cover.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/archive.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/index.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-content/themes/twentytwentyone/search.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-includes/block-template.php + - + message: '#^While loop condition is always true\.$#' + identifier: while.alwaysTrue + count: 1 + path: ../../../src/wp-includes/theme-compat/embed.php diff --git a/tests/phpstan/bootstrap.php b/tests/phpstan/bootstrap.php index 6eedeec93c4a7..b203ecdc11117 100644 --- a/tests/phpstan/bootstrap.php +++ b/tests/phpstan/bootstrap.php @@ -7,7 +7,14 @@ * Loaded as a `bootstrapFile` by PHPStan; see `base.neon`. */ -// wp_initial_constants() +/* + * A fixed, fictional path rather than the real checkout location. PHPStan resolves + * no files through this constant, and deriving it from __DIR__ embeds the developer's + * own path in error messages, making output differ between machines. + */ +define( 'ABSPATH', '/var/www/html/' ); + +/** @see wp_initial_constants() */ define( 'KB_IN_BYTES', 1024 ); define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES ); define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES ); @@ -16,9 +23,10 @@ define( 'EB_IN_BYTES', 1024 * PB_IN_BYTES ); define( 'ZB_IN_BYTES', 1024 * EB_IN_BYTES ); define( 'YB_IN_BYTES', 1024 * ZB_IN_BYTES ); -define( 'WP_START_TIMESTAMP', microtime( true ) ); -define( 'WP_MEMORY_LIMIT', '' ); -define( 'WP_MAX_MEMORY_LIMIT', '' ); +define( 'WP_START_TIMESTAMP', 1700000000.0 ); // Fixed rather than microtime( true ), whose value would differ on every run. +define( 'WP_MEMORY_LIMIT', '40M' ); +define( 'WP_MAX_MEMORY_LIMIT', '256M' ); +define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); define( 'WP_DEVELOPMENT_MODE', '' ); define( 'WP_DEBUG', false ); define( 'WP_DEBUG_DISPLAY', false ); @@ -35,25 +43,25 @@ define( 'MONTH_IN_SECONDS', 30 * DAY_IN_SECONDS ); define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS ); -// wp_set_lang_dir() -define( 'WP_LANG_DIR', '' ); +/** @see wp_set_lang_dir() */ +define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' ); // wp_plugin_directory_constants() -define( 'WP_CONTENT_URL', '' ); -define( 'WP_PLUGIN_DIR', '' ); -define( 'WP_PLUGIN_URL', '' ); -define( 'PLUGINDIR', '' ); -define( 'WPMU_PLUGIN_DIR', '' ); -define( 'WPMU_PLUGIN_URL', '' ); -define( 'MUPLUGINDIR', '' ); +define( 'WP_CONTENT_URL', 'https://example.com/wp-content' ); +define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); +define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); +define( 'PLUGINDIR', 'wp-content/plugins' ); +define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); +define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); +define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); -// ms_cookie_constants() +/** @see ms_cookie_constants() */ define( 'COOKIEPATH', '' ); define( 'SITECOOKIEPATH', '' ); define( 'ADMIN_COOKIE_PATH', '' ); define( 'COOKIE_DOMAIN', '' ); -// wp_cookie_constants() +/** @see wp_cookie_constants() */ define( 'COOKIEHASH', '' ); define( 'USER_COOKIE', '' ); define( 'PASS_COOKIE', '' ); @@ -64,34 +72,43 @@ define( 'PLUGINS_COOKIE_PATH', '' ); define( 'RECOVERY_MODE_COOKIE', '' ); -// wp_ssl_constants() +/** @see wp_ssl_constants() */ define( 'FORCE_SSL_LOGIN', false ); define( 'FORCE_SSL_ADMIN', false ); -// wp_functionality_constants() +/** @see wp_functionality_constants() */ define( 'AUTOSAVE_INTERVAL', MINUTE_IN_SECONDS ); define( 'EMPTY_TRASH_DAYS', 1 ); define( 'WP_POST_REVISIONS', true ); define( 'WP_CRON_LOCK_TIMEOUT', MINUTE_IN_SECONDS ); -// wp_templating_constants() -define( 'TEMPLATEPATH', '' ); -define( 'STYLESHEETPATH', '' ); -define( 'WP_DEFAULT_THEME', '' ); +/** @see wp_templating_constants() */ +define( 'TEMPLATEPATH', WP_CONTENT_DIR . '/themes/twentytwentyfive' ); +define( 'STYLESHEETPATH', WP_CONTENT_DIR . '/themes/twentytwentyfive' ); +define( 'WP_DEFAULT_THEME', 'twentytwentyfive' ); -// ms_file_constants() +/** @see ms_file_constants() */ define( 'WPMU_SENDFILE', false ); define( 'WPMU_ACCEL_REDIRECT', false ); -// ms_load_current_site_and_network() +/** @see ms_load_current_site_and_network() */ define( 'NOBLOGREDIRECT', '' ); -// ms_upload_constants() -define( 'UPLOADBLOGSDIR', '' ); -define( 'BLOGUPLOADDIR', '' ); +/** @see ms_upload_constants() */ +define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); +define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . '/blogs.dir/1/files/' ); + +/** @see WP_Filesystem() */ +define( 'FS_CONNECT_TIMEOUT', 30 ); // 30 seconds. +define( 'FS_TIMEOUT', 30 ); // 30 seconds. +define( 'FS_CHMOD_DIR', 0755 ); +define( 'FS_CHMOD_FILE', 0644 ); -// Misc constants not part of the default lifecycle. -define( 'FS_CONNECT_TIMEOUT', 1 ); -define( 'FS_TIMEOUT', 1 ); -define( 'FS_CHMOD_DIR', 1 ); -define( 'FS_CHMOD_FILE', 1 ); +/** @see add_theme_support() */ +define( 'NO_HEADER_TEXT', false ); +define( 'HEADER_IMAGE_WIDTH', 0 ); +define( 'HEADER_IMAGE_HEIGHT', 0 ); +define( 'HEADER_TEXTCOLOR', '' ); +define( 'HEADER_IMAGE', '' ); +define( 'BACKGROUND_COLOR', '' ); +define( 'BACKGROUND_IMAGE', '' ); diff --git a/tests/phpstan/generate-baselines.php b/tests/phpstan/generate-baselines.php new file mode 100644 index 0000000000000..de0073e83cc54 --- /dev/null +++ b/tests/phpstan/generate-baselines.php @@ -0,0 +1,662 @@ + all-errors.neon + * + * @package WordPress + */ + +namespace WordPress\PHPStan; + +if ( 'cli' !== PHP_SAPI ) { + fwrite( STDERR, "This script must be run from the command line.\n" ); + exit( 1 ); +} + +$repo_root = dirname( __DIR__, 2 ); + +// $argv is only populated when register_argc_argv is on, so read it defensively. +$args = array(); +foreach ( (array) ( $_SERVER['argv'] ?? array() ) as $arg ) { + if ( is_string( $arg ) ) { + $args[] = $arg; + } +} +array_shift( $args ); + +$config_option = 'phpstan.neon.dist'; +$output_option = 'tests/phpstan/baselines'; +$memory_limit = '2G'; +$only_identifiers = array(); +$combined = false; + +foreach ( $args as $arg ) { + if ( '--help' === $arg || '-h' === $arg ) { + fwrite( STDOUT, get_usage() ); + exit( 0 ); + } + + if ( '--combined' === $arg ) { + $combined = true; + continue; + } + + if ( 1 === preg_match( '/^--identifier=(.+)$/', $arg, $matches ) ) { + foreach ( explode( ',', $matches[1] ) as $identifier ) { + $identifier = trim( $identifier ); + if ( '' !== $identifier ) { + $only_identifiers[] = $identifier; + } + } + continue; + } + + if ( 1 === preg_match( '/^--config=(.+)$/', $arg, $matches ) ) { + $config_option = $matches[1]; + continue; + } + + if ( 1 === preg_match( '/^--output-dir=(.+)$/', $arg, $matches ) ) { + $output_option = $matches[1]; + continue; + } + + if ( 1 === preg_match( '/^--memory-limit=(.+)$/', $arg, $matches ) ) { + $memory_limit = $matches[1]; + continue; + } + + fwrite( STDERR, "Unrecognized option: $arg\n\n" . get_usage() ); + exit( 1 ); +} + +$config_path = $repo_root . '/' . ltrim( $config_option, '/' ); +$output_dir = $repo_root . '/' . trim( $output_option, '/' ); + +if ( ! is_file( $config_path ) ) { + fwrite( STDERR, "Configuration not found: $config_option\n" ); + exit( 1 ); +} + +/* + * The temporary configuration has to sit beside the original, because a neon + * file's `includes` entries resolve relative to its own directory. + */ +/* + * Both temporary files sit beside the configuration, and so inside the + * repository, for two separate reasons. + * + * A neon file's `includes` resolve relative to its own directory, so the copy of + * the configuration has to live where the original did. + * + * PHPStan writes a PHP baseline's paths as __DIR__ followed by a relative chain, + * which it can only produce when the baseline shares an ancestry with the files + * it names. Generated somewhere else, the system temporary directory included, + * it emits `__DIR__ . '//absolute/path'` instead, and every path in it then + * resolves to somewhere under that directory rather than to the source file. + */ +$temp_config = dirname( $config_path ) . '/.phpstan-baselines-' . getmypid() . '.neon'; +$temp_baseline = dirname( $config_path ) . '/.phpstan-baselines-' . getmypid() . '.php'; + +register_shutdown_function( + static function () use ( $temp_config, $temp_baseline ): void { + foreach ( array( $temp_config, $temp_baseline ) as $file ) { + if ( is_file( $file ) ) { + unlink( $file ); + } + } + } +); + +file_put_contents( $temp_config, strip_baseline_includes( $config_path, $output_dir ) ); + +/* + * PHPStan reports on stdout, which --combined reserves for the baseline itself, + * so its output is sent to stderr. That keeps it visible on a terminal while + * leaving stdout parseable when it is redirected. + */ +$command = sprintf( + '%s analyse --configuration=%s --generate-baseline=%s --allow-empty-baseline --no-progress --memory-limit=%s 1>&2', + escapeshellarg( $repo_root . '/vendor/bin/phpstan' ), + escapeshellarg( $temp_config ), + escapeshellarg( $temp_baseline ), + escapeshellarg( $memory_limit ) +); + +fwrite( STDERR, "Analyzing with $config_option, existing baselines suppressed...\n" ); + +$exit_code = 0; +passthru( $command, $exit_code ); + +if ( 0 !== $exit_code || ! is_file( $temp_baseline ) ) { + fwrite( STDERR, "PHPStan failed, nothing written.\n" ); + exit( 1 ); +} + +/** + * The entries of each error, grouped by the identifier of the error it suppresses. + * + * @var array, path: non-empty-string}>> $grouped + */ +$grouped = array(); + +foreach ( read_baseline( $temp_baseline ) as $entry ) { + $grouped[ $entry['identifier'] ][] = $entry; +} +ksort( $grouped ); + +if ( $only_identifiers ) { + $grouped = array_intersect_key( $grouped, array_flip( $only_identifiers ) ); +} + +if ( $combined ) { + $all = array(); + foreach ( $grouped as $entries ) { + $all = array_merge( $all, $entries ); + } + echo build_baseline( $all, $output_dir, "# Every identifier, combined.\n" ); + exit( 0 ); +} + +if ( ! is_dir( $output_dir ) && ! mkdir( $output_dir, 0755, true ) ) { + fwrite( STDERR, "Could not create $output_option\n" ); + exit( 1 ); +} + +foreach ( $grouped as $identifier => $entries ) { + file_put_contents( + $output_dir . '/' . $identifier . '.neon', + build_baseline( $entries, $output_dir, build_baseline_header( $identifier, $config_option ) ) + ); + + printf( + "%s: %d entries, %d errors\n", + $output_option . '/' . $identifier . '.neon', + count( $entries ), + count_errors( $entries ) + ); +} + +/* + * An identifier that reports nothing has been driven to zero, so retire its file + * rather than leaving a stale one behind whose entries would then be reported as + * unmatched ignores. + * + * A run restricted to particular identifiers only knows about those, so it may + * only retire those. A full run has seen everything and may retire any file that + * no longer corresponds to a reported identifier. + */ +$retired = $only_identifiers; + +if ( ! $only_identifiers ) { + foreach ( find_baselines( $output_dir ) as $file ) { + $retired[] = basename( $file, '.neon' ); + } +} + +foreach ( $retired as $identifier ) { + if ( isset( $grouped[ $identifier ] ) ) { + continue; + } + + $file = $output_dir . '/' . $identifier . '.neon'; + if ( is_file( $file ) && unlink( $file ) ) { + printf( "%s: no errors remain, file deleted.\n", $output_option . '/' . $identifier . '.neon' ); + } else { + printf( "%s: no errors reported.\n", $identifier ); + } +} + +update_config_includes( $config_path, $config_option, $output_dir ); + +/** + * Returns the usage message. + * + * @return non-falsy-string Usage message. + */ +function get_usage(): string { + return <<<'TEXT' + Generates PHPStan baselines split by error identifier. + + Writes one baseline per identifier, retires any whose identifier no longer + reports anything, and rewrites the list of them between the + `# phpstan:baselines` markers in the configuration's `includes`, so that + neither addition nor removal has to be done by hand. + + Usage: + composer phpstan:baselines [-- ] + + Options: + --identifier= Only write the baseline for this identifier. Repeatable, + or comma separated. When an identifier is named and the + analysis reports none of it, its baseline file is deleted + rather than left behind empty. + Default: every identifier reported. + --config= Configuration to analyze with, relative to the repository + root. Default: phpstan.neon.dist + --output-dir= Where the per-identifier baselines are written, relative + to the repository root. Paths inside them are written + relative to this directory. + Default: tests/phpstan/baselines + --combined Print one combined baseline to stdout instead of writing + per-identifier files. Nothing is written to disk. + --memory-limit= Passed through to PHPStan. Default: 2G + -h, --help Show this message. + + Examples: + Refresh every baseline: + composer phpstan:baselines + + Refresh one: + composer phpstan:baselines -- --identifier=variable.undefined + + Refresh several, either comma separated or by repeating the option: + composer phpstan:baselines -- --identifier=variable.undefined,isset.variable + composer phpstan:baselines -- --identifier=isset.variable --identifier=empty.variable + + Inspect everything as one baseline without writing any files: + composer phpstan:baselines -- --combined + + TEXT; +} + +/** + * Reads a file, failing loudly rather than continuing with false. + * + * @param non-falsy-string $path Absolute path to the file. + * @return string File contents. + */ +function read_file( string $path ): string { + $contents = file_get_contents( $path ); + + if ( false === $contents ) { + fwrite( STDERR, "Could not read $path\n" ); + exit( 1 ); + } + + return $contents; +} + +/** + * Reads a baseline generated in PHPStan's PHP format. + * + * The file returns the entries as an array, so it is required rather than + * parsed. Its `path` values are built from __DIR__ and so arrive absolute. + * + * @param non-falsy-string $path Absolute path to the generated baseline. + * @return list, path: non-empty-string}> Baseline entries. + */ +function read_baseline( string $path ): array { + $data = require $path; + + $parameters = is_array( $data ) ? ( $data['parameters'] ?? null ) : null; + $ignore_errors = is_array( $parameters ) ? ( $parameters['ignoreErrors'] ?? null ) : null; + + if ( ! is_array( $ignore_errors ) ) { + fwrite( STDERR, "Unexpected baseline structure in $path\n" ); + exit( 1 ); + } + + $entries = array(); + + foreach ( $ignore_errors as $entry ) { + if ( ! is_array( $entry ) + || ! isset( $entry['message'], $entry['identifier'], $entry['count'], $entry['path'] ) + || ! is_string( $entry['message'] ) + || ! is_string( $entry['identifier'] ) + || ! is_int( $entry['count'] ) + || $entry['count'] < 0 + || ! is_string( $entry['path'] ) + || '' === $entry['path'] + ) { + fwrite( STDERR, "Unexpected baseline entry in $path.\n" ); + exit( 1 ); + } + + /* + * PHPStan attaches an identifier to every error it reports, so an entry + * without a usable one means this is not a baseline that can be split by + * identifier. Skipping it would quietly drop a suppression. + */ + if ( '' === $entry['identifier'] || '0' === $entry['identifier'] ) { + fwrite( STDERR, "Baseline entry in $path has no identifier.\n" ); + exit( 1 ); + } + + $entries[] = array( + 'message' => $entry['message'], + 'identifier' => $entry['identifier'], + 'count' => $entry['count'], + 'path' => $entry['path'], + ); + } + + return $entries; +} + +/** + * Returns the configuration with any `includes` of the baseline directory removed. + * + * Those files suppress the very errors being regenerated, so they have to be out + * of the way for the analysis to report anything. + * + * @param non-falsy-string $config_path Absolute path to the configuration file. + * @param non-falsy-string $output_dir Absolute path to the baseline directory. + * @return string Configuration contents. + */ +function strip_baseline_includes( string $config_path, string $output_dir ): string { + $config_dir = dirname( $config_path ); + $in_block = false; + $kept = array(); + + foreach ( explode( "\n", read_file( $config_path ) ) as $line ) { + if ( 1 === preg_match( '/^includes:/', $line ) ) { + $in_block = true; + $kept[] = $line; + continue; + } + + // A non-indented, non-blank line ends the block. + if ( $in_block && '' !== trim( $line ) && 1 !== preg_match( '/^\s/', $line ) ) { + $in_block = false; + } + + if ( $in_block && 1 === preg_match( '/^\s*-\s*(\S+)\s*$/', $line, $matches ) ) { + $included = $matches[1]; + $absolute = ( '/' === $included[0] ) ? $included : $config_dir . '/' . $included; + + if ( 0 === strpos( normalize_path( $absolute ), normalize_path( $output_dir ) . '/' ) ) { + continue; + } + } + + $kept[] = $line; + } + + return implode( "\n", $kept ); +} + +/** + * Lists the per-identifier baselines present on disk. + * + * @param non-empty-string $output_dir Absolute path to the baseline directory. + * @return list Absolute paths, sorted by name. + */ +function find_baselines( string $output_dir ): array { + $found = glob( $output_dir . '/*.neon' ); + + if ( false === $found ) { + return array(); + } + + sort( $found ); + + $files = array(); + foreach ( $found as $file ) { + if ( '' !== $file ) { + $files[] = $file; + } + } + + return $files; +} + +/** + * Rewrites the managed region of the configuration's `includes` list. + * + * The region is delimited by marker comments, so the hand written entries around + * it are never touched. Where the markers are absent they are appended to the end + * of the `includes` block, which is what happens the first time this is run + * against a configuration. + * + * @param non-falsy-string $config_path Absolute path to the configuration file. + * @param non-empty-string $config_option Configuration path, as passed on the command line. + * @param non-empty-string $output_dir Absolute path to the baseline directory. + */ +function update_config_includes( string $config_path, string $config_option, string $output_dir ): void { + $start_marker = '# phpstan:baselines start'; + $end_marker = '# phpstan:baselines end'; + + $before = read_file( $config_path ); + $lines = explode( "\n", $before ); + + $start = null; + $end = null; + foreach ( $lines as $i => $line ) { + if ( $start_marker === trim( $line ) ) { + $start = $i; + } + if ( $end_marker === trim( $line ) ) { + $end = $i; + } + } + + $region = array( "\t" . $start_marker ); + foreach ( find_baselines( $output_dir ) as $file ) { + $region[] = "\t- " . get_relative_path( dirname( $config_path ), $file ); + } + $region[] = "\t" . $end_marker; + + if ( null !== $start && null !== $end && $start < $end ) { + $updated = array_merge( + array_slice( $lines, 0, $start ), + $region, + array_slice( $lines, $end + 1 ) + ); + } else { + $insert = find_includes_end( $lines ); + + if ( null === $insert ) { + fwrite( STDERR, "No `includes` block found in $config_option, left untouched.\n" ); + return; + } + + $updated = array_merge( + array_slice( $lines, 0, $insert ), + array( '' ), + $region, + array_slice( $lines, $insert ) + ); + } + + $after = implode( "\n", $updated ); + + if ( $before === $after ) { + return; + } + + file_put_contents( $config_path, $after ); + printf( "%s: `includes` updated.\n", $config_option ); +} + +/** + * Finds where the `includes` block ends. + * + * @param list $lines Configuration lines. + * @return int|null Index of the first line after the block, or null when there is none. + */ +function find_includes_end( array $lines ): ?int { + $in_block = false; + $last = null; + + foreach ( $lines as $i => $line ) { + if ( 1 === preg_match( '/^includes:/', $line ) ) { + $in_block = true; + $last = $i; + continue; + } + + if ( ! $in_block || '' === trim( $line ) ) { + continue; + } + + // A non-indented line ends the block. + if ( 1 !== preg_match( '/^\s/', $line ) ) { + break; + } + + $last = $i; + } + + return null === $last ? null : $last + 1; +} + +/** + * Resolves ".." segments in a path without requiring it to exist. + * + * @param non-empty-string $path Path to normalize. + * @return non-falsy-string Normalized path, always absolute. + */ +function normalize_path( string $path ): string { + $parts = array(); + + foreach ( explode( '/', $path ) as $part ) { + if ( '' === $part || '.' === $part ) { + continue; + } + if ( '..' === $part ) { + array_pop( $parts ); + continue; + } + $parts[] = $part; + } + + return '/' . implode( '/', $parts ); +} + +/** + * Expresses one absolute path relative to a directory. + * + * A result of "0" is possible in principle, when the target is a single segment + * named "0" directly inside $from_dir, so this is non-empty rather than non-falsy. + * + * @param non-empty-string $from_dir Directory to express the path relative to. + * @param non-empty-string $to_path Path to express. + * @return non-empty-string Relative path, or "." when the two are the same. + */ +function get_relative_path( string $from_dir, string $to_path ): string { + $from = explode( '/', trim( normalize_path( $from_dir ), '/' ) ); + $to = explode( '/', trim( normalize_path( $to_path ), '/' ) ); + + while ( $from && $to && $from[0] === $to[0] ) { + array_shift( $from ); + array_shift( $to ); + } + + $relative = str_repeat( '../', count( $from ) ) . implode( '/', $to ); + + return '' === $relative ? '.' : $relative; +} + +/** + * Totals the `count` values across a set of entries. + * + * @param list, path: non-empty-string}> $entries Baseline entries. + * @return int<0, max> Total number of errors. + */ +function count_errors( array $entries ): int { + $total = 0; + + foreach ( $entries as $entry ) { + $total += $entry['count']; + } + + return $total; +} + +/** + * Builds a baseline file in PHPStan's NEON format. + * + * The entry layout matches what PHPStan itself writes, so a regenerated file can + * be diffed against one it produced. Paths are rewritten relative to the file's + * own directory, since that is what a NEON `path` resolves against. + * + * @param list, path: non-empty-string}> $entries Baseline entries. + * @param non-empty-string $output_dir Directory the file is written to. + * @param string $header Comment block, or an empty string. + * @return non-falsy-string Baseline file contents. + */ +function build_baseline( array $entries, string $output_dir, string $header ): string { + $contents = ( '' === $header ? '' : $header . "\n" ) . "parameters:\n\tignoreErrors:\n"; + + foreach ( $entries as $entry ) { + $contents .= "\t\t-\n" + . "\t\t\tmessage: " . quote_neon_value( $entry['message'] ) . "\n" + . "\t\t\tidentifier: " . $entry['identifier'] . "\n" + . "\t\t\tcount: " . $entry['count'] . "\n" + . "\t\t\tpath: " . get_relative_path( $output_dir, $entry['path'] ) . "\n"; + } + + return $contents; +} + +/** + * Quotes a value for NEON. + * + * A single quoted NEON string has no escape sequences other than a doubled + * quote, so the backslashes in a message pattern survive as written. This is the + * same quoting PHPStan applies when it generates a baseline itself. + * + * @param string $value Value to quote. + * @return non-falsy-string Quoted value. + */ +function quote_neon_value( string $value ): string { + return "'" . str_replace( "'", "''", $value ) . "'"; +} + +/** + * Builds the header comment for a per-identifier baseline. + * + * @param non-falsy-string $identifier Error identifier, a group followed by a code. + * @param non-empty-string $config Configuration path, as passed on the command line. + * @return non-falsy-string Comment block. + */ +function build_baseline_header( string $identifier, string $config ): string { + return <<assertInstanceOf( 'IXR_Error', $actual, $message ); @@ -908,6 +910,8 @@ public function assertIXRError( $actual, $message = '' ) { * * @param mixed $actual The value to check. * @param string $message Optional. Message to display when the assertion fails. + * + * @phpstan-assert !IXR_Error $actual */ public function assertNotIXRError( $actual, $message = '' ) { if ( $actual instanceof IXR_Error ) { diff --git a/tests/phpunit/includes/object-cache.php b/tests/phpunit/includes/object-cache.php index 142a310f6f26c..14224f967c767 100644 --- a/tests/phpunit/includes/object-cache.php +++ b/tests/phpunit/includes/object-cache.php @@ -2364,11 +2364,7 @@ public function add_non_persistent_groups( $groups ) { public function get_from_runtime_cache( $key, $group ) { $derived_key = $this->buildKey( $key, $group ); - if ( isset( $this->cache[ $derived_key ] ) ) { - return $this->cache[ $derived_key ]; - } - - return false; + return $this->cache[ $derived_key ] ?? false; } /** diff --git a/tests/phpunit/tests/admin/includesFile.php b/tests/phpunit/tests/admin/includesFile.php index ab2e82cf1dc8e..fab002c5e5e2c 100644 --- a/tests/phpunit/tests/admin/includesFile.php +++ b/tests/phpunit/tests/admin/includesFile.php @@ -399,8 +399,8 @@ public function mock_http_request( $response, $parsed_args, $url ) { * @covers ::download_url * @ticket 54738 * - * @param string $filter A callback containing a fake Content-Type header. - * @param string $ext The expected file extension to match. + * @param callable $filter A callback containing a fake Content-Type header. + * @param string $extension The expected file extension to match. */ public function test_download_url_should_use_the_content_type_header_to_set_extension_of_a_file_if_extension_was_not_determined( $filter, $extension ) { add_filter( 'pre_http_request', $filter ); diff --git a/tests/phpunit/tests/admin/includesMedia.php b/tests/phpunit/tests/admin/includesMedia.php new file mode 100644 index 0000000000000..35c542009db8d --- /dev/null +++ b/tests/phpunit/tests/admin/includesMedia.php @@ -0,0 +1,177 @@ +|null $expected The expected file size in bytes, or null if none should be displayed. + */ + public function test_attachment_submitbox_metadata_filesize( $filesize, ?int $expected ) { + $id = self::factory()->attachment->create_object( + array( + 'file' => 'test-image.jpg', + 'post_title' => 'Attachment Title', + 'post_parent' => 0, + 'post_mime_type' => 'image/jpeg', + ) + ); + $this->assertIsInt( $id ); + + wp_update_attachment_metadata( + $id, + array( + 'width' => 50, + 'height' => 50, + 'file' => 'test-image.jpg', + 'filesize' => $filesize, + ) + ); + + $GLOBALS['post'] = get_post( $id ); + + $output = get_echo( 'attachment_submitbox_metadata' ); + + if ( null === $expected ) { + $this->assertStringNotContainsString( 'misc-pub-filesize', $output, 'The file size should not have been displayed.' ); + } else { + $this->assertStringContainsString( size_format( $expected ), $output, 'The displayed file size did not match the normalized file size.' ); + } + } + + /** + * Data provider. + * + * @return array|null }> + */ + public function data_attachment_submitbox_metadata_filesize(): array { + return array( + 'an integer' => array( + 'filesize' => 12345, + 'expected' => 12345, + ), + 'a numeric string' => array( + 'filesize' => '12345', + 'expected' => 12345, + ), + 'a float' => array( + 'filesize' => 12345.6, + 'expected' => 12345, + ), + 'a float as a string' => array( + 'filesize' => '12345.6', + 'expected' => 12345, + ), + 'an exponential string' => array( + 'filesize' => '1e3', + 'expected' => 1000, + ), + 'a value smaller than a byte' => array( + 'filesize' => 0.5, + 'expected' => null, + ), + 'zero' => array( + 'filesize' => 0, + 'expected' => null, + ), + 'a negative integer' => array( + 'filesize' => -12345, + 'expected' => null, + ), + 'an empty string' => array( + 'filesize' => '', + 'expected' => null, + ), + 'a non-numeric string' => array( + 'filesize' => 'not-a-number', + 'expected' => null, + ), + 'an array' => array( + 'filesize' => array( 12345 ), + 'expected' => null, + ), + 'null' => array( + 'filesize' => null, + 'expected' => null, + ), + 'false' => array( + 'filesize' => false, + 'expected' => null, + ), + 'true' => array( + 'filesize' => true, + 'expected' => null, + ), + ); + } + + /** + * Tests that an unusable `filesize` in the attachment metadata falls back to the size of the file. + * + * @ticket 65686 + * + * @covers ::attachment_submitbox_metadata + * + * @dataProvider data_attachment_submitbox_metadata_filesize_falls_back_to_the_file + * + * @param mixed $filesize The `filesize` value stored in the attachment metadata. + */ + public function test_attachment_submitbox_metadata_filesize_falls_back_to_the_file( $filesize ) { + $id = self::factory()->attachment->create_upload_object( DIR_TESTDATA . '/images/canola.jpg' ); + $this->assertIsInt( $id ); + $file = get_attached_file( $id ); + $this->assertIsString( $file ); + + $meta = wp_get_attachment_metadata( $id ); + $this->assertIsArray( $meta ); + $meta['filesize'] = $filesize; + wp_update_attachment_metadata( $id, $meta ); + + $GLOBALS['post'] = get_post( $id ); + + $output = get_echo( 'attachment_submitbox_metadata' ); + + $filesize = wp_filesize( $file ); + $this->assertIsInt( $filesize ); + $this->assertStringContainsString( size_format( $filesize ), $output ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_attachment_submitbox_metadata_filesize_falls_back_to_the_file(): array { + return array( + 'a value smaller than a byte' => array( 'filesize' => 0.5 ), + 'zero' => array( 'filesize' => 0 ), + 'a negative integer' => array( 'filesize' => -12345 ), + 'an empty string' => array( 'filesize' => '' ), + 'a non-numeric string' => array( 'filesize' => 'not-a-number' ), + 'an array' => array( 'filesize' => array( 12345 ) ), + 'null' => array( 'filesize' => null ), + 'false' => array( 'filesize' => false ), + 'true' => array( 'filesize' => true ), + ); + } +} diff --git a/tests/phpunit/tests/admin/wpOnThisDay.php b/tests/phpunit/tests/admin/wpOnThisDay.php deleted file mode 100644 index 61aef6401683a..0000000000000 --- a/tests/phpunit/tests/admin/wpOnThisDay.php +++ /dev/null @@ -1,333 +0,0 @@ -modify( '-' . $years_ago . ' years' )->format( 'Y-m-d' ) . ' ' . $time; - - return self::factory()->post->create( - array( - 'post_author' => $author_id, - 'post_date' => $post_date, - 'post_date_gmt' => get_gmt_from_date( $post_date ), - 'post_status' => 'publish', - 'post_title' => $title, - ) - ); - } - - /** - * Creates a published post near, but not on, today's prior-year calendar day. - * - * @param int $author_id Author ID. - * @param string $title Post title. - * @param int $day_offset Number of days from today's prior-year calendar day. - * @return int Post ID. - */ - private function create_nearby_post( $author_id, $title = 'Almost a memory', $day_offset = 1 ) { - $post_date = current_datetime() - ->modify( '-1 year' ) - ->modify( ( $day_offset >= 0 ? '+' : '' ) . $day_offset . ' days' ) - ->format( 'Y-m-d' ) . ' 12:00:00'; - - return self::factory()->post->create( - array( - 'post_author' => $author_id, - 'post_date' => $post_date, - 'post_date_gmt' => get_gmt_from_date( $post_date ), - 'post_status' => 'publish', - 'post_title' => $title, - ) - ); - } - - /** - * Invokes _wp_dashboard_on_this_day_date_query_clause(). - * - * @param string $date Date string. - * @return array Date query clause. - */ - private static function get_date_query_clause( $date ) { - return _wp_dashboard_on_this_day_date_query_clause( new DateTimeImmutable( $date, wp_timezone() ) ); - } - - /** - * @covers ::wp_dashboard_on_this_day_setup - */ - public function test_setup_always_registers_widget_and_postbox_class_filter() { - $this->set_up_dashboard_screen(); - - $user_id = self::factory()->user->create( array( 'role' => 'author' ) ); - wp_set_current_user( $user_id ); - - wp_dashboard_on_this_day_setup(); - - $dashboard_widgets = $GLOBALS['wp_meta_boxes']['dashboard']['normal']['core'] ?? array(); - - $this->assertArrayHasKey( 'wp_dashboard_on_this_day', $dashboard_widgets ); - $this->assertSame( 'On This Day', $dashboard_widgets['wp_dashboard_on_this_day']['title'] ); - $this->assertNotFalse( - has_filter( - 'postbox_classes_dashboard_wp_dashboard_on_this_day', - 'wp_dashboard_on_this_day_postbox_classes' - ) - ); - } - - /** - * @covers ::wp_dashboard_on_this_day_postbox_classes - */ - public function test_postbox_classes_hides_widget_without_matching_posts() { - $user_id = self::factory()->user->create( array( 'role' => 'author' ) ); - wp_set_current_user( $user_id ); - - $this->assertContains( 'hidden', wp_dashboard_on_this_day_postbox_classes( array( '' ) ) ); - } - - /** - * @covers ::wp_dashboard_on_this_day_postbox_classes - */ - public function test_postbox_classes_does_not_hide_widget_with_matching_posts() { - $user_id = self::factory()->user->create( array( 'role' => 'author' ) ); - wp_set_current_user( $user_id ); - $this->create_matching_post( $user_id ); - - $this->assertNotContains( 'hidden', wp_dashboard_on_this_day_postbox_classes( array( '' ) ) ); - } - - /** - * @covers ::wp_dashboard_on_this_day_setup - */ - public function test_setup_adds_dashboard_widget_with_matching_post_from_another_author() { - $this->set_up_dashboard_screen(); - - $user_id = self::factory()->user->create( array( 'role' => 'author' ) ); - $other_user_id = self::factory()->user->create( array( 'role' => 'author' ) ); - wp_set_current_user( $user_id ); - $this->create_matching_post( $other_user_id ); - - wp_dashboard_on_this_day_setup(); - - $dashboard_widgets = $GLOBALS['wp_meta_boxes']['dashboard']['normal']['core'] ?? array(); - - $this->assertArrayHasKey( 'wp_dashboard_on_this_day', $dashboard_widgets ); - } - - /** - * @covers ::_wp_dashboard_on_this_day_date_query_clause - */ - public function test_get_date_query_clause_includes_february_29_on_february_28_in_non_leap_year() { - $clause = self::get_date_query_clause( '2023-02-28 12:00:00' ); - - $this->assertSame( - array( - 'relation' => 'OR', - array( - 'month' => 2, - 'day' => 28, - ), - array( - 'month' => 2, - 'day' => 29, - ), - ), - $clause - ); - } - - /** - * @covers ::_wp_dashboard_on_this_day_date_query_clause - */ - public function test_get_date_query_clause_does_not_include_february_29_on_february_28_in_leap_year() { - $clause = self::get_date_query_clause( '2024-02-28 12:00:00' ); - - $this->assertSame( - array( - 'month' => 2, - 'day' => 28, - ), - $clause - ); - } - - /** - * @covers ::_wp_dashboard_on_this_day_date_query_clause - */ - public function test_get_date_query_clause_matches_february_29_on_leap_day() { - $clause = self::get_date_query_clause( '2024-02-29 12:00:00' ); - - $this->assertSame( - array( - 'month' => 2, - 'day' => 29, - ), - $clause - ); - } - - /** - * @covers ::wp_dashboard_on_this_day - */ - public function test_widget_outputs_placeholder_without_matching_posts() { - $user_id = self::factory()->user->create( array( 'role' => 'author' ) ); - wp_set_current_user( $user_id ); - - ob_start(); - wp_dashboard_on_this_day(); - $output = ob_get_clean(); - - $this->assertStringContainsString( 'No posts were published on this day in previous years.', $output ); - $this->assertStringNotContainsString( '